From 44bac4c8ccf19cb5941435115b8f89a9d14e9c23 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 Jun 2022 14:38:06 +1000 Subject: Cleanup: use 'e' prefix for enum types - CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage --- source/blender/gpu/GPU_buffers.h | 2 +- source/blender/gpu/GPU_material.h | 8 ++++---- source/blender/gpu/intern/gpu_buffers.c | 2 +- source/blender/gpu/intern/gpu_node_graph.c | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 1af0080baef..e4a01670558 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -86,7 +86,7 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers, const float *vmask, const void *vcol_data, int vcol_type, - AttributeDomain vcol_domain, + eAttrDomain vcol_domain, const int *sculpt_face_sets, int face_sets_color_seed, int face_sets_color_default, diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index fff90e6f8ff..c0633f0323d 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -7,7 +7,7 @@ #pragma once -#include "DNA_customdata_types.h" /* for CustomDataType */ +#include "DNA_customdata_types.h" /* for eCustomDataType */ #include "DNA_image_types.h" #include "DNA_listBase.h" @@ -130,9 +130,9 @@ typedef void (*GPUCodegenCallbackFn)(void *thunk, GPUMaterial *mat, GPUCodegenOu GPUNodeLink *GPU_constant(const float *num); GPUNodeLink *GPU_uniform(const float *num); -GPUNodeLink *GPU_attribute(GPUMaterial *mat, CustomDataType type, const char *name); +GPUNodeLink *GPU_attribute(GPUMaterial *mat, eCustomDataType type, const char *name); GPUNodeLink *GPU_attribute_with_default(GPUMaterial *mat, - CustomDataType type, + eCustomDataType type, const char *name, eGPUDefaultValue default_value); GPUNodeLink *GPU_uniform_attribute(GPUMaterial *mat, const char *name, bool use_dupli); @@ -259,7 +259,7 @@ void GPU_pass_cache_free(void); typedef struct GPUMaterialAttribute { struct GPUMaterialAttribute *next, *prev; - int type; /* CustomDataType */ + int type; /* eCustomDataType */ char name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ char input_name[12 + 1]; /* GPU_MAX_SAFE_ATTR_NAME + 1 */ eGPUType gputype; diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index fed998bb33e..82a9dea114e 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -200,7 +200,7 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers, const float *vmask, const void *vcol_data, int vcol_type, - AttributeDomain vcol_domain, + eAttrDomain vcol_domain, const int *sculpt_face_sets, int face_sets_color_seed, int face_sets_color_default, diff --git a/source/blender/gpu/intern/gpu_node_graph.c b/source/blender/gpu/intern/gpu_node_graph.c index 91fb0544cf6..cac6f7cb38b 100644 --- a/source/blender/gpu/intern/gpu_node_graph.c +++ b/source/blender/gpu/intern/gpu_node_graph.c @@ -328,7 +328,7 @@ void gpu_node_graph_finalize_uniform_attrs(GPUNodeGraph *graph) /* Attributes and Textures */ -static char attr_prefix_get(CustomDataType type) +static char attr_prefix_get(eCustomDataType type) { switch (type) { case CD_TANGENT: @@ -364,7 +364,7 @@ static void attr_input_name(GPUMaterialAttribute *attr) /** Add a new varying attribute of given type and name. Returns NULL if out of slots. */ static GPUMaterialAttribute *gpu_node_graph_add_attribute(GPUNodeGraph *graph, - CustomDataType type, + eCustomDataType type, const char *name) { /* Find existing attribute. */ @@ -468,7 +468,7 @@ static GPUMaterialTexture *gpu_node_graph_add_texture(GPUNodeGraph *graph, /* Creating Inputs */ -GPUNodeLink *GPU_attribute(GPUMaterial *mat, const CustomDataType type, const char *name) +GPUNodeLink *GPU_attribute(GPUMaterial *mat, const eCustomDataType type, const char *name) { GPUNodeGraph *graph = gpu_material_node_graph(mat); GPUMaterialAttribute *attr = gpu_node_graph_add_attribute(graph, type, name); @@ -491,7 +491,7 @@ GPUNodeLink *GPU_attribute(GPUMaterial *mat, const CustomDataType type, const ch } GPUNodeLink *GPU_attribute_with_default(GPUMaterial *mat, - const CustomDataType type, + const eCustomDataType type, const char *name, eGPUDefaultValue default_value) { -- cgit v1.2.3