Skip to content

TSdlGpuCopyPass

A copy pass.

This handle is transient and should not be held or referenced after Finish is called.

Definition

Unit: Neslib.Sdl3.Gpu

type TSdlGpuCopyPass = record ... end;

See Also

Operators

Name Description
Equal(TSdlGpuCopyPass, TSdlGpuCopyPass) Used to compare against another TSdlGpuCopyPass.
Equal(TSdlGpuCopyPass, Pointer) Used to compare against nil.
Implicit Used to set the value to nil.
NotEqual(TSdlGpuCopyPass, TSdlGpuCopyPass) Used to compare against another TSdlGpuCopyPass.
NotEqual(TSdlGpuCopyPass, Pointer) Used to compare against nil.

Methods

Name Description
CopyBufferToBuffer Performs a buffer-to-buffer copy.
CopyTextureToTexture Performs a texture-to-texture copy.
DownloadFromBuffer Copies data from a buffer to a transfer buffer on the GPU timeline.
DownloadFromTexture Copies data from a texture to a transfer buffer on the GPU timeline.
Finish Ends the current copy pass.
UploadToBuffer Uploads data from a transfer buffer to a buffer.
UploadToTexture Uploads data from a transfer buffer to a texture.

Operator Descriptions

Equal(TSdlGpuCopyPass, TSdlGpuCopyPass)

Used to compare against another TSdlGpuCopyPass.

class operator Equal(const ALeft, ARight: TSdlGpuCopyPass): Boolean; inline; static

Parameters

ALeft: TSdlGpuCopyPass

ARight: TSdlGpuCopyPass

Returns

Boolean


Equal(TSdlGpuCopyPass, Pointer)

Used to compare against nil.

class operator Equal(const ALeft: TSdlGpuCopyPass; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TSdlGpuCopyPass

ARight: Pointer

Returns

Boolean


Implicit(Pointer)

Used to set the value to nil.

class operator Implicit(const AValue: Pointer): TSdlGpuCopyPass; inline; static

Parameters

AValue: Pointer

Returns

TSdlGpuCopyPass


NotEqual(TSdlGpuCopyPass, TSdlGpuCopyPass)

Used to compare against another TSdlGpuCopyPass.

class operator NotEqual(const ALeft, ARight: TSdlGpuCopyPass): Boolean; inline; static

Parameters

ALeft: TSdlGpuCopyPass

ARight: TSdlGpuCopyPass

Returns

Boolean


NotEqual(TSdlGpuCopyPass, Pointer)

Used to compare against nil.

class operator NotEqual(const ALeft: TSdlGpuCopyPass; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TSdlGpuCopyPass

ARight: Pointer

Returns

Boolean


Method Descriptions

CopyBufferToBuffer(TSdlGpuBufferLocation, TSdlGpuBufferLocation, Integer, Boolean)

Performs a buffer-to-buffer copy.

This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

procedure CopyBufferToBuffer(const ASource, ADestination: TSdlGpuBufferLocation; const ASize: Integer; const ACycle: Boolean); inline

Parameters

ASource: TSdlGpuBufferLocation : The buffer and offset to copy from.

ADestination: TSdlGpuBufferLocation : The buffer and offset to copy to.

ASize: Integer : The length of the buffer to copy.

ACycle: Boolean : If True, cycles the destination buffer if it is already bound, otherwise overwrites the data.

Remarks

This function is available since SDL 3.2.0.


CopyTextureToTexture(TSdlGpuTextureLocation, TSdlGpuTextureLocation, Integer, Integer, Integer, Boolean)

Performs a texture-to-texture copy.

This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

procedure CopyTextureToTexture(const ASource, ADestination: TSdlGpuTextureLocation; const AW, AH, AD: Integer; const ACycle: Boolean); inline

Parameters

ASource: TSdlGpuTextureLocation : A source texture region.

ADestination: TSdlGpuTextureLocation : A destination texture region.

AW: Integer : The width of the region to copy.

AH: Integer : The height of the region to copy.

AD: Integer : The depth of the region to copy.

ACycle: Boolean : If True, cycles the destination texture if the destination texture is bound, otherwise overwrites the data.


DownloadFromBuffer(TSdlGpuBufferRegion, TSdlGpuTransferBufferLocation)

Copies data from a buffer to a transfer buffer on the GPU timeline.

This data is not guaranteed to be copied until the command buffer fence is signaled.

procedure DownloadFromBuffer(const ASource: TSdlGpuBufferRegion; const ADestination: TSdlGpuTransferBufferLocation); inline

Parameters

ASource: TSdlGpuBufferRegion : The source buffer with offset and size.

ADestination: TSdlGpuTransferBufferLocation : The destination transfer buffer with offset.


DownloadFromTexture(TSdlGpuTextureRegion, TSdlGpuTextureTransferInfo)

Copies data from a texture to a transfer buffer on the GPU timeline.

This data is not guaranteed to be copied until the command buffer fence is signaled.

procedure DownloadFromTexture(const ASource: TSdlGpuTextureRegion; const ADestination: TSdlGpuTextureTransferInfo); inline

Parameters

ASource: TSdlGpuTextureRegion : The source texture region.

ADestination: TSdlGpuTextureTransferInfo : The destination transfer buffer with image layout information.


Finish

Ends the current copy pass.

procedure Finish; inline


UploadToBuffer(TSdlGpuTransferBufferLocation, TSdlGpuBufferRegion, Boolean)

Uploads data from a transfer buffer to a buffer.

The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.

procedure UploadToBuffer(const ASource: TSdlGpuTransferBufferLocation; const ADestination: TSdlGpuBufferRegion; const ACycle: Boolean); inline

Parameters

ASource: TSdlGpuTransferBufferLocation : The source transfer buffer with offset.

ADestination: TSdlGpuBufferRegion : The destination buffer with offset and size.

ACycle: Boolean : If true, cycles the buffer if it is already bound, otherwise overwrites the data.


UploadToTexture(TSdlGpuTextureTransferInfo, TSdlGpuTextureRegion, Boolean)

Uploads data from a transfer buffer to a texture.

The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.

You must align the data in the transfer buffer to a multiple of the texel size of the texture format.

procedure UploadToTexture(const ASource: TSdlGpuTextureTransferInfo; const ADestination: TSdlGpuTextureRegion; const ACycle: Boolean); inline

Parameters

ASource: TSdlGpuTextureTransferInfo : The source transfer buffer with image layout information.

ADestination: TSdlGpuTextureRegion : The destination texture region.

ACycle: Boolean : If true, cycles the texture if the texture is bound, otherwise overwrites the data.