diff options
author | marha <marha@users.sourceforge.net> | 2012-05-15 15:02:37 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-05-15 15:02:37 +0200 |
commit | 062c45ff0df6a52080dcd74433710d47127cbe29 (patch) | |
tree | b038a5498555dfc9adf695c49d185f9414056931 /mesalib/src/glsl/linker.cpp | |
parent | 1a71b50696cc230cd055905a5f9fdbd3fa7c89af (diff) | |
download | vcxsrv-062c45ff0df6a52080dcd74433710d47127cbe29.tar.gz vcxsrv-062c45ff0df6a52080dcd74433710d47127cbe29.tar.bz2 vcxsrv-062c45ff0df6a52080dcd74433710d47127cbe29.zip |
xserver mesa git update 15 May 2012
Diffstat (limited to 'mesalib/src/glsl/linker.cpp')
-rw-r--r-- | mesalib/src/glsl/linker.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp index 6ba297237..bdab499f0 100644 --- a/mesalib/src/glsl/linker.cpp +++ b/mesalib/src/glsl/linker.cpp @@ -2296,6 +2296,17 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) prog->LinkStatus = true; } + /* Implement the GLSL 1.30+ rule for discard vs infinite loops Do + * it before optimization because we want most of the checks to get + * dropped thanks to constant propagation. + */ + if (max_version >= 130) { + struct gl_shader *sh = prog->_LinkedShaders[MESA_SHADER_FRAGMENT]; + if (sh) { + lower_discard_flow(sh->ir); + } + } + /* Do common optimization before assigning storage for attributes, * uniforms, and varyings. Later optimization could possibly make * some of that unused. |