Buffer::Load(int, uint) function

Reads buffer data and returns status of the operation.

Syntax

 Load(
  in  int Location,
  out uint Status
);

Parameters

Location [in]

Type: int

The location of the buffer.

Status [out]

Type: uint

The status of the operation. You can't access the 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.

Return value

Type:

The return type matches the type in the declaration for the Buffer object.

Remarks

This function is supported for the following types of shaders:

Vertex Hull Domain Geometry Pixel Compute
x x x x x x

 

Examples

This example shows how to use Load:

Buffer<float4> myBuffer;
float loc;
uint status;
float4 myColor = myBuffer.Load( loc , status );

See also

Load methods