mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 04:20:26 +01:00
zink: fix tcs control barriers for use without vk memory model
these are translated into memory+control barriers in nir, and only
the control barrier needs to be handled
these semantics match what glslang does, so they must be right
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
(cherry picked from commit 55baf0c676)
This commit is contained in:
parent
de0c61c03b
commit
5286bd22d8
2 changed files with 8 additions and 6 deletions
|
|
@ -328,7 +328,7 @@
|
|||
"description": "zink: fix tcs control barriers for use without vk memory model",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2913,8 +2913,7 @@ emit_intrinsic(struct ntv_context *ctx, nir_intrinsic_instr *intr)
|
|||
break;
|
||||
|
||||
case nir_intrinsic_memory_barrier_tcs_patch:
|
||||
spirv_builder_emit_memory_barrier(&ctx->builder, SpvScopeWorkgroup,
|
||||
SpvMemorySemanticsOutputMemoryMask | SpvMemorySemanticsReleaseMask);
|
||||
/* handled by subsequent nir_intrinsic_control_barrier */
|
||||
break;
|
||||
|
||||
case nir_intrinsic_memory_barrier:
|
||||
|
|
@ -2942,9 +2941,12 @@ emit_intrinsic(struct ntv_context *ctx, nir_intrinsic_instr *intr)
|
|||
break;
|
||||
|
||||
case nir_intrinsic_control_barrier:
|
||||
spirv_builder_emit_control_barrier(&ctx->builder, SpvScopeWorkgroup,
|
||||
SpvScopeWorkgroup,
|
||||
SpvMemorySemanticsWorkgroupMemoryMask | SpvMemorySemanticsAcquireMask);
|
||||
if (ctx->stage == MESA_SHADER_COMPUTE)
|
||||
spirv_builder_emit_control_barrier(&ctx->builder, SpvScopeWorkgroup,
|
||||
SpvScopeWorkgroup,
|
||||
SpvMemorySemanticsWorkgroupMemoryMask | SpvMemorySemanticsAcquireMask);
|
||||
else
|
||||
spirv_builder_emit_control_barrier(&ctx->builder, SpvScopeWorkgroup, SpvScopeInvocation, 0);
|
||||
break;
|
||||
|
||||
case nir_intrinsic_interp_deref_at_centroid:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue