All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: Christoph Bumiller
	<christoph.bumiller-D4IDLmZPRBc@public.gmane.org>,
	"mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	"10.2"
	<mesa-stable-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [Mesa-dev] [PATCH 04/12] nv50/ir/tgsi: TGSI_OPCODE_POW replicates its result
Date: Wed, 21 May 2014 20:01:11 +0100	[thread overview]
Message-ID: <537CF7F7.1010504@gmail.com> (raw)
In-Reply-To: <CAKb7Uvj1EomVeAwqFdguuP9xQ1dDkRGDVc9N7239b8O+aL-VrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 21/05/14 19:53, Ilia Mirkin wrote:
> On Wed, May 21, 2014 at 2:51 PM, Emil Velikov <emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On 21/05/14 00:39, Ilia Mirkin wrote:
>>> From: Christoph Bumiller <christoph.bumiller-D4IDLmZPRBc@public.gmane.org>
>>>
>>> Reviewed-by: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
>>> Cc: "10.2" <mesa-stable-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
>>> ---
>>>  src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 +++++-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>>> index 3e44bf9..e24be51 100644
>>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>>> @@ -2199,7 +2199,6 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
>>>     case TGSI_OPCODE_IMUL_HI:
>>>     case TGSI_OPCODE_UMUL_HI:
>>>     case TGSI_OPCODE_OR:
>>> -   case TGSI_OPCODE_POW:
>>>     case TGSI_OPCODE_SHL:
>>>     case TGSI_OPCODE_ISHR:
>>>     case TGSI_OPCODE_USHR:
>>> @@ -2254,6 +2253,11 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
>>>        FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi)
>>>           mkOp1(OP_MOV, TYPE_U32, dst0[c], fetchSrc(0, c));
>>>        break;
>>> +   case TGSI_OPCODE_POW:
>>> +      val0 = mkOp2v(op, TYPE_F32, getScratch(), fetchSrc(0, 0), fetchSrc(1, 0));
>>> +      FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi)
>>> +         mkOp1(OP_MOV, TYPE_F32, dst0[c], val0);
>>> +      break;
>> Can you use mkMov ? Pretty please :)
> 
> The two are used fairly interchangeably, and a lot of the surrounding
> code uses this style (as you can see in the context lines). I'd rather
> keep it as-is.
> 
IMHO using mkMov makes the code easier to read for noobs like me. There are
only two cases of mkOp1(OP_MOV) and more than a dozen mkMov's. Either way it's
up-to you.

-Emil

>   -ilia
> 

  parent reply	other threads:[~2014-05-21 19:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 23:39 [PATCH 00/12] Cherry-pick nv50/nvc0 patches from gallium-nine Ilia Mirkin
     [not found] ` <1400629206-4447-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2014-05-20 23:39   ` [PATCH 01/12] nv50, nvc0: always pull out bufctx on context destruction Ilia Mirkin
2014-05-20 23:39   ` [PATCH 04/12] nv50/ir/tgsi: TGSI_OPCODE_POW replicates its result Ilia Mirkin
2014-05-21 18:51     ` Emil Velikov
     [not found]       ` <537CF597.4080406-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-21 18:53         ` [Mesa-dev] " Ilia Mirkin
     [not found]           ` <CAKb7Uvj1EomVeAwqFdguuP9xQ1dDkRGDVc9N7239b8O+aL-VrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-21 19:01             ` Emil Velikov [this message]
     [not found]               ` <537CF7F7.1010504-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-21 19:03                 ` Ilia Mirkin
     [not found]                   ` <CAKb7UvgQ3Pz8CUFTGi16x+Ay=0PezJrOuw0kWXLf-rnDeLCgDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-21 19:04                     ` Ilia Mirkin
2014-05-20 23:40   ` [PATCH 06/12] nv50/ir: fix lowering of predicated instructions (without defs) Ilia Mirkin
2014-05-20 23:40   ` [PATCH 08/12] nv50,nvc0: handle guard band defines Ilia Mirkin
2014-05-20 23:40   ` [PATCH 09/12] nv50, nvc0: allow 15, 16, 30 bpp display formats Ilia Mirkin
2014-05-20 23:40   ` [PATCH 10/12] nvc0: use PRIxPTR for sizeof() Ilia Mirkin
2014-05-20 23:40   ` [PATCH 11/12] nvc0: assert that we have vertex elements state Ilia Mirkin
2014-05-20 23:39 ` [PATCH 02/12] nv50: setup scissors on clear_render_target/depth_stencil Ilia Mirkin
     [not found]   ` <1400629206-4447-3-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2014-05-21 18:57     ` [Mesa-dev] " Emil Velikov
     [not found]       ` <537CF70A.4000905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-21 18:59         ` Ilia Mirkin
2014-05-21 19:06           ` Emil Velikov
2014-05-20 23:39 ` [PATCH 03/12] nv50, nvc0: set constbufs dirty on pipe context switch Ilia Mirkin
2014-05-20 23:39 ` [PATCH 05/12] nv50/ir/opt: fix constant folding with saturate modifier Ilia Mirkin
2014-05-20 23:40 ` [PATCH 07/12] nv50/ir/tgsi: optimize KIL Ilia Mirkin
2014-05-20 23:40 ` [PATCH 12/12] nv50: count wrapped textures towards the tex_obj count Ilia Mirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537CF7F7.1010504@gmail.com \
    --to=emil.l.velikov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=christoph.bumiller-D4IDLmZPRBc@public.gmane.org \
    --cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
    --cc=mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=mesa-stable-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.