Implement the InterlockedMin
HLSL Function
#99123
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.
InterlockedMin
clang builtin,InterlockedMin
clang builtin withhlsl_intrinsics.h
InterlockedMin
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
InterlockedMin
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/InterlockedMin.hlsl
clang/test/SemaHLSL/BuiltIns/InterlockedMin-errors.hlsl
int_dx_InterlockedMin
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_InterlockedMin
to160
inDXIL.td
InterlockedMin.ll
andInterlockedMin_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_InterlockedMin
intrinsic inIntrinsicsSPIRV.td
InterlockedMin
lowering and map it toint_spv_InterlockedMin
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/InterlockedMin.ll
DirectX
SPIR-V
OpAtomicSMin:
Description:
Perform the following steps atomically with respect to any other atomic
accesses within Scope to the same location:
Value and Value, and
The instruction’s result is the Original Value.
Result Type must be an integer type scalar.
The type of Value must be the same as Result Type. The type of the
value pointed to by Pointer must be the same as Result Type.
Memory is a memory Scope.
7
236
<id>
Result Type
Result <id>
<id>
Pointer
Scope <id>
Memory
Memory Semantics <id>
Semantics
<id>
Value
Test Case(s)
Example 1
Example 2
Example 3
Example 4
HLSL:
Performs a guaranteed atomic min.
Syntax
Parameters
dest [in]
Type: R
The destination address.
value [in]
Type: T
The input value.
original_value [out]
Type: T
Optional. The original input value.
Return value
This function does not return a value.
Remarks
This operation can only be performed on int and uint typed resources and shared memory variables. There are two possible uses for this function. The first is when R is a shared memory variable type. In this case, the function performs an atomic min of value to the shared memory register referenced by dest. The second scenario is when R is a resource variable type. In this scenario, the function performs an atomic min of value to the resource location referenced by dest. The overloaded function has an additional output variable which will be set to the original value of dest. This overloaded operation is only available when R is readable and writable.
Interlocked operations do not imply any memory fence/barrier.
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: