DarkBASIC Professional Help File

DX11 FETCH BUFFER CONTENTS

This function is used to read back the contents of a buffer after it has been altered by the GPU.
It needs to be called when you wish to read from, or partially update a GPU-writable buffer. Failing to do so will use the latest buffer contents known by the CPU, which will
overwrite the current contents of the buffer on the GPU if any DX11 SET BUFFER XXX function is called.
Since calling this function results in reading back data from the GPU, it will block both the CPU and GPU while executing and as such can be considered an expensive function
that should only be called when necessary (such as once per frame or after each compute shader invocation that updates the contents of the buffer and that the CPU is interested in).

Syntax

    DX11 FETCH BUFFER CONTENTS buffer

Parameters

    buffer

> Dword
> The buffer to read back the contents of from the GPU. If the buffer isn't writable by the GPU this function will do nothing.

Returns

This function does not return a value.

See also

DIRECTCOMPUTE Functions Menu
DX11 Function Categories