projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9697f80
)
glsl: Guard against error_type in the tree rebalancer.
author
Kenneth Graunke
<kenneth@whitecape.org>
Tue, 15 Jul 2014 23:35:55 +0000
(16:35 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 16 Jul 2014 22:43:13 +0000
(15:43 -0700)
This helped me track down the bug fixed in the previous commit.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/opt_rebalance_tree.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/opt_rebalance_tree.cpp
b/src/glsl/opt_rebalance_tree.cpp
index 7ef0d2db39209aa7fbede1da21ee8b316f83ae6a..f82b16b5412dde9e7c32b9dff242c6230cb571d2 100644
(file)
--- a/
src/glsl/opt_rebalance_tree.cpp
+++ b/
src/glsl/opt_rebalance_tree.cpp
@@
-271,11
+271,13
@@
update_types(ir_instruction *ir, void *)
if (!expr)
return;
-
expr->
type =
+
const glsl_type *const new_
type =
glsl_type::get_instance(expr->type->base_type,
MAX2(expr->operands[0]->type->components(),
expr->operands[1]->type->components()),
1);
+ assert(new_type != glsl_type::error_type);
+ expr->type = new_type;
}
void