diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-23 06:15:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-23 06:16:03 +0300 |
commit | 2e4f1b592f7d1b63ec012528997fab64f16c0416 (patch) | |
tree | e53da8d758e3f3454afd27064d2382260653e210 /source/blender/gpu/intern/gpu_uniformbuffer.c | |
parent | 14d947dcadea7c9debe6c8a078a571eba6cb828c (diff) |
Cleanup: use eGPU prefix for GPU enum types
Diffstat (limited to 'source/blender/gpu/intern/gpu_uniformbuffer.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_uniformbuffer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/gpu/intern/gpu_uniformbuffer.c b/source/blender/gpu/intern/gpu_uniformbuffer.c index 97dc511e58b..74ba9171a92 100644 --- a/source/blender/gpu/intern/gpu_uniformbuffer.c +++ b/source/blender/gpu/intern/gpu_uniformbuffer.c @@ -42,21 +42,21 @@ #include "GPU_material.h" #include "GPU_uniformbuffer.h" -typedef enum GPUUniformBufferFlag { +typedef enum eGPUUniformBufferFlag { GPU_UBO_FLAG_INITIALIZED = (1 << 0), GPU_UBO_FLAG_DIRTY = (1 << 1), -} GPUUniformBufferFlag; +} eGPUUniformBufferFlag; -typedef enum GPUUniformBufferType { +typedef enum eGPUUniformBufferType { GPU_UBO_STATIC = 0, GPU_UBO_DYNAMIC = 1, -} GPUUniformBufferType; +} eGPUUniformBufferType; struct GPUUniformBuffer { int size; /* in bytes */ GLuint bindcode; /* opengl identifier for UBO */ int bindpoint; /* current binding point */ - GPUUniformBufferType type; + eGPUUniformBufferType type; }; #define GPUUniformBufferStatic GPUUniformBuffer @@ -68,7 +68,7 @@ typedef struct GPUUniformBufferDynamic { } GPUUniformBufferDynamic; /* Prototypes */ -static GPUType get_padded_gpu_type(struct LinkData *link); +static eGPUType get_padded_gpu_type(struct LinkData *link); static void gpu_uniformbuffer_inputs_sort(struct ListBase *inputs); /* Only support up to this type, if you want to extend it, make sure the @@ -148,7 +148,7 @@ GPUUniformBuffer *GPU_uniformbuffer_dynamic_create(ListBase *inputs, char err_ou gpu_uniformbuffer_inputs_sort(inputs); for (LinkData *link = inputs->first; link; link = link->next) { - const GPUType gputype = get_padded_gpu_type(link); + const eGPUType gputype = get_padded_gpu_type(link); ubo->buffer.size += gputype * sizeof(float); } @@ -231,10 +231,10 @@ void GPU_uniformbuffer_dynamic_update(GPUUniformBuffer *ubo_) * We need to pad some data types (vec3) on the C side * To match the GPU expected memory block alignment. */ -static GPUType get_padded_gpu_type(LinkData *link) +static eGPUType get_padded_gpu_type(LinkData *link) { GPUInput *input = link->data; - GPUType gputype = input->type; + eGPUType gputype = input->type; /* Unless the vec3 is followed by a float we need to treat it as a vec4. */ if (gputype == GPU_VEC3 && @@ -269,7 +269,7 @@ static void gpu_uniformbuffer_inputs_sort(ListBase *inputs) /* Creates a lookup table for the different types; */ LinkData *inputs_lookup[MAX_UBO_GPU_TYPE + 1] = {NULL}; - GPUType cur_type = MAX_UBO_GPU_TYPE + 1; + eGPUType cur_type = MAX_UBO_GPU_TYPE + 1; for (LinkData *link = inputs->first; link; link = link->next) { GPUInput *input = link->data; |