DarkBASIC Professional Help File

DX11 COPY APPEND CONSUME BUFFER ELEMENT COUNT TO CBUFFER

Unfortunately it isn't possible to access the internal element count of an append/consume buffer directly from your shaders.
It can however be copied directly into GPU memory such as a buffer or constant buffer, thus bypassing the stalling operation
performed by DX11 GET APPEND CONSUME BUFFER ELEMENT COUNT, where the element count is read back to the CPU.
Therefore it is recommended to use this function instead if you just mean to write the count directly to a constant buffer for reading
by your shader programs.
Note: this function operates on constant buffers. Use DX11 COPY APPEND CONSUME BUFFER ELEMENT COUNT TO BUFFER for use with array buffers, structured buffers or byte address buffers instead.

Syntax

    DX11 COPY APPEND CONSUME BUFFER ELEMENT COUNT TO CBUFFER appendConsumeBuffer, targetCBuffer, byteOffset

Parameters

    appendConsumeBuffer

> Dword
> The append/consume buffer to copy the current internal element count of.

    targetCBuffer

> Dword
> A constant buffer to copy the append/consume buffer's internal element count to.

    byteOffset

> Dword
> A raw byte offset to where in the target cbuffer to write the element count to.

Returns

This function does not return a value.

See also

DIRECTCOMPUTE Functions Menu
DX11 Function Categories