glsl/linker: Add a helper variable for compiler options
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 19 May 2016 03:29:59 +0000 (20:29 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 24 May 2016 02:12:34 +0000 (19:12 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/linker.cpp

index ca2f0604a3a60e9a34b04cd9b129efaa13860a75..89cd9f795cc3d0d6aa44e7fdef8d5409248762fb 100644 (file)
@@ -4902,10 +4902,13 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
       if (prog->_LinkedShaders[i] == NULL)
         continue;
 
-      if (ctx->Const.ShaderCompilerOptions[i].LowerBufferInterfaceBlocks)
+      const struct gl_shader_compiler_options *options =
+         &ctx->Const.ShaderCompilerOptions[i];
+
+      if (options->LowerBufferInterfaceBlocks)
          lower_ubo_reference(prog->_LinkedShaders[i]);
 
-      if (ctx->Const.ShaderCompilerOptions[i].LowerShaderSharedVariables)
+      if (options->LowerShaderSharedVariables)
          lower_shared_reference(prog->_LinkedShaders[i],
                                 &prog->Comp.SharedSize);