On 2017-05-16 15:45:12, Jason Ekstrand wrote: > These need special handling because they have no "DWord Length" > parameter and they have an unusual bias of 1. > --- > src/intel/common/gen_decoder.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c > index e1a2fcf..6bb9a7a 100644 > --- a/src/intel/common/gen_decoder.c > +++ b/src/intel/common/gen_decoder.c > @@ -706,9 +706,12 @@ gen_group_get_length(struct gen_group *group, const > uint32_t *p) > case 3: /* Render */ { > uint32_t subtype = field(h, 27, 28); > uint32_t opcode = field(h, 24, 26); > + uint16_t whole_opcode = field(h, 16, 31); > switch (subtype) { > case 0: > - if (opcode < 2) > + if (whole_opcode == 0x6104)
How about a comment? if (whole_opcode == 0x6104 /* PIPELINE_SELECT_965 */) We could also put all the special case values in a switch at the top of the function to keep them out of the more logical decoding paths here. Reviewed-by: Jordan Justen <jordan.l.jus...@intel.com> > + return 1; > + else if (opcode < 2) > return field(h, 0, 7) + 2; > else > return -1; > @@ -726,7 +729,9 @@ gen_group_get_length(struct gen_group *group, const > uint32_t *p) > return -1; > } > case 3: > - if (opcode < 4) > + if (whole_opcode == 0x780b) > + return 1; > + else if (opcode < 4) > return field(h, 0, 7) + 2; > else > return -1; > -- > 2.5.0.400.gff86faf > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev