diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-29 15:36:02 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-29 16:07:34 -0700 |
commit | 8a24cd5ceaf74a9be5954b5f7426b1612ce8ecd3 (patch) | |
tree | 76571a74598c4b16a3ad5e9554fc3f371375dd8a | |
parent | 32a494586fa8cb01a4ff4c5fa270d29e15c09aa8 (diff) |
Allow single-component constructors
This causes the following tests to pass:
glslparsertest/shaders/CorrectVersion.V110.frag
shaders/glsl-vs-sqrt-zero.frag
shaders/glsl-vs-sqrt-zero.vert
This causes the following tests to fail. These shaders were
previously failing to compile, but they were all failing for the wrong
reasons.
glslparsertest/shaders/attribute1.vert
glslparsertest/shaders/attribute2.vert
glslparsertest/shaders/main2.vert
-rw-r--r-- | ast_function.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ast_function.cpp b/ast_function.cpp index 6470057a90..36bf0c9cc2 100644 --- a/ast_function.cpp +++ b/ast_function.cpp @@ -327,7 +327,7 @@ ast_function_expression::hir(exec_list *instructions, * arguments to provide an initializer for every component in the * constructed value." */ - if (components_used < type_components) { + if ((components_used < type_components) && (components_used != 1)) { _mesa_glsl_error(& loc, state, "too few components to construct " "`%s'", constructor_type->name); |