[Mesa-dev] [PATCH 12/23] i965/disasm: Actually disassemble Gen7+ URB opcodes.

Kenneth Graunke kenneth at whitecape.org
Mon Jun 30 11:02:21 PDT 2014


On Monday, June 30, 2014 10:20:13 AM Kristian Høgsberg wrote:
> On Sat, Jun 28, 2014 at 09:33:51PM -0700, Kenneth Graunke wrote:
> > I never bothered implementing the disassembler for Gen7+ URB opcodes, so
> > we were just disassembling them as Ironlake/Sandybridge ones.  This
> > looked pretty bad when running Paul's GS EndPrimitive tests, as the
> > "write OWord" message was decoded at ff_sync, which doesn't exist.
> > 
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > ---
> > 
> >  src/mesa/drivers/dri/i965/brw_disasm.c | 22 +++++++++++++++++++---
> >  1 file changed, 19 insertions(+), 3 deletions(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c
> > b/src/mesa/drivers/dri/i965/brw_disasm.c index 14cb687..4e75cc7 100644
> > --- a/src/mesa/drivers/dri/i965/brw_disasm.c
> > +++ b/src/mesa/drivers/dri/i965/brw_disasm.c
> > @@ -478,11 +478,24 @@ static const char *const math_precision[2] = {
> > 
> >     [1] = "partial_precision"
> >  
> >  };
> > 
> > -static const char *const urb_opcode[2] = {
> > +static const char *const gen5_urb_opcode[] = {
> > 
> >     [0] = "urb_write",
> >     [1] = "ff_sync",
> >  
> >  };
> > 
> > +static const char *const gen7_urb_opcode[] = {
> > +   [0] = "write HWord",
> > +   [1] = "write OWord",
> > +   [2] = "read HWord",
> > +   [3] = "read OWord",
> > +   [4] = "atomic mov",  /* Gen7+ */
> > +   [5] = "atomic inc",  /* Gen7+ */
> > +   [6] = "atomic add",  /* Gen8+ */
> > +   [7] = "SIMD8 write", /* Gen8+ */
> > +   [8] = "SIMD8 read",  /* Gen8+ */
> > +   /* [9-15] - reserved */
> > +};
> 
> Do we have defines for these opcodes?  They stand out a bit now that
> all the rest are using opcode names in the array initializer.
> 
> Either way, not worth blocking this disasm improvement on,
> 
> Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

Only for 0 and 1 (write HWord/OWord).  The rest aren't used yet, so we never 
actually added #defines.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140630/9ea9ccb1/attachment.sig>


More information about the mesa-dev mailing list