diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-29 17:40:11 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-29 17:42:43 -0700 |
commit | 2d816204c875ace0fc363d3eeada2255a5009d5c (patch) | |
tree | 1afdfc739f845542814cb7019e692206153dbe09 | |
parent | 8901eeefc94e4211c87ff13e951113749fc495de (diff) |
Arrays are not allowed as vertex shader inputs in GLSL 1.30 either
-rw-r--r-- | ast_to_hir.cpp | 8 | ||||
-rw-r--r-- | tests/attribute-11.glsl | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index dd024836a0..a5fa5e112f 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -1155,6 +1155,12 @@ ast_declarator_list::hir(exec_list *instructions, * vectors. Vertex shader inputs can also form arrays of these * types, but not structures." * + * From page 31 (page 27 of the PDF) of the GLSL 1.30 spec: + * + * "Vertex shader inputs can only be float, floating-point + * vectors, matrices, signed and unsigned integers and integer + * vectors. They cannot be arrays or structures." + * * From page 23 (page 29 of the PDF) of the GLSL 1.20 spec: * * "The attribute qualifier can be used only with float, @@ -1181,7 +1187,7 @@ ast_declarator_list::hir(exec_list *instructions, error_emitted = true; } - if (!error_emitted && (state->language_version <= 120) + if (!error_emitted && (state->language_version <= 130) && var->type->is_array()) { _mesa_glsl_error(& loc, state, "vertex shader input / attribute cannot have " diff --git a/tests/attribute-11.glsl b/tests/attribute-11.glsl index c1e6901431..47cb5a0583 100644 --- a/tests/attribute-11.glsl +++ b/tests/attribute-11.glsl @@ -1,5 +1,5 @@ #version 130 -/* PASS */ +/* FAIL - attribute cannot have array type in GLSL 1.30 */ attribute vec4 i[10]; void main() |