Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/gpu/GPU_element.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/gpu/GPU_element.h')
-rw-r--r--source/blender/gpu/GPU_element.h53
1 files changed, 27 insertions, 26 deletions
diff --git a/source/blender/gpu/GPU_element.h b/source/blender/gpu/GPU_element.h
index 5c877c80f65..d1a199f8193 100644
--- a/source/blender/gpu/GPU_element.h
+++ b/source/blender/gpu/GPU_element.h
@@ -33,40 +33,40 @@
#define GPU_PRIM_RESTART 0xFFFFFFFF
typedef enum {
- GPU_INDEX_U8, /* GL has this, Vulkan does not */
- GPU_INDEX_U16,
- GPU_INDEX_U32,
+ GPU_INDEX_U8, /* GL has this, Vulkan does not */
+ GPU_INDEX_U16,
+ GPU_INDEX_U32,
} GPUIndexBufType;
typedef struct GPUIndexBuf {
- uint index_len;
+ uint index_len;
#if GPU_TRACK_INDEX_RANGE
- GPUIndexBufType index_type;
- uint32_t gl_index_type;
- uint min_index;
- uint max_index;
- uint base_index;
+ GPUIndexBufType index_type;
+ uint32_t gl_index_type;
+ uint min_index;
+ uint max_index;
+ uint base_index;
#endif
- uint32_t ibo_id; /* 0 indicates not yet sent to VRAM */
- void *data; /* non-NULL indicates not yet sent to VRAM */
- bool use_prim_restart;
+ uint32_t ibo_id; /* 0 indicates not yet sent to VRAM */
+ void *data; /* non-NULL indicates not yet sent to VRAM */
+ bool use_prim_restart;
} GPUIndexBuf;
void GPU_indexbuf_use(GPUIndexBuf *);
uint GPU_indexbuf_size_get(const GPUIndexBuf *);
typedef struct GPUIndexBufBuilder {
- uint max_allowed_index;
- uint max_index_len;
- uint index_len;
- GPUPrimType prim_type;
- uint *data;
- bool use_prim_restart;
+ uint max_allowed_index;
+ uint max_index_len;
+ uint index_len;
+ GPUPrimType prim_type;
+ uint *data;
+ bool use_prim_restart;
} GPUIndexBufBuilder;
-
/* supports all primitive types. */
-void GPU_indexbuf_init_ex(GPUIndexBufBuilder *, GPUPrimType, uint index_len, uint vertex_len, bool use_prim_restart);
+void GPU_indexbuf_init_ex(
+ GPUIndexBufBuilder *, GPUPrimType, uint index_len, uint vertex_len, bool use_prim_restart);
/* supports only GPU_PRIM_POINTS, GPU_PRIM_LINES and GPU_PRIM_TRIS. */
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len);
@@ -88,11 +88,12 @@ int GPU_indexbuf_primitive_len(GPUPrimType prim_type);
/* Macros */
-#define GPU_INDEXBUF_DISCARD_SAFE(elem) do { \
- if (elem != NULL) { \
- GPU_indexbuf_discard(elem); \
- elem = NULL; \
- } \
-} while (0)
+#define GPU_INDEXBUF_DISCARD_SAFE(elem) \
+ do { \
+ if (elem != NULL) { \
+ GPU_indexbuf_discard(elem); \
+ elem = NULL; \
+ } \
+ } while (0)
#endif /* __GPU_ELEMENT_H__ */