All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiTextureGpuToCpuOp Struct Reference

#include <blitCmdsOps.h>

Public Member Functions

 HgiTextureGpuToCpuOp ()

Public Attributes

HgiTextureHandle gpuSourceTexture
GfVec3i sourceTexelOffset
uint32_t mipLevel
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::HgiTextureGpuToCpuOp ( )

Definition at line 69 of file blitCmdsOps.h.

Member Data Documentation

void* HgiTextureGpuToCpuOp::cpuDestinationBuffer

Definition at line 81 of file blitCmdsOps.h.

size_t HgiTextureGpuToCpuOp::destinationBufferByteSize

Definition at line 83 of file blitCmdsOps.h.

size_t HgiTextureGpuToCpuOp::destinationByteOffset

Definition at line 82 of file blitCmdsOps.h.

HgiTextureHandle HgiTextureGpuToCpuOp::gpuSourceTexture

Definition at line 78 of file blitCmdsOps.h.

uint32_t HgiTextureGpuToCpuOp::mipLevel

Definition at line 80 of file blitCmdsOps.h.

GfVec3i HgiTextureGpuToCpuOp::sourceTexelOffset

Definition at line 79 of file blitCmdsOps.h.

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