mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
intel/gen_decoder: Fix length for Media State/Object commands
From BDW PRM, Volume 6: Command Stream Programming, 'Render Command Header Format'. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
3c77a57222
commit
7c33372f82
1 changed files with 10 additions and 2 deletions
|
|
@ -697,8 +697,16 @@ gen_group_get_length(struct gen_group *group, const uint32_t *p)
|
|||
return field(h, 0, 7) + 2;
|
||||
case 1:
|
||||
return 1;
|
||||
case 2:
|
||||
return 2;
|
||||
case 2: {
|
||||
uint32_t opcode = field(h, 24, 26);
|
||||
assert(opcode < 3 /* 3 and above currently reserved */);
|
||||
if (opcode == 0)
|
||||
return field(h, 0, 7) + 2;
|
||||
else if (opcode < 3)
|
||||
return field(h, 0, 15) + 2;
|
||||
else
|
||||
return 1; /* FIXME: if more opcodes are added */
|
||||
}
|
||||
case 3:
|
||||
return field(h, 0, 7) + 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue