intel/eu/validate/gen12: Don't blow up on indirect src0.
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 18 Apr 2018 00:12:05 +0000 (17:12 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 11 Oct 2019 19:24:16 +0000 (12:24 -0700)
They look like a NULL source if you don't look at the address mode.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_eu_validate.c

index 5e76087a922799818511f9ee7e4cacad04a9cc73..9e9033910b16310d65ac216e0e871665936de5d2 100644 (file)
@@ -170,7 +170,8 @@ dst_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
 static bool
 src0_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
 {
-   return brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
+   return brw_inst_src0_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT &&
+          brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
           brw_inst_src0_da_reg_nr(devinfo, inst) == BRW_ARF_NULL;
 }