[Mesa-dev] [PATCH 09/15] i965: Add a new representation for Broadwell shader instructions.

Kenneth Graunke kenneth at whitecape.org
Mon Nov 18 15:38:12 PST 2013

On 11/18/2013 03:22 PM, Kenneth Graunke wrote:
> On 11/18/2013 12:27 PM, Eric Anholt wrote:
>> I think the old structs worked OK, and there are
>> some minor downsides to access-everything-through-methods, like being
>> unable to just print the instruction in gdb and see fields all at once,
> Huh.  I've never done that.  Is that something you actually do?  I
> imagine looking at the raw dump would be pretty huge, and a
> pretty-printer/disassembler would always be more useful...

In particular,
(gdb) p p->store[0]

prints 114 lines of text in a format that I find basically unreadable.
It also contains information in a redundant form, with sections that
only apply to G45, or Sandybridge, or...

So I'm having a hard time believing this is what you want.  I think a
print function which does something like:

opcode:       0x84
pad:          0
access_mode:  1
mask_control: 0

might be more useful...

(gdb) p p->store[0].header

prints a lot less data, and is pretty readable...

Or am I misunderstanding entirely?

More information about the mesa-dev mailing list