HgiTextureGpuToCpuOp Struct Reference

Describes the properties needed to copy texture data from GPU to CPU. More...

Public Attributes

HgiTextureHandle gpuSourceTexture
 
GfVec3i sourceTexelOffset
 
uint32_t mipLevel
 
void * cpuDestinationBuffer
 
size_t destinationByteOffset
 
size_t destinationBufferByteSize
 

Detailed Description

Describes the properties needed to copy texture data from GPU to CPU.

This copies one mip at a time.

It is the responsibility of the caller to:

  • ensure the destination buffer is large enough to receive the data (keep in mind the destinationByteOffset, mipLevel, numLayers, etc).
  • ensure the source texture and destination buffer are valid at the time the command is executed.
  • gpuSourceTexture: The gpu texture to copy pixels from.
  • sourceTexelOffset: The texel offset (width, height, depth) of where to start copying. If the texture is a 2d_array the third element is the layer/slice.
  • mipLevel: Mip level to copy from.
  • cpuDestinationBuffer: The copy destination cpu buffer.
  • destinationByteOffset: The byte offset in destination buffer where to start copying the data to.
  • destinationBufferByteSize: Size of the destination buffer (in bytes)

Definition at line 67 of file blitCmdsOps.h.


The documentation for this struct was generated from the following file: