From 5e9de5317e39c61ed6c8b5910bdb6eb94c22d084 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 5 Aug 2025 23:14:20 -0700 Subject: [PATCH] brw: Validate that send payloads can't be imms or have source mods To ensure we haven't missed resolving these things. Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_validate.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/intel/compiler/brw_validate.cpp b/src/intel/compiler/brw_validate.cpp index 83eb73ba404..1ec66e42349 100644 --- a/src/intel/compiler/brw_validate.cpp +++ b/src/intel/compiler/brw_validate.cpp @@ -316,8 +316,15 @@ brw_validate(const brw_shader &s) fsv_assert(inst->sources == SEND_NUM_SRCS); fsv_assert(is_uniform(inst->src[SEND_SRC_DESC])); fsv_assert(is_uniform(inst->src[SEND_SRC_EX_DESC])); + fsv_assert(inst->src[SEND_SRC_PAYLOAD1].file != BAD_FILE); fsv_assert(inst->ex_mlen > 0 || inst->src[SEND_SRC_PAYLOAD2].file == BAD_FILE); + /* Send payloads cannot be immediates nor have source modifiers */ + for (unsigned i = 0; i < 2; i++) { + fsv_assert(inst->src[SEND_SRC_PAYLOAD1 + i].file != IMM); + fsv_assert(!inst->src[SEND_SRC_PAYLOAD1 + i].abs); + fsv_assert(!inst->src[SEND_SRC_PAYLOAD1 + i].negate); + } break; case SHADER_OPCODE_SEND_GATHER: