From 3c455c3532009b4282e47272af51721f19689f87 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 20 Jan 2025 01:36:26 -0800 Subject: [PATCH] brw: Stop using is_send_from_grf() in CSE pass Explicitly list FS_OPCODE_INTERPOLATE_AT_* as allowed, as they were already allowed by the default case. Interlock, memory fence, and barrier were disallowed and remain so. Uniform pull constant load was allowed and remains so. SHADER_OPCODE_SEND and SEND_GATHER get explicit handling. Reviewed-by: Lionel Landwerlin Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_opt_cse.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_opt_cse.cpp b/src/intel/compiler/brw_opt_cse.cpp index f3ef8956f5a..bbddb08446e 100644 --- a/src/intel/compiler/brw_opt_cse.cpp +++ b/src/intel/compiler/brw_opt_cse.cpp @@ -126,14 +126,21 @@ is_expression(const brw_shader *v, const brw_inst *const inst) case SHADER_OPCODE_SIN: case SHADER_OPCODE_COS: case SHADER_OPCODE_LOAD_SUBGROUP_INVOCATION: + case FS_OPCODE_INTERPOLATE_AT_SAMPLE: + case FS_OPCODE_INTERPOLATE_AT_SHARED_OFFSET: + case FS_OPCODE_INTERPOLATE_AT_PER_SLOT_OFFSET: return true; case SHADER_OPCODE_MEMORY_LOAD_LOGICAL: return inst->src[MEMORY_LOGICAL_MODE].ud == MEMORY_MODE_CONSTANT; case SHADER_OPCODE_LOAD_PAYLOAD: return !is_coalescing_payload(*v, inst); + case SHADER_OPCODE_SEND: + case SHADER_OPCODE_SEND_GATHER: + return !inst->send_has_side_effects && + !inst->send_is_volatile && + !inst->eot; default: - return inst->is_send_from_grf() && !inst->has_side_effects() && - !inst->is_volatile(); + return false; } }