Loading...
Searching...
No Matches
HgiTextureGpuToCpuOp Struct Reference

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

#include <blitCmdsOps.h>

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.

Constructor & Destructor Documentation

◆ HgiTextureGpuToCpuOp()

Definition at line 69 of file blitCmdsOps.h.

Member Data Documentation

◆ cpuDestinationBuffer

void* cpuDestinationBuffer

Definition at line 81 of file blitCmdsOps.h.

◆ destinationBufferByteSize

size_t destinationBufferByteSize

Definition at line 83 of file blitCmdsOps.h.

◆ destinationByteOffset

size_t destinationByteOffset

Definition at line 82 of file blitCmdsOps.h.

◆ gpuSourceTexture

HgiTextureHandle gpuSourceTexture

Definition at line 78 of file blitCmdsOps.h.

◆ mipLevel

uint32_t mipLevel

Definition at line 80 of file blitCmdsOps.h.

◆ sourceTexelOffset

GfVec3i sourceTexelOffset

Definition at line 79 of file blitCmdsOps.h.


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