aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_eu_compact.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2020-01-06 13:17:49 -0800
committerMarge Bot <[email protected]>2020-01-22 00:19:20 +0000
commit0b70d46f7a614888e999bfda443636c9bc1d8d97 (patch)
tree15b035b648a095eae9631fea108f6a8285477b38 /src/intel/compiler/brw_eu_compact.c
parentab7c25b9aa241b2754a48fc04fd4752a511b7a2c (diff)
intel/compiler: Add a INVALID_{,HW_}REG_TYPE macros
Since the enum brw_reg_type is packed, comparisons with -1 don't work directly, necessitating the cast. Add a macro to avoid this confusion. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2635>
Diffstat (limited to 'src/intel/compiler/brw_eu_compact.c')
-rw-r--r--src/intel/compiler/brw_eu_compact.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_eu_compact.c b/src/intel/compiler/brw_eu_compact.c
index 4d2e617b3ed..7c42aeec3dd 100644
--- a/src/intel/compiler/brw_eu_compact.c
+++ b/src/intel/compiler/brw_eu_compact.c
@@ -1512,10 +1512,10 @@ has_immediate(const struct gen_device_info *devinfo, const brw_inst *inst,
{
if (brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE) {
*type = brw_inst_src0_type(devinfo, inst);
- return *type != (enum brw_reg_type)-1;
+ return *type != INVALID_REG_TYPE;
} else if (brw_inst_src1_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE) {
*type = brw_inst_src1_type(devinfo, inst);
- return *type != (enum brw_reg_type)-1;
+ return *type != INVALID_REG_TYPE;
}
return false;