Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/GPU_vertex_format.h
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | typedef struct GPUVertAttr { | ||||
| uint name_len : 3; | uint name_len : 3; | ||||
| uint gl_comp_type; | uint gl_comp_type; | ||||
| /* -- 8 Bytes -- */ | /* -- 8 Bytes -- */ | ||||
| uchar names[GPU_VERT_ATTR_MAX_NAMES]; | uchar names[GPU_VERT_ATTR_MAX_NAMES]; | ||||
| } GPUVertAttr; | } GPUVertAttr; | ||||
| BLI_STATIC_ASSERT(GPU_VERT_ATTR_NAMES_BUF_LEN <= 256, | BLI_STATIC_ASSERT(GPU_VERT_ATTR_NAMES_BUF_LEN <= 256, | ||||
| "We use uchar as index inside the name buffer " | "We use uchar as index inside the name buffer " | ||||
| "so GPU_VERT_ATTR_NAMES_BUF_LEN needs to be be " | "so GPU_VERT_ATTR_NAMES_BUF_LEN needs to be " | ||||
| "smaller than GPUVertFormat->name_offset and " | "smaller than GPUVertFormat->name_offset and " | ||||
| "GPUVertAttr->names maximum value"); | "GPUVertAttr->names maximum value"); | ||||
| typedef struct GPUVertFormat { | typedef struct GPUVertFormat { | ||||
| /** 0 to 16 (GPU_VERT_ATTR_MAX_LEN). */ | /** 0 to 16 (GPU_VERT_ATTR_MAX_LEN). */ | ||||
| uint attr_len : 5; | uint attr_len : 5; | ||||
| /** Total count of active vertex attribute names. (max GPU_VERT_FORMAT_MAX_NAMES) */ | /** Total count of active vertex attribute names. (max GPU_VERT_FORMAT_MAX_NAMES) */ | ||||
| uint name_len : 6; | uint name_len : 6; | ||||
| ▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines | |||||