From f89e735719a63d674f12a892341ce86e10d82d82 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Tue, 13 Mar 2018 16:58:21 -0700 Subject: [PATCH] intel/compiler: Check for unsupported register sizes. Make sure we don't emit 64 bit types if the hardware doesn't support them. Signed-off-by: Rafael Antognolli Suggested-by: Kenneth Graunke Reviewed-by: Matt Turner --- 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 704d6c9e1d9..60240ba1513 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.30.2