[Mesa-dev] [PATCH] intel/compiler: Check for unsupported register sizes.
Rafael Antognolli
rafael.antognolli at intel.com
Tue Mar 13 23:58:21 UTC 2018
Make sure we don't emit 64 bit types if the hardware doesn't support
them.
Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
Suggested-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/intel/compiler/brw_reg_type.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/intel/compiler/brw_reg_type.c b/src/intel/compiler/brw_reg_type.c
index 3c82eb0a76f..9fe4214972c 100644
--- a/src/intel/compiler/brw_reg_type.c
+++ b/src/intel/compiler/brw_reg_type.c
@@ -204,6 +204,9 @@ brw_reg_type_to_hw_type(const struct gen_device_info *devinfo,
table = gen4_hw_type;
}
+ assert(devinfo->has_64bit_types || brw_reg_type_to_size(type) < 8 ||
+ type == BRW_REGISTER_TYPE_NF);
+
if (file == BRW_IMMEDIATE_VALUE) {
assert(table[type].imm_type != (enum hw_imm_type)INVALID);
return table[type].imm_type;
--
2.14.3
More information about the mesa-dev
mailing list