diff options
author | Matt Turner <[email protected]> | 2016-11-08 15:42:01 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2017-01-20 11:40:52 -0800 |
commit | a693305b61b1183d18699240b40a0a62c5c07381 (patch) | |
tree | 7cb17a6043948061bc780de361126624037acf61 /src/mesa/drivers/dri | |
parent | f0429359cc8a9d5bdc1f76f2107bf1df151b123c (diff) |
i965: Structure code so unsupported inst will not generate more errors.
We want to rely on brw_opcode_desc() always returning non-NULL in other
validation functions. Other validation functions will be in the else
case of the block added in this patch.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_validate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c index 322538637ca..d3c15da8c55 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_validate.c +++ b/src/mesa/drivers/dri/i965/brw_eu_validate.c @@ -46,6 +46,7 @@ cat(struct string *dest, const struct string src) #define error(str) "\tERROR: " str "\n" +#define ERROR(msg) ERROR_IF(true, msg) #define ERROR_IF(cond, msg) \ do { \ if (cond) { \ @@ -168,8 +169,10 @@ brw_validate_instructions(const struct brw_codegen *p, int start_offset, break; } - ERROR_IF(is_unsupported_inst(devinfo, inst), - "Instruction not supported on this Gen"); + if (is_unsupported_inst(devinfo, inst)) { + ERROR("Instruction not supported on this Gen"); + } else { + } if (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_SEND) { ERROR_IF(brw_inst_src0_address_mode(devinfo, inst) != |