diff options
author | Rohan Garg <rohan.garg@collabora.com> | 2021-09-01 17:20:57 +0200 |
---|---|---|
committer | Rohan Garg <rohan.garg@collabora.com> | 2021-09-03 11:49:01 +0200 |
commit | 161de6096d6b823b59689adee711a3ae5339ccd3 (patch) | |
tree | 15217107ce2cbf6a1694ecb0485e3e0cf1bce5ec | |
parent | 60648d4a6354901ce49412f953191cc738c08c68 (diff) | |
download | virglrenderer-161de6096d6b823b59689adee711a3ae5339ccd3.tar.gz |
shader: Emit the right GLSL function when dealing with TGSI_MEMBAR_ATOMIC_BUFFER
The GLSL spec does not mention a memoryBarrierAtomic function, and the
GLSL to TGSI compiler indicates that a TGSI_MEMBAR_ATOMIC_BUFFER is
created from GLSL's memoryBarrierAtomicCounter.
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/blob/526f7d779071e432a1205d62acd81d8d7f0c2f47/src/mesa/state_tracker/st_glsl_to_tgsi.cpp#L3737
This fixes:
KHR-GL43.compute_shader.shared-struct
Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
-rw-r--r-- | src/vrend_shader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vrend_shader.c b/src/vrend_shader.c index f03e1356..2a02bffe 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -5464,7 +5464,7 @@ iter_instruction(struct tgsi_iterate_context *iter, emit_buf(&ctx->glsl_strbufs, "memoryBarrierBuffer();\n"); } if (val & TGSI_MEMBAR_ATOMIC_BUFFER) { - emit_buf(&ctx->glsl_strbufs, "memoryBarrierAtomic();\n"); + emit_buf(&ctx->glsl_strbufs, "memoryBarrierAtomicCounter();\n"); } if (val & TGSI_MEMBAR_SHADER_IMAGE) { emit_buf(&ctx->glsl_strbufs, "memoryBarrierImage();\n"); |