brw: Add EU validation for ROR/ROL

And remove asserts() in generator.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
This commit is contained in:
Caio Oliveira
2025-12-02 15:33:56 -08:00
committed by Marge Bot
parent 47d8ed1177
commit 55863c1267
2 changed files with 9 additions and 2 deletions

View File

@@ -2281,6 +2281,15 @@ instruction_restrictions(const struct brw_isa_info *isa,
ERROR_IF(!src_has_scalar_region(inst, 0),
"LINE/PLN source 0 must be a scalar.");
}
if (inst->opcode == BRW_OPCODE_ROR ||
inst->opcode == BRW_OPCODE_ROL) {
ERROR_IF(inst->dst.type != BRW_TYPE_UD &&
inst->dst.type != BRW_TYPE_UW,
"ROR/ROL dst type must be either UD or UW.");
ERROR_IF(inst->dst.type != inst->src[0].type,
"ROR/ROL src0 and dst must be of same datatype precision.");
}
}
static void

View File

@@ -1005,12 +1005,10 @@ brw_generator::generate_code(const brw_shader &s,
break;
case BRW_OPCODE_ROL:
assert(devinfo->ver >= 11);
assert(src[0].type == dst.type);
brw_ROL(p, dst, src[0], src[1]);
break;
case BRW_OPCODE_ROR:
assert(devinfo->ver >= 11);
assert(src[0].type == dst.type);
brw_ROR(p, dst, src[0], src[1]);
break;
case BRW_OPCODE_CMP: