intel/compiler: Check for unsupported register sizes.
authorRafael Antognolli <rafael.antognolli@intel.com>
Tue, 13 Mar 2018 23:58:21 +0000 (16:58 -0700)
committerRafael Antognolli <rafael.antognolli@intel.com>
Fri, 16 Mar 2018 16:27:16 +0000 (09:27 -0700)
Make sure we don't emit 64 bit types if the hardware doesn't support
them.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/intel/compiler/brw_reg_type.c

index 704d6c9e1d94b745eab723bb997e5cea1f01a4d8..60240ba1513666839f054728a5462f542d644b26 100644 (file)
@@ -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;