Mesa (main): svga: fix shared memory index

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 9 07:47:34 UTC 2022


Module: Mesa
Branch: main
Commit: 704c9b2825c638dfca94aa61cd35d29d72c9fe8f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=704c9b2825c638dfca94aa61cd35d29d72c9fe8f

Author: Charmaine Lee <charmainel at vmware.com>
Date:   Tue Jun  7 20:29:04 2022 -0700

svga: fix shared memory index

State tracker only declares one shared memory for GLSL and all
references to the shared memory are with index 0.
So fix the shared memory index in the declaration to use 0 index.

Fixes spec at arb_compute_shader@execution at shared*

Reviewed-by: Neha Bhende <bhenden at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16930>

---

 src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
index a8b6b5edda5..a61a1b80882 100644
--- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
+++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
@@ -6388,12 +6388,10 @@ emit_memory_declarations(struct svga_shader_emitter_v10 *emit)
       emit_dword(emit, opcode0.value);
       emit_dword(emit, operand0.value);
 
-      /* In current state tracker, TGSI shader declares only one shared memory
-       * TODO: To fix TGSI shader in state tracker to get all shared memory
-       * declarations and then fix following indexing. For now, default index
-       * is 1 as per translated TGSI shader
+      /* Current state tracker only declares one shared memory for GLSL.
+       * Use index 0 for this shared memory.
        */
-      emit_dword(emit, 1);
+      emit_dword(emit, 0);
       emit_dword(emit, emit->key.cs.mem_size); /* byte Count */
       end_emit_instruction(emit);
    }



More information about the mesa-commit mailing list