Implement the AllMemoryBarrierWithGroupSync
HLSL Function
#99090
Labels
backend:DirectX
backend:SPIR-V
bot:HLSL
HLSL
HLSL Language Support
metabug
Issue to collect references to a group of similar or related issues.
AllMemoryBarrierWithGroupSync
clang builtin,AllMemoryBarrierWithGroupSync
clang builtin withhlsl_intrinsics.h
AllMemoryBarrierWithGroupSync
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
AllMemoryBarrierWithGroupSync
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/AllMemoryBarrierWithGroupSync.hlsl
clang/test/SemaHLSL/BuiltIns/AllMemoryBarrierWithGroupSync-errors.hlsl
int_dx_AllMemoryBarrierWithGroupSync
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_AllMemoryBarrierWithGroupSync
to80
inDXIL.td
AllMemoryBarrierWithGroupSync.ll
andAllMemoryBarrierWithGroupSync_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_AllMemoryBarrierWithGroupSync
intrinsic inIntrinsicsSPIRV.td
AllMemoryBarrierWithGroupSync
lowering and map it toint_spv_AllMemoryBarrierWithGroupSync
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/AllMemoryBarrierWithGroupSync.ll
DirectX
SPIR-V
OpControlBarrier:
Description:
Wait for all active invocations within the specified
Scope to reach the current point of execution.
All active invocations within Execution scope reach
this point of execution before any invocation proceeds beyond it.
When Execution is Workgroup or larger, behavior is undefined
unless all invocations within Execution execute the same dynamic
instance of this instruction.
If Semantics is not None, this instruction also serves as an
OpMemoryBarrier instruction, and also performs
and adheres to the description and semantics of an OpMemoryBarrier
instruction with the same Memory and Semantics operands. This allows
atomically specifying both a control barrier and a memory barrier (that
is, without needing two instructions). If Semantics is None,
Memory is ignored.
Before version 1.3, it is only valid to use this instruction with
TessellationControl, GLCompute, or Kernel execution
models. There is no such restriction starting with
version 1.3.
If used with the TessellationControl execution
model, it also implicitly synchronizes the Output
Storage Class: Writes to Output variables
performed by any invocation executed prior to a OpControlBarrier are
visible to any other invocation proceeding beyond that
OpControlBarrier.
4
224
Scope <id>
Execution
Scope <id>
Memory
Memory Semantics <id>
Semantics
Test Case(s)
Example 1
HLSL:
Blocks execution of all threads in a group until all memory accesses have been completed and all threads in the group have reached this call.
Syntax
void AllMemoryBarrierWithGroupSync(void);
Parameters
This function has no parameters.
Return value
This function does not return a value.
Remarks
A memory barrier guarantees that outstanding memory operations have completed. Threads are synchronized at GroupSync barriers. This may stall a thread or threads if memory operations are in progress.
The behavior of calls to this function that are within diverging branches of a thread group are undefined.
Minimum Shader Model
This function is supported in the following shader models.
This function is supported in the following types of shaders:
See also
Intrinsic Functions
Shader Model 5
The text was updated successfully, but these errors were encountered: