Open
Description
- Implement
InterlockedCompareStoreFloatBitwise
clang builtin, - Link
InterlockedCompareStoreFloatBitwise
clang builtin withhlsl_intrinsics.h
- Add sema checks for
InterlockedCompareStoreFloatBitwise
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
- Add codegen for
InterlockedCompareStoreFloatBitwise
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
- Add codegen tests to
clang/test/CodeGenHLSL/builtins/InterlockedCompareStoreFloatBitwise.hlsl
- Add sema tests to
clang/test/SemaHLSL/BuiltIns/InterlockedCompareStoreFloatBitwise-errors.hlsl
- Create the
int_dx_InterlockedCompareStoreFloatBitwise
intrinsic inIntrinsicsDirectX.td
- Create the
DXILOpMapping
ofint_dx_InterlockedCompareStoreFloatBitwise
to79
inDXIL.td
- Create the
InterlockedCompareStoreFloatBitwise.ll
andInterlockedCompareStoreFloatBitwise_errors.ll
tests inllvm/test/CodeGen/DirectX/
DirectX
DXIL Opcode | DXIL OpName | Shader Model | Shader Stages |
---|---|---|---|
79 | AtomicCompareExchange | 6.0 | () |
SPIR-V
There is no support for InterlockedCompareStoreFloatBitwise
when targeting SPIR-V.
Test Case(s)
Example 1
//dxc InterlockedCompareStoreFloatBitwise_test.hlsl -T lib_6_8 -enable-16bit-types -O0
RWStructuredBuffer<float> buffer : register(u0);
[numthreads(1, 1, 1)]
export void fn(uint3 dispatchThreadID : SV_DispatchThreadID, float p1, float p2) {
int index = dispatchThreadID.x;
return InterlockedCompareStoreFloatBitwise(buffer[index], p1, p2);
}
HLSL:
Syntax
void InterlockedCompareStoreFloatBitwise(float32_only result, float compare, float value);
void InterlockedCompareStoreFloatBitwise(uint byteOffest, float compare, float value);
Type Description
Name | Template Type | Component Type | Size |
---|---|---|---|
ret | void | void | 0 |
result | scalar | float | 1 |
compare | scalar | float | 1 |
value | scalar | float | 1 |
Type Description
Name | Template Type | Component Type | Size |
---|---|---|---|
ret | void | void | 0 |
byteOffest | scalar | uint | 1 |
compare | scalar | float | 1 |
value | scalar | float | 1 |
Minimum Shader Model
This function is supported in the following shader models.
Shader Model | Supported |
---|---|
Shader Model 6.3 and higher shader models | yes |
Shader Stages
See also
Metadata
Metadata
Assignees
Type
Projects
Status
No status