From 4d5de020d8bfb796f422f7f4aa240b6dd13d49cf Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sat, 13 Apr 2013 06:05:31 +0000 Subject: [PATCH] Force "smooth" interpolation qualification when in a fragment shader. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21140 e7fa87d3-cd2b-0410-9028-fcbf551c1848 --- BuildLinux.sh | 5 +++-- glslang/MachineIndependent/glslang.y | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BuildLinux.sh b/BuildLinux.sh index 1abd9c5c..dae0d724 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -8,6 +8,7 @@ LD_LIBRARY_PATH=`pwd`/glslang/MachineIndependent/lib:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH # run using test data -cd StandAlone -./StandAlone -i sample.vert sample.frag +cd Test +../StandAlone/StandAlone -i sample.vert sample.frag + diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y index d4e85c7b..80405cd4 100644 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -1601,6 +1601,9 @@ fully_specified_type $$.qualifier = $1.qualifier; if ($$.qualifier.precision == EpqNone) $$.qualifier.precision = $2.qualifier.precision; + + if (! $$.qualifier.isInterpolation() && parseContext.language == EShLangFragment) + $$.qualifier.smooth = true; } ;