GpuUpdateFlag

Description

enum Tinman.Terrain.Rendering.GpuUpdateFlag

Enumeration of semantic flags for updating GPU buffers.

For all flags, the CPU can update the buffer immediately and the GPU can continue to use the existing content. The CPU will never wait explicitly for the GPU to finish when doing a update and the GPU will not stall because of an update.

See also

IGpuBuffer

Public / Constants

Discard

public constant Discard → (0:int32)

The buffer update specifies new content, the existing content is discarded.

The system may choose any method for synchronizing with the GPU, for example using a temporary buffer. Updating many and/or large dynamic buffers very often with the Discard flag can still stall the GPU, for example if the system runs out of temporary buffers and needs to wait until one becomes free again. An update with this flag behaves differently for ResourceAccessPattern.Dynamic and ResourceAccessPattern.Mappable buffers, see IGpuBuffer.

NoOverwrite

public constant NoOverwrite → (1:int32)

The buffer update modifies the content in a way that does not interfere with pending GPU render commands.

Render glitches and/or runtime errors can occur if the updated content is still being used for rendering, unless it has been discarded by the previous update with the Discard flag. An update with this flag has the same behaviour for ResourceAccessPattern.Dynamic and ResourceAccessPattern.Mappable buffers, see IGpuBuffer.