diff options
Diffstat (limited to 'source/blender/gpu/GPU_batch.h')
-rw-r--r-- | source/blender/gpu/GPU_batch.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 0ef7e57a026..73930cd8e9d 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -51,9 +51,13 @@ typedef enum { typedef struct GPUBatch { /* geometry */ - GPUVertBuf *verts[GPU_BATCH_VBO_MAX_LEN]; /* verts[0] is required, others can be NULL */ - GPUVertBuf *inst; /* instance attribs */ - GPUIndexBuf *elem; /* NULL if element list not needed */ + + /** verts[0] is required, others can be NULL */ + GPUVertBuf *verts[GPU_BATCH_VBO_MAX_LEN]; + /** Instance attributes. */ + GPUVertBuf *inst; + /** NULL if element list not needed */ + GPUIndexBuf *elem; uint32_t gl_prim_type; /* cached values (avoid dereferencing later) */ @@ -63,21 +67,22 @@ typedef struct GPUBatch { /* book-keeping */ uint owns_flag; - struct GPUContext *context; /* used to free all vaos. this implies all vaos were created under the same context. */ + /** used to free all vaos. this implies all vaos were created under the same context. */ + struct GPUContext *context; GPUBatchPhase phase; bool program_in_use; - /* Vao management: remembers all geometry state (vertex attrib bindings & element buffer) + /* Vao management: remembers all geometry state (vertex attribute bindings & element buffer) * for each shader interface. Start with a static number of vaos and fallback to dynamic count * if necessary. Once a batch goes dynamic it does not go back. */ bool is_dynamic_vao_count; union { - /* Static handle count */ + /** Static handle count */ struct { const struct GPUShaderInterface *interfaces[GPU_BATCH_VAO_STATIC_LEN]; uint32_t vao_ids[GPU_BATCH_VAO_STATIC_LEN]; } static_vaos; - /* Dynamic handle count */ + /** Dynamic handle count */ struct { uint count; const struct GPUShaderInterface **interfaces; |