glsl2: Fix ir_validate validating null variable names.

An unnamed variable in a prototype will have a NULL ->name, so don't
worry about storage then.

Fixes:
CorrectFunction1.vert
CorrectParse1.frag
This commit is contained in:
Eric Anholt
2010-08-03 11:43:25 -07:00
parent 900ab2f564
commit c22dee7216

View File

@@ -313,6 +313,7 @@ ir_validate::visit(ir_variable *ir)
* in the ir_dereference_variable handler to ensure that a variable is
* declared before it is dereferenced.
*/
if (ir->name)
assert(talloc_parent(ir->name) == ir);
hash_table_insert(ht, ir, ir);