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_shader_interface.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_shader_interface.h')
-rw-r--r--source/blender/gpu/GPU_shader_interface.h102
1 files changed, 52 insertions, 50 deletions
diff --git a/source/blender/gpu/GPU_shader_interface.h b/source/blender/gpu/GPU_shader_interface.h
index ee2091c7cec..ace8832303b 100644
--- a/source/blender/gpu/GPU_shader_interface.h
+++ b/source/blender/gpu/GPU_shader_interface.h
@@ -29,71 +29,73 @@
#include "GPU_common.h"
typedef enum {
- GPU_UNIFORM_NONE = 0, /* uninitialized/unknown */
-
- GPU_UNIFORM_MODEL, /* mat4 ModelMatrix */
- GPU_UNIFORM_VIEW, /* mat4 ViewMatrix */
- GPU_UNIFORM_MODELVIEW, /* mat4 ModelViewMatrix */
- GPU_UNIFORM_PROJECTION, /* mat4 ProjectionMatrix */
- GPU_UNIFORM_VIEWPROJECTION, /* mat4 ViewProjectionMatrix */
- GPU_UNIFORM_MVP, /* mat4 ModelViewProjectionMatrix */
-
- GPU_UNIFORM_MODEL_INV, /* mat4 ModelMatrixInverse */
- GPU_UNIFORM_VIEW_INV, /* mat4 ViewMatrixInverse */
- GPU_UNIFORM_MODELVIEW_INV, /* mat4 ModelViewMatrixInverse */
- GPU_UNIFORM_PROJECTION_INV, /* mat4 ProjectionMatrixInverse */
- GPU_UNIFORM_VIEWPROJECTION_INV, /* mat4 ViewProjectionMatrixInverse */
-
- GPU_UNIFORM_NORMAL, /* mat3 NormalMatrix */
- GPU_UNIFORM_NORMAL_INV, /* mat3 NormalMatrixInverse */
- GPU_UNIFORM_WORLDNORMAL, /* mat3 WorldNormalMatrix */
- GPU_UNIFORM_CAMERATEXCO, /* vec4 CameraTexCoFactors */
- GPU_UNIFORM_ORCO, /* vec3 OrcoTexCoFactors[] */
-
- GPU_UNIFORM_COLOR, /* vec4 color */
- GPU_UNIFORM_EYE, /* vec3 eye */
- GPU_UNIFORM_CALLID, /* int callId */
- GPU_UNIFORM_OBJECT_INFO, /* vec3 objectInfo */
-
- GPU_UNIFORM_CUSTOM, /* custom uniform, not one of the above built-ins */
-
- GPU_NUM_UNIFORMS, /* Special value, denotes number of builtin uniforms. */
+ GPU_UNIFORM_NONE = 0, /* uninitialized/unknown */
+
+ GPU_UNIFORM_MODEL, /* mat4 ModelMatrix */
+ GPU_UNIFORM_VIEW, /* mat4 ViewMatrix */
+ GPU_UNIFORM_MODELVIEW, /* mat4 ModelViewMatrix */
+ GPU_UNIFORM_PROJECTION, /* mat4 ProjectionMatrix */
+ GPU_UNIFORM_VIEWPROJECTION, /* mat4 ViewProjectionMatrix */
+ GPU_UNIFORM_MVP, /* mat4 ModelViewProjectionMatrix */
+
+ GPU_UNIFORM_MODEL_INV, /* mat4 ModelMatrixInverse */
+ GPU_UNIFORM_VIEW_INV, /* mat4 ViewMatrixInverse */
+ GPU_UNIFORM_MODELVIEW_INV, /* mat4 ModelViewMatrixInverse */
+ GPU_UNIFORM_PROJECTION_INV, /* mat4 ProjectionMatrixInverse */
+ GPU_UNIFORM_VIEWPROJECTION_INV, /* mat4 ViewProjectionMatrixInverse */
+
+ GPU_UNIFORM_NORMAL, /* mat3 NormalMatrix */
+ GPU_UNIFORM_NORMAL_INV, /* mat3 NormalMatrixInverse */
+ GPU_UNIFORM_WORLDNORMAL, /* mat3 WorldNormalMatrix */
+ GPU_UNIFORM_CAMERATEXCO, /* vec4 CameraTexCoFactors */
+ GPU_UNIFORM_ORCO, /* vec3 OrcoTexCoFactors[] */
+
+ GPU_UNIFORM_COLOR, /* vec4 color */
+ GPU_UNIFORM_EYE, /* vec3 eye */
+ GPU_UNIFORM_CALLID, /* int callId */
+ GPU_UNIFORM_OBJECT_INFO, /* vec3 objectInfo */
+
+ GPU_UNIFORM_CUSTOM, /* custom uniform, not one of the above built-ins */
+
+ GPU_NUM_UNIFORMS, /* Special value, denotes number of builtin uniforms. */
} GPUUniformBuiltin;
typedef struct GPUShaderInput {
- struct GPUShaderInput *next;
- uint32_t name_offset;
- uint name_hash;
- /** Only for uniform inputs. */
- GPUUniformBuiltin builtin_type;
- /** Only for attribute inputs. */
- uint32_t gl_type;
- /** Only for attribute inputs. */
- int32_t size;
- int32_t location;
+ struct GPUShaderInput *next;
+ uint32_t name_offset;
+ uint name_hash;
+ /** Only for uniform inputs. */
+ GPUUniformBuiltin builtin_type;
+ /** Only for attribute inputs. */
+ uint32_t gl_type;
+ /** Only for attribute inputs. */
+ int32_t size;
+ int32_t location;
} GPUShaderInput;
#define GPU_NUM_SHADERINTERFACE_BUCKETS 257
#define GPU_SHADERINTERFACE_REF_ALLOC_COUNT 16
typedef struct GPUShaderInterface {
- int32_t program;
- uint32_t name_buffer_offset;
- GPUShaderInput *attr_buckets[GPU_NUM_SHADERINTERFACE_BUCKETS];
- GPUShaderInput *uniform_buckets[GPU_NUM_SHADERINTERFACE_BUCKETS];
- GPUShaderInput *ubo_buckets[GPU_NUM_SHADERINTERFACE_BUCKETS];
- GPUShaderInput *builtin_uniforms[GPU_NUM_UNIFORMS];
- char *name_buffer;
- struct GPUBatch **batches; /* references to batches using this interface */
- uint batches_len;
+ int32_t program;
+ uint32_t name_buffer_offset;
+ GPUShaderInput *attr_buckets[GPU_NUM_SHADERINTERFACE_BUCKETS];
+ GPUShaderInput *uniform_buckets[GPU_NUM_SHADERINTERFACE_BUCKETS];
+ GPUShaderInput *ubo_buckets[GPU_NUM_SHADERINTERFACE_BUCKETS];
+ GPUShaderInput *builtin_uniforms[GPU_NUM_UNIFORMS];
+ char *name_buffer;
+ struct GPUBatch **batches; /* references to batches using this interface */
+ uint batches_len;
} GPUShaderInterface;
GPUShaderInterface *GPU_shaderinterface_create(int32_t program_id);
void GPU_shaderinterface_discard(GPUShaderInterface *);
const GPUShaderInput *GPU_shaderinterface_uniform(const GPUShaderInterface *, const char *name);
-const GPUShaderInput *GPU_shaderinterface_uniform_ensure(const GPUShaderInterface *, const char *name);
-const GPUShaderInput *GPU_shaderinterface_uniform_builtin(const GPUShaderInterface *, GPUUniformBuiltin);
+const GPUShaderInput *GPU_shaderinterface_uniform_ensure(const GPUShaderInterface *,
+ const char *name);
+const GPUShaderInput *GPU_shaderinterface_uniform_builtin(const GPUShaderInterface *,
+ GPUUniformBuiltin);
const GPUShaderInput *GPU_shaderinterface_ubo(const GPUShaderInterface *, const char *name);
const GPUShaderInput *GPU_shaderinterface_attr(const GPUShaderInterface *, const char *name);