#include <RadientAssets.h>
Public Attributes | |
| IRadientDataBlob * | pDataBlob = nullptr |
| Uint64 | ByteOffset = 0 |
| Uint32 | Stride = 0 |
Source data for one mip level of a 2D texture. LoadTexture copies this descriptor and retains its blob with read access.
| Uint64 Diligent::RadientTextureMipData::ByteOffset = 0 |
Byte offset of the mip's first pixel or compression block within pDataBlob. Defaults to zero. The blob must cover ByteOffset plus (row count - 1) * effective stride + active row size bytes. For uncompressed formats, row count is the logical mip height. For block-compressed formats, row count is ceil(logical mip height / block height), and active row size is ceil(logical mip width / block width) * bytes per block. Block width, block height, and bytes per block are defined by Format. Storage contains whole blocks, with at least one block in each dimension, even when the logical mip dimensions are smaller than a block. The final row needs no trailing padding; unused bytes are ignored. For uncompressed formats, the resulting read pointer must be aligned to the component size (1, 2, or 4 bytes). Compressed data has no pointer alignment requirement. An invalid range or alignment returns RADIENT_STATUS_INVALID_ARGUMENT.
| IRadientDataBlob* Diligent::RadientTextureMipData::pDataBlob = nullptr |
Required blob containing this mip's pixels or compressed blocks. Accepts read-only and mutable blobs. Multiple mip levels may share one blob. LoadTexture acquires read access before returning and consumes the supplied bytes without copying or repacking them. Read access lasts while loading or upload preparation references the data. Other readers are allowed; writes and resizing remain blocked until all readers finish. An active writer causes LoadTexture to return RADIENT_STATUS_INVALID_OPERATION. The caller may release its reference after LoadTexture returns. For REFERENCE storage, bytes remain alive and unchanged for the blob's entire lifetime; RadientDataBlobCreateInfo::OnDestroy can release their owner. Last-reader callbacks may run during LoadTexture or later on a worker thread and do not indicate GPU upload completion. Defaults to nullptr, which is invalid.
| Uint32 Diligent::RadientTextureMipData::Stride = 0 |
Stride between pixel rows or compressed block rows, in bytes. Zero, the default, selects tightly packed rows for this mip's dimensions. Must be at least the active row size. For uncompressed formats with multiple rows, it must be a multiple of the component size. Invalid stride returns RADIENT_STATUS_INVALID_ARGUMENT.