[Mesa-dev] [PATCH v3 12/16] glsl/linker: Add a helper variable for compiler options

Jason Ekstrand jason at jlekstrand.net
Fri May 20 23:53:23 UTC 2016


Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/compiler/glsl/linker.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index de56945..c7a7c63 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4878,10 +4878,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);
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list