From aa7c59e02cfffa70cac83b2c126fbb5bd313ff6c Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 16 Oct 2024 10:04:06 +1100 Subject: [PATCH] nir/glsl: set deref cast mode for blocks during function inlining MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit More cast fixes this time for UBO and SSBO. Which were missing testing previously. Fixes: d681cf96fbf9 ("nir/glsl: set deref cast mode during function inlining") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11587 Reviewed-by: Marek Olšák Part-of: --- src/compiler/nir/nir_functions.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_functions.c b/src/compiler/nir/nir_functions.c index 4423ef593d1..3ad986f6979 100644 --- a/src/compiler/nir/nir_functions.c +++ b/src/compiler/nir/nir_functions.c @@ -67,6 +67,10 @@ fixup_cast_deref_mode(nir_deref_instr *deref) deref->modes |= nir_var_uniform; } else if (parent->modes & nir_var_image) { deref->modes |= nir_var_image; + } else if (parent->modes & nir_var_mem_ubo) { + deref->modes |= nir_var_mem_ubo; + } else if (parent->modes & nir_var_mem_ssbo) { + deref->modes |= nir_var_mem_ssbo; } else return;