Cleanup: use shorter name for shader config
[blender.git] / source / blender / gpu / intern / gpu_shader.c
index 8bc53a71b5a56888f0dd285c04e927e8e9496fd8..4245adbde5f1605a3df9dc268e174fb728a45cc1 100644 (file)
@@ -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,