Skip to content

TSdlGpuTextureUsageFlag

Specifies how a texture is intended to be used by the client.

A texture must have at least one usage flag. Note that some usage flag combinations are invalid.

With regards to compute storage usage, [Read, Write] means that you can have shader A that only writes into the texture and shader B that only reads from the texture and bind the same texture to either shader respectively. Simultaneous means that you can do reads and writes within the same shader or compute pass. It also implies that atomic ops can be used, since those are read-modify-write operations. If you use Simultaneous, you are responsible for avoiding data races, as there is no data synchronization within a compute pass. Note that Simultaneous usage is only supported by a limited number of texture formats.

Definition

Unit: Neslib.Sdl3.Gpu

type TSdlGpuTextureUsageFlag = (Sampler, ColorTarget, DepthStencilTarget, GraphicsStorageRead, ComputeStorageRead, ComputeStorageWrite, ComputeStorageSimultaneousReadWrite)

See Also

Enumeration Values

Sampler = 0


ColorTarget = 1


DepthStencilTarget = 2


GraphicsStorageRead = 3


ComputeStorageRead = 4


ComputeStorageWrite = 5


ComputeStorageSimultaneousReadWrite = 6