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-01-28 23:46:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-29 00:32:25 +0300
commit68cab3aff63aea95830aa082a160200768d0e826 (patch)
tree3a042217ce34d84387cdfcca97316597800396db /source/blender/gpu/intern/gpu_codegen.h
parenta9c297165878b3c427a20f787cc90a6ada4df253 (diff)
Cleanup: replace attrib w/ attr
Also rename GPUVertexAttribs to GPUVertAttrLayers, avoids confusion with GPUVertAttr which isn't closely related.
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.h')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h
index 2325fb564ab..9c306cbd855 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -41,7 +41,7 @@
struct GPUNode;
struct GPUOutput;
struct GPUShader;
-struct GPUVertexAttribs;
+struct GPUVertAttrLayers;
struct ListBase;
struct PreviewImage;
@@ -55,7 +55,7 @@ typedef enum eGPUDataSource {
GPU_SOURCE_OUTPUT,
GPU_SOURCE_CONSTANT,
GPU_SOURCE_UNIFORM,
- GPU_SOURCE_ATTRIB,
+ GPU_SOURCE_ATTR,
GPU_SOURCE_BUILTIN,
GPU_SOURCE_STRUCT,
GPU_SOURCE_TEX,
@@ -63,7 +63,7 @@ typedef enum eGPUDataSource {
typedef enum {
GPU_NODE_LINK_NONE = 0,
- GPU_NODE_LINK_ATTRIB,
+ GPU_NODE_LINK_ATTR,
GPU_NODE_LINK_BUILTIN,
GPU_NODE_LINK_COLORBAND,
GPU_NODE_LINK_CONSTANT,
@@ -99,10 +99,10 @@ struct GPUNodeLink {
struct GPUTexture **coba;
/* GPU_NODE_LINK_OUTPUT */
struct GPUOutput *output;
- /* GPU_NODE_LINK_ATTRIB */
+ /* GPU_NODE_LINK_ATTR */
struct {
- const char *attribname;
- CustomDataType attribtype;
+ const char *attr_name;
+ CustomDataType attr_type;
};
/* GPU_NODE_LINK_IMAGE_BLENDER */
struct {
@@ -151,12 +151,16 @@ typedef struct GPUInput {
int texid; /* number for multitexture, starting from zero */
eGPUType textype; /* texture type (2D, 1D Array ...) */
};
- /* GPU_SOURCE_ATTRIB */
+ /* GPU_SOURCE_ATTR */
struct {
- char attribname[MAX_CUSTOMDATA_LAYER_NAME]; /* attribute name */
- int attribid; /* id for vertex attributes */
- bool attribfirst; /* this is the first one that is bound */
- CustomDataType attribtype; /* attribute type */
+ /** Attribute name. */
+ char attr_name[MAX_CUSTOMDATA_LAYER_NAME];
+ /** ID for vertex attributes. */
+ int attr_id;
+ /** This is the first one that is bound. */
+ bool attr_first;
+ /** Attribute type. */
+ CustomDataType attr_type;
};
};
} GPUInput;
@@ -178,7 +182,7 @@ typedef struct GPUPass GPUPass;
GPUPass *GPU_generate_pass(
GPUMaterial *material,
- GPUNodeLink *frag_outlink, struct GPUVertexAttribs *attribs,
+ GPUNodeLink *frag_outlink, struct GPUVertAttrLayers *attrs,
ListBase *nodes, int *builtins,
const char *vert_code, const char *geom_code,
const char *frag_lib, const char *defines);
@@ -186,7 +190,7 @@ GPUPass *GPU_generate_pass(
struct GPUShader *GPU_pass_shader_get(GPUPass *pass);
void GPU_nodes_extract_dynamic_inputs(struct GPUShader *shader, ListBase *inputs, ListBase *nodes);
-void GPU_nodes_get_vertex_attributes(ListBase *nodes, struct GPUVertexAttribs *attribs);
+void GPU_nodes_get_vertex_attrs(ListBase *nodes, struct GPUVertAttrLayers *attrs);
void GPU_nodes_prune(ListBase *nodes, struct GPUNodeLink *outlink);
void GPU_pass_compile(GPUPass *pass, const char *shname);