Skip to content

Latest commit

 

History

History
95 lines (60 loc) · 2.16 KB

sm5-object-rwbyteaddressbuffer-interlockedor.md

File metadata and controls

95 lines (60 loc) · 2.16 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location
RWByteAddressBuffer::InterlockedOr function
Performs an atomic OR on the value.
3a05619b-db97-4cf1-af3c-12c376e605a6
InterlockedOr function HLSL
apiref
InterlockedOr
NA
reference
05/31/2018

InterlockedOr function

Performs an atomic OR on the value.

Syntax

void InterlockedOr(
  in  UINT dest,
  in  UINT value,
  out UINT original_value
);

Parameters

dest [in]

Type: UINT

The destination address.

value [in]

Type: UINT

The input value.

original_value [out]

Type: UINT

The original value.

Return value

Nothing

Remarks

This operation can be performed only on INT or UINT typed resources and shared memory variables. There are three possible uses for this function. The first is when R is a shared memory variable type. In this case, the function performs an atomic OR with the value of 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 OR with the value of the resource location referenced by dest. Finally, the third scenario is when R is a local variable type. In this scenario, the function reduces to an OR with the values of dest and value. The result of the operation replaces the value of dest. The overloaded function has an additional output variable, which will be set to the original value of dest. This overloaded operation is available only when R is readable and writable.

This function is supported in the following types of shaders:

VS HS DS GS PS CS
x x x x x x

 

See also

RWByteAddressBuffer

Shader Model 5