From f8117f70519e0bb864fe1f324b7376a07fc0fe23 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 2 Sep 2020 15:24:01 -0500 Subject: [PATCH] intel/fs: Allow constant-propagation into SAMPLEINFO and IMAGE_SIZE Without this, we end up with indirect sampler messages all the time because we don't propagate the texture/image BTI. This makes debugging shaders with imageSize or textureSamples in them a pain. Shader-db results on Ice Lake: total instructions in shared programs: 19720612 -> 19720564 (<.01%) instructions in affected programs: 4998 -> 4950 (-0.96%) helped: 12 HURT: 0 All affected shaders were compute shaders in Deus Ex: Mankind Divided. Reviewed-by: Kenneth Graunke Part-of: --- src/intel/compiler/brw_fs_copy_propagation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/compiler/brw_fs_copy_propagation.cpp b/src/intel/compiler/brw_fs_copy_propagation.cpp index 31e55e64a27..917c3abfe9e 100644 --- a/src/intel/compiler/brw_fs_copy_propagation.cpp +++ b/src/intel/compiler/brw_fs_copy_propagation.cpp @@ -866,6 +866,8 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) case SHADER_OPCODE_LOD_LOGICAL: case SHADER_OPCODE_TG4_LOGICAL: case SHADER_OPCODE_TG4_OFFSET_LOGICAL: + case SHADER_OPCODE_SAMPLEINFO_LOGICAL: + case SHADER_OPCODE_IMAGE_SIZE_LOGICAL: case SHADER_OPCODE_UNTYPED_ATOMIC_LOGICAL: case SHADER_OPCODE_UNTYPED_ATOMIC_FLOAT_LOGICAL: case SHADER_OPCODE_UNTYPED_SURFACE_READ_LOGICAL: