From 36d0485ae45124b736e50e421babe775be4912bc Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 2 Jan 2025 01:27:07 -0800 Subject: [PATCH] brw: Allow CSE of MEMORY_MODE_CONSTANT loads This matches the behavior of FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_opt_cse.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/compiler/brw_opt_cse.cpp b/src/intel/compiler/brw_opt_cse.cpp index a2825ec8023..4508da2b023 100644 --- a/src/intel/compiler/brw_opt_cse.cpp +++ b/src/intel/compiler/brw_opt_cse.cpp @@ -121,6 +121,8 @@ is_expression(const fs_visitor *v, const fs_inst *const inst) case SHADER_OPCODE_COS: case SHADER_OPCODE_LOAD_SUBGROUP_INVOCATION: 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->devinfo, v->alloc, inst); default: