RWByteAddressBuffer.InterlockedCompareStoreFloatBitwise

Description

Perform a floating-point atomic bitwise compare-and-store operation at byteAddress.

Signature

void RWByteAddressBuffer.InterlockedCompareStoreFloatBitwise(
    uint byteAddress,
    float compareValue,
    float value);

Parameters

byteAddress : uint

The address at which to perform the atomic compare-and-exchange operation.

compareValue : float

The value to perform bitwise comparison to the value at byteAddress.

value : float

The value to store at byteAddress if the comparison is successful.

Remarks

For SPIR-V, this function maps to OpAtomicCompareExchange. For HLSL, this function translates to InterlockedCompareStoreFloatBitwise and requires shader model 6.6. For CUDA, this function maps to atomicCAS.

Availability and Requirements

Defined for the following targets:

hlsl

Available in all stages.

glsl

Available in all stages.

cuda

Available in all stages.

spirv

Available in all stages.

Requires capability: spvInt64Atomics.