ChannelData Bytecodes
The ChannelData bytecodes are defined in the MemoryAllocationRequest struct, specifying memory allocations for resources like command buffers and textures in the Channel paradigm.
MemoryAllocationRequest Struct
| Field |
Type |
Description |
| ma_size |
uint64_t |
Size of allocation |
| ma_name |
void * |
Name or identifier |
| ma_ram_type |
uint8_t |
Memory domain (e.g., GPU) |
| ma_data_type |
uint8_t |
Data type (e.g., float) |
| ma_dimension_type |
uint8_t |
Dimensionality (e.g., array) |
| ma_flags |
uint8_t |
Modifiers (e.g., signed) |
| ma_pad |
char[24] |
Alignment padding |
Bytecode Definitions
ma_ram_type
- HEAP_MEMORY (0): CPU heap
- STACK_MEMORY (1): Stack memory
- IPC_MEMORY (2): Inter-process communication
- GPU_MEMORY (3): GPU buffers/textures
- CLOUD_MEMORY (4): Remote data
- REGISTRY_MEMORY (5): Metadata
- PAGE_MEMORY (6): Virtual pages
- RESERVED_MEMORY (7): Future use
ma_data_type
- DATA_BYTE (0): 8-bit integer
- DATA_SHORT (1): 16-bit integer
- DATA_CHAR (2): 8-bit character
- DATA_INT (3): 32-bit integer
- DATA_LONG (4): 64-bit integer
- DATA_FLOAT (5): 32-bit float
- DATA_DOUBLE (6): 64-bit double
- DATA_OBJECT (7): Composite struct
ma_dimension_type
- DATA_PRIMITIVE (0): Scalar
- DATA_ARRAY (1): 1D array
- DATA_2D_ARRAY (2): 2D array/texture
- DATA_3D_ARRAY (3): 3D array
ma_flags
- DATA_SIGNED (0x40): Signed integers
- DATA_CONTAINED (0x40): Self-contained objects
- DATA_PACK_PARAMETERS (0x80): Packed parameters
These bytecodes enable precise resource allocation for blitter commands, supporting Vulkan’s memory model with 64-bit alignment.