[Mesa-dev] [PATCH] glsl: Don't allow vertex shader input arrays until GLSL 1.50.

Paul Berry stereotype441 at gmail.com
Thu Jul 11 16:24:19 PDT 2013


Vertex shader inputs are not allowed to be arrays until GLSL 1.50.  We
were accidentally enabling them for GLSL 1.40 (although we haven't
written any tests for them, so it's not clear whether they actually
work).

NOTE: although this is a simple bug fix, it probably isn't sensible to
cherry-pick it to stable release branches, since its only effect is to
cause incorrectly-written shaders to fail to compile.
---
 src/glsl/ast_to_hir.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 611a85d..e349409 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2703,7 +2703,7 @@ ast_declarator_list::hir(exec_list *instructions,
 	    }
 
 	    if (!error_emitted && var->type->is_array() &&
-                !state->check_version(140, 0, &loc,
+                !state->check_version(150, 0, &loc,
                                       "vertex shader input / attribute "
                                       "cannot have array type")) {
 	       error_emitted = true;
-- 
1.8.3.2



More information about the mesa-dev mailing list