A structure specifying parameters related to transferring data to or from a texture.
If either of pixels_per_row or rows_per_layer is zero, then width and height of passed SDL_GPUTextureRegion to SDL_UploadToGPUTexture or SDL_DownloadFromGPUTexture are used as default values respectively and data is considered to be tightly packed.
WARNING: On some older/integrated hardware, Direct3D 12 requires texture data row pitch to be 256 byte aligned, and offsets to be aligned to 512 bytes. If they are not, SDL will make a temporary copy of the data that is properly aligned, but this adds overhead to the transfer process. Apps can avoid this by aligning their data appropriately, or using a different GPU backend than Direct3D 12.
- Since
- This struct is available since SDL 3.2.0.
- See also
- SDL_UploadToGPUTexture
-
SDL_DownloadFromGPUTexture
Definition at line 1413 of file SDL_gpu.h.