summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2011-06-28 09:42:24 -0700
committerIan Romanick <ian.d.romanick@intel.com>2011-07-07 14:06:00 -0700
commit4e2a5d013d24105cb746b9ccd4d3448f938768dc (patch)
tree886fa4fd4ff17f0c89f5738ca838b556084b88ff
parentcd73c06eed3e8ff517d8741eb91b2d3356cfd214 (diff)
glsl: permit explicit locations on fragment shader outputs, not inputs
From the OpenGL docs for GL_ARB_explicit_attrib_location: This extension provides a method to pre-assign attribute locations to named vertex shader inputs and color numbers to named fragment shader outputs. This was accidentally implemented for fragment shader inputs. This patch fixes it to apply to fragment shader outputs. Fixes piglit tests spec/ARB_explicit_attrib_location/1.{10,20}/compiler/layout-{01,03,06,07,08,09,10}.frag Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> NOTE: This is a candidate for the 7.10 and 7.11 branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624 (cherry picked from commit b078aad8ab22d840456688480a8c27d4664297ce)
-rw-r--r--src/glsl/ast_to_hir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index c88a745302b..74252da9559 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -1918,7 +1918,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
break;
case fragment_shader:
- if (!global_scope || (var->mode != ir_var_in)) {
+ if (!global_scope || (var->mode != ir_var_out)) {
fail = true;
string = "output";
}