mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
i965: Actually check whether the opcode is supported.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
667408b889
commit
0ff4912cf4
2 changed files with 3 additions and 4 deletions
|
|
@ -583,7 +583,6 @@ gen_from_devinfo(const struct brw_device_info *devinfo)
|
|||
|
||||
/* Return the matching opcode_desc for the specified opcode number and
|
||||
* hardware generation, or NULL if the opcode is not supported by the device.
|
||||
* XXX -- Actually check whether the opcode is supported.
|
||||
*/
|
||||
const struct opcode_desc *
|
||||
brw_opcode_desc(const struct brw_device_info *devinfo, enum opcode opcode)
|
||||
|
|
@ -591,7 +590,8 @@ brw_opcode_desc(const struct brw_device_info *devinfo, enum opcode opcode)
|
|||
if (opcode >= ARRAY_SIZE(opcode_descs))
|
||||
return NULL;
|
||||
|
||||
if (opcode_descs[opcode].name)
|
||||
enum gen gen = gen_from_devinfo(devinfo);
|
||||
if ((opcode_descs[opcode].gens & gen) != 0)
|
||||
return &opcode_descs[opcode];
|
||||
else
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -121,8 +121,7 @@ static bool
|
|||
is_unsupported_inst(const struct brw_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
int gen = gen_from_devinfo(devinfo);
|
||||
return (opcode_descs[brw_inst_opcode(devinfo, inst)].gens & gen) == 0;
|
||||
return brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)) == NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue