mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +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>
This commit is contained in:
parent
01ed71f945
commit
55baf0c676
1 changed files with 7 additions and 5 deletions
|
|
@ -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