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_vertex_format.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_vertex_format.h')
-rw-r--r--source/blender/gpu/GPU_vertex_format.h76
1 files changed, 38 insertions, 38 deletions
diff --git a/source/blender/gpu/GPU_vertex_format.h b/source/blender/gpu/GPU_vertex_format.h
index ce70430dcca..021def5b265 100644
--- a/source/blender/gpu/GPU_vertex_format.h
+++ b/source/blender/gpu/GPU_vertex_format.h
@@ -34,59 +34,59 @@
#define GPU_VERT_ATTR_NAMES_BUF_LEN ((GPU_VERT_ATTR_NAME_AVERAGE_LEN + 1) * GPU_VERT_ATTR_MAX_LEN)
typedef enum {
- GPU_COMP_I8,
- GPU_COMP_U8,
- GPU_COMP_I16,
- GPU_COMP_U16,
- GPU_COMP_I32,
- GPU_COMP_U32,
+ GPU_COMP_I8,
+ GPU_COMP_U8,
+ GPU_COMP_I16,
+ GPU_COMP_U16,
+ GPU_COMP_I32,
+ GPU_COMP_U32,
- GPU_COMP_F32,
+ GPU_COMP_F32,
- GPU_COMP_I10,
+ GPU_COMP_I10,
} GPUVertCompType;
typedef enum {
- GPU_FETCH_FLOAT,
- GPU_FETCH_INT,
- GPU_FETCH_INT_TO_FLOAT_UNIT, /* 127 (ubyte) -> 0.5 (and so on for other int types) */
- GPU_FETCH_INT_TO_FLOAT, /* 127 (any int type) -> 127.0 */
+ GPU_FETCH_FLOAT,
+ GPU_FETCH_INT,
+ GPU_FETCH_INT_TO_FLOAT_UNIT, /* 127 (ubyte) -> 0.5 (and so on for other int types) */
+ GPU_FETCH_INT_TO_FLOAT, /* 127 (any int type) -> 127.0 */
} GPUVertFetchMode;
typedef struct GPUVertAttr {
- GPUVertFetchMode fetch_mode;
- GPUVertCompType comp_type;
- uint gl_comp_type;
- uint comp_len; /* 1 to 4 or 8 or 12 or 16 */
- uint sz; /* size in bytes, 1 to 64 */
- uint offset; /* from beginning of vertex, in bytes */
- uint name_len; /* up to GPU_VERT_ATTR_MAX_NAMES */
- const char *name[GPU_VERT_ATTR_MAX_NAMES];
+ GPUVertFetchMode fetch_mode;
+ GPUVertCompType comp_type;
+ uint gl_comp_type;
+ uint comp_len; /* 1 to 4 or 8 or 12 or 16 */
+ uint sz; /* size in bytes, 1 to 64 */
+ uint offset; /* from beginning of vertex, in bytes */
+ uint name_len; /* up to GPU_VERT_ATTR_MAX_NAMES */
+ const char *name[GPU_VERT_ATTR_MAX_NAMES];
} GPUVertAttr;
typedef struct GPUVertFormat {
- /** 0 to 16 (GPU_VERT_ATTR_MAX_LEN). */
- uint attr_len;
- /** Total count of active vertex attribute. */
- uint name_len;
- /** Stride in bytes, 1 to 256. */
- uint stride;
- uint name_offset;
- bool packed;
- char names[GPU_VERT_ATTR_NAMES_BUF_LEN];
- /** TODO: variable-size array */
- GPUVertAttr attrs[GPU_VERT_ATTR_MAX_LEN];
+ /** 0 to 16 (GPU_VERT_ATTR_MAX_LEN). */
+ uint attr_len;
+ /** Total count of active vertex attribute. */
+ uint name_len;
+ /** Stride in bytes, 1 to 256. */
+ uint stride;
+ uint name_offset;
+ bool packed;
+ char names[GPU_VERT_ATTR_NAMES_BUF_LEN];
+ /** TODO: variable-size array */
+ GPUVertAttr attrs[GPU_VERT_ATTR_MAX_LEN];
} GPUVertFormat;
struct GPUShaderInterface;
void GPU_vertformat_clear(GPUVertFormat *);
void GPU_vertformat_copy(GPUVertFormat *dest, const GPUVertFormat *src);
-void GPU_vertformat_from_interface(GPUVertFormat *format, const struct GPUShaderInterface *shaderface);
+void GPU_vertformat_from_interface(GPUVertFormat *format,
+ const struct GPUShaderInterface *shaderface);
uint GPU_vertformat_attr_add(
- GPUVertFormat *, const char *name,
- GPUVertCompType, uint comp_len, GPUVertFetchMode);
+ GPUVertFormat *, const char *name, GPUVertCompType, uint comp_len, GPUVertFetchMode);
void GPU_vertformat_alias_add(GPUVertFormat *, const char *alias);
int GPU_vertformat_attr_id_get(const GPUVertFormat *, const char *name);
@@ -103,10 +103,10 @@ void GPU_vertformat_triple_load(GPUVertFormat *format);
/* format conversion */
typedef struct GPUPackedNormal {
- int x : 10;
- int y : 10;
- int z : 10;
- int w : 2; /* 0 by default, can manually set to { -2, -1, 0, 1 } */
+ int x : 10;
+ int y : 10;
+ int z : 10;
+ int w : 2; /* 0 by default, can manually set to { -2, -1, 0, 1 } */
} GPUPackedNormal;
GPUPackedNormal GPU_normal_convert_i10_v3(const float data[3]);