diff --git a/src/intel/compiler/brw_fs_lower_regioning.cpp b/src/intel/compiler/brw_fs_lower_regioning.cpp index 93991a48c92..7307ec9d6f2 100644 --- a/src/intel/compiler/brw_fs_lower_regioning.cpp +++ b/src/intel/compiler/brw_fs_lower_regioning.cpp @@ -380,6 +380,22 @@ namespace { } } + /** + * Return whether the instruction has an unsupported type conversion + * that must be handled by expanding the source operand. + */ + bool + has_invalid_src_conversion(const intel_device_info *devinfo, + const fs_inst *inst) + { + /* Scalar byte to float conversion is not allowed on DG2+ */ + return devinfo->verx10 >= 125 && + inst->opcode == BRW_OPCODE_MOV && + brw_type_is_float(inst->dst.type) && + brw_type_size_bits(inst->src[0].type) == 8 && + is_uniform(inst->src[0]); + } + /* * Return whether the instruction has unsupported source modifiers * specified for the i-th source region. @@ -392,7 +408,8 @@ namespace { (inst->src[i].negate || inst->src[i].abs)) || ((has_invalid_exec_type(devinfo, inst) & (1u << i)) && (inst->src[i].negate || inst->src[i].abs || - inst->src[i].type != get_exec_type(inst))); + inst->src[i].type != get_exec_type(inst))) || + has_invalid_src_conversion(devinfo, inst); } /*