From 6b6aeeecbbd8ef7e603444a634bb2470ca64395d Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Sat, 28 May 2022 22:20:08 +0800 Subject: [PATCH] radeonsi: set uses_vmem_load_other for nir_intrinsic_load_buffer_amd MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Before lower TES load input to load buffer, mark this flag for this intrinsic, otherwise we get corruption with GFX10 after the lowering. Reviewed-by: Marek Olšák Acked-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Timur Kristóf Signed-off-by: Qiang Yu Part-of: --- src/gallium/drivers/radeonsi/si_shader_info.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_info.c b/src/gallium/drivers/radeonsi/si_shader_info.c index f4d94f0..68dc0f8 100644 --- a/src/gallium/drivers/radeonsi/si_shader_info.c +++ b/src/gallium/drivers/radeonsi/si_shader_info.c @@ -435,13 +435,6 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info if (!nir_src_is_const(intr->src[1])) info->uses_vmem_load_other = true; break; - case nir_intrinsic_load_constant: - info->uses_vmem_load_other = true; - break; - - case nir_intrinsic_load_barycentric_at_sample: /* This loads sample positions. */ - info->uses_vmem_load_other = true; - break; case nir_intrinsic_load_input: case nir_intrinsic_load_input_vertex: @@ -451,6 +444,12 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info info->uses_vmem_load_other = true; break; + case nir_intrinsic_load_constant: + case nir_intrinsic_load_barycentric_at_sample: /* This loads sample positions. */ + case nir_intrinsic_load_buffer_amd: + info->uses_vmem_load_other = true; + break; + default: if (is_image || is_bindless_image || -- 2.7.4