From ebcd8c51dc107559a24eff3a67e33922d30cb905 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 16 Aug 2022 10:33:36 +0200 Subject: [PATCH] r600: Don't use SB with R600 style scratch reads SB fails when handling indirect READ_SCRATCH commands. Fixes: 1d871aa6268159cdc63ef846599456d9ba567206 r600g: Implement spilling of temp arrays (v2) Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/r600_shader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 74bf8182b4a..4f88635e7e4 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -260,6 +260,9 @@ int r600_pipe_shader_create(struct pipe_context *ctx, use_sb &= !shader->shader.uses_images; use_sb &= !shader->shader.uses_helper_invocation; + /* SB can't handle READ_SCRATCH properly */ + use_sb &= !(shader->shader.needs_scratch_space && rscreen->b.gfx_level < R700); + /* sb has bugs in array reg allocation * (dEQP-GLES2.functional.shaders.struct.local.struct_array_dynamic_index_fragment * with NTT)