Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/GPU_batch.h
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | typedef enum eGPUBatchFlag { | ||||
| GPU_BATCH_OWNS_INDEX = (GPU_BATCH_OWNS_INST_VBO_MAX << 1), | GPU_BATCH_OWNS_INDEX = (GPU_BATCH_OWNS_INST_VBO_MAX << 1), | ||||
| /** Has been initialized. At least one VBO is set. */ | /** Has been initialized. At least one VBO is set. */ | ||||
| GPU_BATCH_INIT = (1 << 16), | GPU_BATCH_INIT = (1 << 16), | ||||
| /** Batch is initialized but it's VBOs are still being populated. (optional) */ | /** Batch is initialized but it's VBOs are still being populated. (optional) */ | ||||
| GPU_BATCH_BUILDING = (1 << 16), | GPU_BATCH_BUILDING = (1 << 16), | ||||
| /** Cached data need to be rebuild. (VAO, PSO, ...) */ | /** Cached data need to be rebuild. (VAO, PSO, ...) */ | ||||
| GPU_BATCH_DIRTY = (1 << 17), | GPU_BATCH_DIRTY = (1 << 17), | ||||
| GPU_BATCH_FLAG_MAX_DONT_USE = ~(0) | |||||
| } eGPUBatchFlag; | } eGPUBatchFlag; | ||||
| #define GPU_BATCH_OWNS_NONE GPU_BATCH_INVALID | #define GPU_BATCH_OWNS_NONE GPU_BATCH_INVALID | ||||
| BLI_STATIC_ASSERT(GPU_BATCH_OWNS_INDEX < GPU_BATCH_INIT, | BLI_STATIC_ASSERT(GPU_BATCH_OWNS_INDEX < GPU_BATCH_INIT, | ||||
| "eGPUBatchFlag: Error: status flags are shadowed by the ownership bits!") | "eGPUBatchFlag: Error: status flags are shadowed by the ownership bits!") | ||||
| ENUM_OPERATORS(eGPUBatchFlag) | ENUM_OPERATORS(eGPUBatchFlag, GPU_BATCH_FLAG_MAX_DONT_USE) | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| /** | /** | ||||
| * IMPORTANT: Do not allocate manually as the real struct is bigger (i.e: GLBatch). This is only | * IMPORTANT: Do not allocate manually as the real struct is bigger (i.e: GLBatch). This is only | ||||
| * the common and "public" part of the struct. Use the provided allocator. | * the common and "public" part of the struct. Use the provided allocator. | ||||
| ▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines | |||||