ByteAddressBuffer.Load
Description
Load a 32-bit unsigned integer or value with type of T from the buffer at the specified location.
Signature
/// Requires Capability Set 1: uint ByteAddressBuffer.Load(int location); /// Requires Capability Set 2: uint ByteAddressBuffer.Load( int location, out uint status); T ByteAddressBuffer.Load<T>(int location); T ByteAddressBuffer.Load<T>( int location, int alignment);
Generic Parameters
T
The type of the value to load from the buffer.
Parameters
location : int
The input address in bytes, which must be a multiple of 4.
status : uint
[out] The status of the operation.
alignment : int
Specifies the alignment of the location, which must be a multiple of 4.
Return value
The value loaded from the buffer.
Remarks
You can’t access the output parameter status directly; instead, pass the status to the CheckAccessFullyMapped intrinsic function. CheckAccessFullyMapped returns TRUE if all values from the corresponding Sample, Gather, or Load operation accessed mapped tiles in a tiled resource. If any values were taken from an unmapped tile, CheckAccessFullyMapped returns FALSE. When targeting non-HLSL, the status is always 0.
Availability and Requirements
Capability Set 1
Defined for the following targets:
hlsl
Available in all stages.
glsl
Available in all stages.
cpp
Available in all stages.
cuda
Available in all stages.
metal
Available in all stages.
spirv
Available in all stages.
Capability Set 2
Defined for the following targets:
hlsl
Available in all stages.