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-02-10 03:02:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-10 03:02:06 +0300
commit16d7967c2b404cbe6719192e073c7685376f6ab1 (patch)
tree67cce46fa7b7fafccf7a7ddc9ed450f0afd18e2e /source/blender/gpu/intern
parent66c23ea2b4a4eb66490a8b9b6c57ed60ec934a42 (diff)
Cleanup: use shorter name for shader config
The struct name is descriptive, this isn't going to be confused with other variables.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_batch.c4
-rw-r--r--source/blender/gpu/intern/gpu_shader.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c
index bd4fa25c306..9738b303700 100644
--- a/source/blender/gpu/intern/gpu_batch.c
+++ b/source/blender/gpu/intern/gpu_batch.c
@@ -669,9 +669,9 @@ void GPU_batch_program_set_shader(GPUBatch *batch, GPUShader *shader)
}
void GPU_batch_program_set_builtin_with_config(
- GPUBatch *batch, eGPUBuiltinShader shader_id, eGPUShaderConfig shader_cfg)
+ GPUBatch *batch, eGPUBuiltinShader shader_id, eGPUShaderConfig sh_cfg)
{
- GPUShader *shader = GPU_shader_get_builtin_shader_with_config(shader_id, shader_cfg);
+ GPUShader *shader = GPU_shader_get_builtin_shader_with_config(shader_id, sh_cfg);
GPU_batch_program_set(batch, shader->program, shader->interface);
}
diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c
index 8bc53a71b5a..4245adbde5f 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -1170,11 +1170,11 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = {
};
GPUShader *GPU_shader_get_builtin_shader_with_config(
- eGPUBuiltinShader shader, eGPUShaderConfig shader_cfg)
+ eGPUBuiltinShader shader, eGPUShaderConfig sh_cfg)
{
BLI_assert(shader < GPU_SHADER_BUILTIN_LEN);
- BLI_assert(shader_cfg < GPU_SHADER_CFG_LEN);
- GPUShader **sh_p = &builtin_shaders[shader_cfg][shader];
+ BLI_assert(sh_cfg < GPU_SHADER_CFG_LEN);
+ GPUShader **sh_p = &builtin_shaders[sh_cfg][shader];
if (*sh_p == NULL) {
GPUShaderStages stages_legacy = {NULL};
@@ -1199,10 +1199,10 @@ GPUShader *GPU_shader_get_builtin_shader_with_config(
}
/* common case */
- if (shader_cfg == GPU_SHADER_CFG_DEFAULT) {
+ if (sh_cfg == GPU_SHADER_CFG_DEFAULT) {
*sh_p = GPU_shader_create(stages->vert, stages->frag, stages->geom, NULL, stages->defs, __func__);
}
- else if (shader_cfg == GPU_SHADER_CFG_CLIPPED) {
+ else if (sh_cfg == GPU_SHADER_CFG_CLIPPED) {
/* Remove eventually, for now ensure support for each shader has been added. */
BLI_assert(ELEM(shader,
GPU_SHADER_3D_UNIFORM_COLOR,