projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e466b18
)
glsl: Reject structure constructors that have too many arguments.
author
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 2 Sep 2010 02:44:25 +0000
(19:44 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 2 Sep 2010 03:39:09 +0000
(20:39 -0700)
Fixes piglit test constructor-27.vert.
src/glsl/ast_function.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/ast_function.cpp
b/src/glsl/ast_function.cpp
index 1cd300c382d6bb214411caacf52d63c160558637..c3b4441435fdce54f3cf4affb335e0e891b62d0c 100644
(file)
--- a/
src/glsl/ast_function.cpp
+++ b/
src/glsl/ast_function.cpp
@@
-1207,6
+1207,12
@@
ast_function_expression::hir(exec_list *instructions,
node = node->next;
}
+ if (!node->is_tail_sentinel()) {
+ _mesa_glsl_error(&loc, state, "too many parameters in constructor "
+ "for `%s'", type->name);
+ return ir_call::get_error_instruction(ctx);
+ }
+
ir_rvalue *const constant =
constant_record_constructor(type, &actual_parameters, state);