DirectX HLSL intrinsic functions for Shader Model 5.0

Shader Model 5.0 に対応した DirectX HLSL だと, Compute Shader 用にアトミック操作やスレッドやグループの同期を行うための関数がサポートされています.

DirectX HLSL intrinsic functions for Shader Model 5.0 supports atomic functions and barrier operations for group and threads used for Compute Shader.

  • AllMemoryBarrier()
    • Blocks execution of all threads in a group until all memory accesses have been completed.
  • AllMemoryBarrierWithGroupSync()
    • 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.
  • DeviceMemoryBarrier()
    • Blocks execution of all threads in a group until all device memory accesses have been completed.
  • DeviceMemoryBarrierWithGroupSync()
    • Blocks execution of all threads in a group until all device memory accesses have been completed and all threads in the group have reached this call.
  • InterlockedAdd()
    • Performs a guaranteed atomic add of value to the dest resource variable.
  • InterlockedAnd()
    • Performs a guaranteed atomic and.
  • InterlockedCompareExchange()
    • Atomically compares the input to the comparison value and exchanges the result.
  • InterlockedCompareStore()
    • Atomically compares the input to the comparison value.
  • InterlockedExchange()
    • Assigns value to dest and returns the original value.
  • InterlockedMax()
    • Performs a guaranteed atomic max.
  • InterlockedMin()
    • Performs a guaranteed atomic min.
  • InterlockedOr()
    • Performs a guaranteed atomic or.
  • InterlockedXor()
    • Performs a guaranteed atomic xor.