All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kenneth Graunke <kenneth@whitecape.org>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] render/gen7: Don't use a message register to store vl
Date: Thu, 14 Feb 2013 08:52:16 -0800	[thread overview]
Message-ID: <511D1640.8060208@whitecape.org> (raw)
In-Reply-To: <1360851619-2664-1-git-send-email-damien.lespiau@intel.com>

On 02/14/2013 06:20 AM, Damien Lespiau wrote:
> Turns out the "new" assembler that uses mesa's opcode emission hits the
> path that automatically transforms MRF registers into GRF ones in the
> exa_wm_src_projective shader.
>
> The diff with the new assembler is:
>
> $ intel-gen4disasm -g7 -
> -   { 0x00600041, 0x208077be, 0x008d03c0, 0x008d0180 },
> +   { 0x00600041, 0x2e8077bd, 0x008d03c0, 0x008d0180 },
> mul(8)      m4<1>F          g30<8,8,1>F     g12<8,8,1>F     { align1 };
> mul(8)      g116<1>F        g30<8,8,1>F     g12<8,8,1>F     { align1 };
>
> Of course, message registers are no more in gen7, so the shader is
> trying to do something shaddy (ahem!).
>
> Instead of using m4, let's make exa_wm_src_projective use g68 for v (aka
> vl) which makes sense since:
>
> 1/ vh is g69
> 2/ exa_wm_src_affine uses g68 for vl already
>
> This commit changes the generated assembly, here's the decoded diff:
>
> $ intel-gen4disasm -g7 -
> -   { 0x00600041, 0x208077be, 0x008d03c0, 0x008d0180 },
> +   { 0x00600041, 0x288077bd, 0x008d03c0, 0x008d0180 },
> mul(8)      m4<1>F          g30<8,8,1>F     g12<8,8,1>F     { align1 };
> mul(8)      g68<1>F         g30<8,8,1>F     g12<8,8,1>F     { align1 };
>
> Cc: Kenneth Graunke <kenneth@whitecape.org>
> Reported-by: Xiang, Haihao <haihao.xiang@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

If I recall correctly, the only actual changes between the Gen6 and Gen7 
render assembly was converting MRFs to GRFs, and I arbitrarily picked 
something in the 60s rather than 112+.  If you want, I think you could 
actually just delete all the Gen7 custom assembly and let 
gen7_convert_mrf_to_grf do it for you.

But this looks okay to me, if you'd rather continue doing everything 
explicitly...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

  reply	other threads:[~2013-02-14 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 14:20 [PATCH] render/gen7: Don't use a message register to store vl Damien Lespiau
2013-02-14 16:52 ` Kenneth Graunke [this message]
2013-02-18 13:49   ` Chris Wilson

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=511D1640.8060208@whitecape.org \
    --to=kenneth@whitecape.org \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.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.