Lines Matching refs:ir
64 virtual ir_visitor_status visit(ir_dereference_variable *ir);
66 virtual ir_visitor_status visit_enter(ir_discard *ir);
67 virtual ir_visitor_status visit_enter(ir_if *ir);
69 virtual ir_visitor_status visit_enter(ir_function *ir);
70 virtual ir_visitor_status visit_leave(ir_function *ir);
71 virtual ir_visitor_status visit_enter(ir_function_signature *ir);
73 virtual ir_visitor_status visit_leave(ir_expression *ir);
74 virtual ir_visitor_status visit_leave(ir_swizzle *ir);
78 virtual ir_visitor_status visit_enter(ir_assignment *ir);
79 virtual ir_visitor_status visit_enter(ir_call *ir);
81 static void validate_ir(ir_instruction *ir, void *data);
91 ir_validate::visit(ir_dereference_variable *ir) in visit() argument
93 if ((ir->var == NULL) || (ir->var->as_variable() == NULL)) { in visit()
95 (void *) ir, (void *) ir->var); in visit()
99 if (_mesa_set_search(ir_set, ir->var) == NULL) { in visit()
102 (void *) ir, ir->var->name, (void *) ir->var); in visit()
106 this->validate_ir(ir, this->data_enter); in visit()
112 ir_validate::visit_enter(class ir_dereference_array *ir) in visit_enter() argument
114 if (!ir->array->type->is_array() && !ir->array->type->is_matrix() && in visit_enter()
115 !ir->array->type->is_vector()) { in visit_enter()
118 (void *) ir); in visit_enter()
119 ir->print(); in visit_enter()
124 if (!ir->array_index->type->is_scalar()) { in visit_enter()
126 (void *) ir, ir->array_index->type->name); in visit_enter()
130 if (!ir->array_index->type->is_integer()) { in visit_enter()
132 (void *) ir, ir->array_index->type->name); in visit_enter()
140 ir_validate::visit_enter(ir_discard *ir) in visit_enter() argument
142 if (ir->condition && ir->condition->type != glsl_type::bool_type) { in visit_enter()
144 ir->condition->type->name); in visit_enter()
145 ir->print(); in visit_enter()
154 ir_validate::visit_enter(ir_if *ir) in visit_enter() argument
156 if (ir->condition->type != glsl_type::bool_type) { in visit_enter()
158 ir->condition->type->name); in visit_enter()
159 ir->print(); in visit_enter()
169 ir_validate::visit_enter(ir_function *ir) in visit_enter() argument
177 ir->name, (void *) ir, in visit_enter()
186 this->current_function = ir; in visit_enter()
188 this->validate_ir(ir, this->data_enter); in visit_enter()
193 foreach_in_list(ir_instruction, sig, &ir->signatures) { in visit_enter()
196 ir->name); in visit_enter()
205 ir_validate::visit_leave(ir_function *ir) in visit_leave() argument
207 assert(ralloc_parent(ir->name) == ir); in visit_leave()
214 ir_validate::visit_enter(ir_function_signature *ir) in visit_enter() argument
216 if (this->current_function != ir->function()) { in visit_enter()
220 (void *) ir, in visit_enter()
222 ir->function_name(), (void *) ir->function()); in visit_enter()
226 if (ir->return_type == NULL) { in visit_enter()
228 (void *) ir, ir->function_name()); in visit_enter()
232 this->validate_ir(ir, this->data_enter); in visit_enter()
238 ir_validate::visit_leave(ir_expression *ir) in visit_leave() argument
240 for (unsigned i = ir->num_operands; i < 4; i++) { in visit_leave()
241 assert(ir->operands[i] == NULL); in visit_leave()
244 for (unsigned i = 0; i < ir->num_operands; i++) { in visit_leave()
245 assert(ir->operands[i] != NULL); in visit_leave()
248 switch (ir->operation) { in visit_leave()
250 assert(ir->operands[0]->type == ir->type); in visit_leave()
253 assert(ir->type->is_boolean()); in visit_leave()
254 assert(ir->operands[0]->type->is_boolean()); in visit_leave()
258 assert(ir->type == ir->operands[0]->type); in visit_leave()
263 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT || in visit_leave()
264 ir->operands[0]->type->is_float() || in visit_leave()
265 ir->operands[0]->type->is_double() || in visit_leave()
266 ir->operands[0]->type->base_type == GLSL_TYPE_INT64); in visit_leave()
267 assert(ir->type == ir->operands[0]->type); in visit_leave()
273 assert(ir->type->is_float() || in visit_leave()
274 ir->type->is_double()); in visit_leave()
275 assert(ir->type == ir->operands[0]->type); in visit_leave()
283 assert(ir->operands[0]->type->is_float()); in visit_leave()
284 assert(ir->type == ir->operands[0]->type); in visit_leave()
288 assert(ir->operands[0]->type->is_float()); in visit_leave()
289 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
292 assert(ir->operands[0]->type->is_float()); in visit_leave()
293 assert(ir->type->base_type == GLSL_TYPE_UINT); in visit_leave()
296 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in visit_leave()
297 assert(ir->type->is_float()); in visit_leave()
300 assert(ir->operands[0]->type->is_float()); in visit_leave()
301 assert(ir->type->is_boolean()); in visit_leave()
304 assert(ir->operands[0]->type->is_boolean()); in visit_leave()
305 assert(ir->type->is_float()); in visit_leave()
308 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in visit_leave()
309 assert(ir->type->is_boolean()); in visit_leave()
312 assert(ir->operands[0]->type->is_boolean()); in visit_leave()
313 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
316 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in visit_leave()
317 assert(ir->type->is_float()); in visit_leave()
320 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in visit_leave()
321 assert(ir->type->base_type == GLSL_TYPE_UINT); in visit_leave()
324 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in visit_leave()
325 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
328 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in visit_leave()
329 assert(ir->type->is_float()); in visit_leave()
332 assert(ir->operands[0]->type->is_float()); in visit_leave()
333 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
336 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in visit_leave()
337 assert(ir->type->is_float()); in visit_leave()
340 assert(ir->operands[0]->type->is_float()); in visit_leave()
341 assert(ir->type->base_type == GLSL_TYPE_UINT); in visit_leave()
345 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
346 assert(ir->type->is_double()); in visit_leave()
349 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64); in visit_leave()
350 assert(ir->type->is_double()); in visit_leave()
353 assert(ir->operands[0]->type->is_double()); in visit_leave()
354 assert(ir->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
357 assert(ir->operands[0]->type->is_double()); in visit_leave()
358 assert(ir->type->base_type == GLSL_TYPE_INT64); in visit_leave()
361 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64); in visit_leave()
362 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
365 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
366 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
369 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64); in visit_leave()
370 assert(ir->type->base_type == GLSL_TYPE_UINT); in visit_leave()
373 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
374 assert(ir->type->base_type == GLSL_TYPE_UINT); in visit_leave()
377 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64); in visit_leave()
378 assert(ir->type->is_boolean()); in visit_leave()
381 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64); in visit_leave()
382 assert(ir->type->is_float()); in visit_leave()
385 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
386 assert(ir->type->is_float()); in visit_leave()
389 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64); in visit_leave()
390 assert(ir->type->is_double()); in visit_leave()
393 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
394 assert(ir->type->is_double()); in visit_leave()
397 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in visit_leave()
398 assert(ir->type->base_type == GLSL_TYPE_INT64); in visit_leave()
401 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in visit_leave()
402 assert(ir->type->base_type == GLSL_TYPE_INT64); in visit_leave()
405 assert(ir->operands[0]->type->is_boolean()); in visit_leave()
406 assert(ir->type->base_type == GLSL_TYPE_INT64); in visit_leave()
409 assert(ir->operands[0]->type->is_float()); in visit_leave()
410 assert(ir->type->base_type == GLSL_TYPE_INT64); in visit_leave()
413 assert(ir->operands[0]->type->is_double()); in visit_leave()
414 assert(ir->type->base_type == GLSL_TYPE_INT64); in visit_leave()
417 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in visit_leave()
418 assert(ir->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
421 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in visit_leave()
422 assert(ir->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
425 assert(ir->operands[0]->type->is_float()); in visit_leave()
426 assert(ir->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
429 assert(ir->operands[0]->type->is_double()); in visit_leave()
430 assert(ir->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
433 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
434 assert(ir->type->base_type == GLSL_TYPE_INT64); in visit_leave()
437 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64); in visit_leave()
438 assert(ir->type->base_type == GLSL_TYPE_UINT64); in visit_leave()
445 assert(ir->operands[0]->type->is_float() || in visit_leave()
446 ir->operands[0]->type->is_double()); in visit_leave()
447 assert(ir->operands[0]->type == ir->type); in visit_leave()
457 assert(ir->operands[0]->type->is_float()); in visit_leave()
458 assert(ir->operands[0]->type == ir->type); in visit_leave()
464 assert(ir->type == glsl_type::uint_type); in visit_leave()
465 assert(ir->operands[0]->type == glsl_type::vec2_type); in visit_leave()
470 assert(ir->type == glsl_type::uint_type); in visit_leave()
471 assert(ir->operands[0]->type == glsl_type::vec4_type); in visit_leave()
475 assert(ir->type == glsl_type::double_type); in visit_leave()
476 assert(ir->operands[0]->type == glsl_type::uvec2_type); in visit_leave()
480 assert(ir->type == glsl_type::int64_t_type); in visit_leave()
481 assert(ir->operands[0]->type == glsl_type::ivec2_type); in visit_leave()
485 assert(ir->type == glsl_type::uint64_t_type); in visit_leave()
486 assert(ir->operands[0]->type == glsl_type::uvec2_type); in visit_leave()
490 assert(ir->type->is_sampler()); in visit_leave()
491 assert(ir->operands[0]->type == glsl_type::uvec2_type); in visit_leave()
495 assert(ir->type->is_image()); in visit_leave()
496 assert(ir->operands[0]->type == glsl_type::uvec2_type); in visit_leave()
502 assert(ir->type == glsl_type::vec2_type); in visit_leave()
503 assert(ir->operands[0]->type == glsl_type::uint_type); in visit_leave()
508 assert(ir->type == glsl_type::vec4_type); in visit_leave()
509 assert(ir->operands[0]->type == glsl_type::uint_type); in visit_leave()
513 assert(ir->type == glsl_type::uvec2_type); in visit_leave()
514 assert(ir->operands[0]->type == glsl_type::double_type); in visit_leave()
518 assert(ir->type == glsl_type::ivec2_type); in visit_leave()
519 assert(ir->operands[0]->type == glsl_type::int64_t_type); in visit_leave()
523 assert(ir->type == glsl_type::uvec2_type); in visit_leave()
524 assert(ir->operands[0]->type == glsl_type::uint64_t_type); in visit_leave()
528 assert(ir->type == glsl_type::uvec2_type); in visit_leave()
529 assert(ir->operands[0]->type->is_sampler()); in visit_leave()
533 assert(ir->type == glsl_type::uvec2_type); in visit_leave()
534 assert(ir->operands[0]->type->is_image()); in visit_leave()
538 assert(ir->operands[0]->type == ir->type); in visit_leave()
539 assert(ir->type->is_integer()); in visit_leave()
545 assert(ir->operands[0]->type->vector_elements == ir->type->vector_elements); in visit_leave()
546 assert(ir->operands[0]->type->is_integer()); in visit_leave()
547 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
555 assert(ir->operands[0]->type == ir->type); in visit_leave()
556 assert(ir->operands[0]->type->is_float()); in visit_leave()
560 assert(ir->type == glsl_type::int_type); in visit_leave()
561 assert(ir->operands[0]->type == glsl_type::uint_type); in visit_leave()
565 assert(ir->type == glsl_type::int_type); in visit_leave()
566 assert(ir->operands[0]->type->is_array()); in visit_leave()
567 assert(ir->operands[0]->type->is_unsized_array()); in visit_leave()
571 assert(ir->operands[0]->type->is_double()); in visit_leave()
572 assert(ir->type->is_float()); in visit_leave()
575 assert(ir->operands[0]->type->is_float()); in visit_leave()
576 assert(ir->type->is_double()); in visit_leave()
579 assert(ir->operands[0]->type->is_double()); in visit_leave()
580 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
583 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in visit_leave()
584 assert(ir->type->is_double()); in visit_leave()
587 assert(ir->operands[0]->type->is_double()); in visit_leave()
588 assert(ir->type->base_type == GLSL_TYPE_UINT); in visit_leave()
591 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in visit_leave()
592 assert(ir->type->is_double()); in visit_leave()
595 assert(ir->operands[0]->type->is_double()); in visit_leave()
596 assert(ir->type->is_boolean()); in visit_leave()
600 assert(ir->operands[0]->type->is_float() || in visit_leave()
601 ir->operands[0]->type->is_double()); in visit_leave()
602 assert(ir->type->is_double()); in visit_leave()
605 assert(ir->operands[0]->type->is_float() || in visit_leave()
606 ir->operands[0]->type->is_double()); in visit_leave()
607 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
610 assert(ir->operands[0]->type->base_type == GLSL_TYPE_SUBROUTINE); in visit_leave()
611 assert(ir->type->base_type == GLSL_TYPE_INT); in visit_leave()
622 assert(ir->operands[0]->type->base_type == in visit_leave()
623 ir->operands[1]->type->base_type); in visit_leave()
625 if (ir->operands[0]->type->is_scalar()) in visit_leave()
626 assert(ir->operands[1]->type == ir->type); in visit_leave()
627 else if (ir->operands[1]->type->is_scalar()) in visit_leave()
628 assert(ir->operands[0]->type == ir->type); in visit_leave()
629 else if (ir->operands[0]->type->is_vector() && in visit_leave()
630 ir->operands[1]->type->is_vector()) { in visit_leave()
631 assert(ir->operands[0]->type == ir->operands[1]->type); in visit_leave()
632 assert(ir->operands[0]->type == ir->type); in visit_leave()
637 assert(ir->type == ir->operands[0]->type); in visit_leave()
638 assert(ir->type == ir->operands[1]->type); in visit_leave()
639 assert(ir->type->is_integer()); in visit_leave()
644 assert(ir->type == ir->operands[0]->type); in visit_leave()
645 assert(ir->type == ir->operands[1]->type); in visit_leave()
646 assert(ir->type->base_type == GLSL_TYPE_UINT); in visit_leave()
658 assert(ir->type->is_boolean()); in visit_leave()
659 assert(ir->operands[0]->type == ir->operands[1]->type); in visit_leave()
660 assert(ir->operands[0]->type->is_vector() in visit_leave()
661 || ir->operands[0]->type->is_scalar()); in visit_leave()
662 assert(ir->operands[0]->type->vector_elements in visit_leave()
663 == ir->type->vector_elements); in visit_leave()
671 assert(ir->type == glsl_type::bool_type); in visit_leave()
672 assert(ir->operands[0]->type == ir->operands[1]->type); in visit_leave()
677 assert(ir->operands[0]->type->is_integer_32_64() && in visit_leave()
678 ir->operands[1]->type->is_integer()); in visit_leave()
679 if (ir->operands[0]->type->is_scalar()) { in visit_leave()
680 assert(ir->operands[1]->type->is_scalar()); in visit_leave()
682 if (ir->operands[0]->type->is_vector() && in visit_leave()
683 ir->operands[1]->type->is_vector()) { in visit_leave()
684 assert(ir->operands[0]->type->components() == in visit_leave()
685 ir->operands[1]->type->components()); in visit_leave()
687 assert(ir->type == ir->operands[0]->type); in visit_leave()
693 assert(ir->operands[0]->type->base_type == in visit_leave()
694 ir->operands[1]->type->base_type); in visit_leave()
695 assert(ir->type->is_integer_32_64()); in visit_leave()
696 if (ir->operands[0]->type->is_vector() && in visit_leave()
697 ir->operands[1]->type->is_vector()) { in visit_leave()
698 assert(ir->operands[0]->type->vector_elements == in visit_leave()
699 ir->operands[1]->type->vector_elements); in visit_leave()
706 assert(ir->type->is_boolean()); in visit_leave()
707 assert(ir->operands[0]->type->is_boolean()); in visit_leave()
708 assert(ir->operands[1]->type->is_boolean()); in visit_leave()
712 assert(ir->type == glsl_type::float_type || in visit_leave()
713 ir->type == glsl_type::double_type); in visit_leave()
714 assert(ir->operands[0]->type->is_float() || in visit_leave()
715 ir->operands[0]->type->is_double()); in visit_leave()
716 assert(ir->operands[0]->type->is_vector()); in visit_leave()
717 assert(ir->operands[0]->type == ir->operands[1]->type); in visit_leave()
721 assert(ir->operands[0]->type == glsl_type::uint_type); in visit_leave()
723 assert(ir->operands[1]->type == glsl_type::uint_type); in visit_leave()
727 assert(ir->operands[0]->type == ir->type); in visit_leave()
728 assert(ir->operands[0]->type->is_float() || in visit_leave()
729 ir->operands[0]->type->is_double()); in visit_leave()
730 assert(ir->operands[1]->type->base_type == GLSL_TYPE_INT); in visit_leave()
731 assert(ir->operands[0]->type->components() == in visit_leave()
732 ir->operands[1]->type->components()); in visit_leave()
736 assert(ir->operands[0]->type->is_vector()); in visit_leave()
737 assert(ir->operands[1]->type->is_scalar() in visit_leave()
738 && ir->operands[1]->type->is_integer()); in visit_leave()
742 assert(ir->operands[0]->type == ir->type); in visit_leave()
743 assert(ir->operands[0]->type->is_float()); in visit_leave()
744 assert(ir->operands[1]->type->components() == 2); in visit_leave()
745 assert(ir->operands[1]->type->is_float()); in visit_leave()
749 assert(ir->operands[0]->type == ir->type); in visit_leave()
750 assert(ir->operands[0]->type->is_float()); in visit_leave()
751 assert(ir->operands[1]->type == glsl_type::int_type); in visit_leave()
755 assert(ir->type->is_float() || in visit_leave()
756 ir->type->is_double()); in visit_leave()
757 assert(ir->type == ir->operands[0]->type); in visit_leave()
758 assert(ir->type == ir->operands[1]->type); in visit_leave()
759 assert(ir->type == ir->operands[2]->type); in visit_leave()
763 assert(ir->operands[0]->type->is_float() || in visit_leave()
764 ir->operands[0]->type->is_double()); in visit_leave()
765 assert(ir->operands[0]->type == ir->operands[1]->type); in visit_leave()
766 assert(ir->operands[2]->type == ir->operands[0]->type || in visit_leave()
767 ir->operands[2]->type == glsl_type::float_type || in visit_leave()
768 ir->operands[2]->type == glsl_type::double_type); in visit_leave()
772 assert(ir->operands[0]->type->is_boolean()); in visit_leave()
773 assert(ir->type->vector_elements == ir->operands[0]->type->vector_elements); in visit_leave()
774 assert(ir->type == ir->operands[1]->type); in visit_leave()
775 assert(ir->type == ir->operands[2]->type); in visit_leave()
779 assert(ir->type->is_integer()); in visit_leave()
780 assert(ir->operands[0]->type == ir->type); in visit_leave()
781 assert(ir->operands[1]->type == ir->type); in visit_leave()
782 assert(ir->operands[2]->type == ir->type); in visit_leave()
786 assert(ir->operands[0]->type->is_vector()); in visit_leave()
787 assert(ir->operands[1]->type->is_scalar()); in visit_leave()
788 assert(ir->operands[0]->type->base_type == ir->operands[1]->type->base_type); in visit_leave()
789 assert(ir->operands[2]->type->is_scalar() in visit_leave()
790 && ir->operands[2]->type->is_integer()); in visit_leave()
791 assert(ir->type == ir->operands[0]->type); in visit_leave()
795 assert(ir->type->is_integer()); in visit_leave()
796 assert(ir->operands[0]->type == ir->type); in visit_leave()
797 assert(ir->operands[1]->type == ir->type); in visit_leave()
798 assert(ir->operands[2]->type == ir->type); in visit_leave()
799 assert(ir->operands[3]->type == ir->type); in visit_leave()
810 assert(ir->type->is_vector()); in visit_leave()
811 switch (ir->type->vector_elements) { in visit_leave()
813 assert(ir->operands[0]->type->is_scalar()); in visit_leave()
814 assert(ir->operands[0]->type->base_type == ir->type->base_type); in visit_leave()
815 assert(ir->operands[1]->type->is_scalar()); in visit_leave()
816 assert(ir->operands[1]->type->base_type == ir->type->base_type); in visit_leave()
817 assert(ir->operands[2] == NULL); in visit_leave()
818 assert(ir->operands[3] == NULL); in visit_leave()
821 assert(ir->operands[0]->type->is_scalar()); in visit_leave()
822 assert(ir->operands[0]->type->base_type == ir->type->base_type); in visit_leave()
823 assert(ir->operands[1]->type->is_scalar()); in visit_leave()
824 assert(ir->operands[1]->type->base_type == ir->type->base_type); in visit_leave()
825 assert(ir->operands[2]->type->is_scalar()); in visit_leave()
826 assert(ir->operands[2]->type->base_type == ir->type->base_type); in visit_leave()
827 assert(ir->operands[3] == NULL); in visit_leave()
830 assert(ir->operands[0]->type->is_scalar()); in visit_leave()
831 assert(ir->operands[0]->type->base_type == ir->type->base_type); in visit_leave()
832 assert(ir->operands[1]->type->is_scalar()); in visit_leave()
833 assert(ir->operands[1]->type->base_type == ir->type->base_type); in visit_leave()
834 assert(ir->operands[2]->type->is_scalar()); in visit_leave()
835 assert(ir->operands[2]->type->base_type == ir->type->base_type); in visit_leave()
836 assert(ir->operands[3]->type->is_scalar()); in visit_leave()
837 assert(ir->operands[3]->type->base_type == ir->type->base_type); in visit_leave()
852 ir_validate::visit_leave(ir_swizzle *ir) in visit_leave() argument
854 unsigned int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w}; in visit_leave()
856 for (unsigned int i = 0; i < ir->type->vector_elements; i++) { in visit_leave()
857 if (chans[i] >= ir->val->type->vector_elements) { in visit_leave()
859 "in the value.\n", (void *) ir); in visit_leave()
860 ir->print(); in visit_leave()
869 ir_validate::visit(ir_variable *ir) in visit() argument
876 if (ir->name && ir->is_name_ralloced()) in visit()
877 assert(ralloc_parent(ir->name) == ir); in visit()
879 _mesa_set_add(ir_set, ir); in visit()
885 if (ir->type->array_size() > 0) { in visit()
886 if (ir->data.max_array_access >= (int)ir->type->length) { in visit()
888 ir->data.max_array_access, ir->type->length - 1); in visit()
889 ir->print(); in visit()
898 if (ir->is_interface_instance()) { in visit()
900 ir->get_interface_type()->fields.structure; in visit()
901 for (unsigned i = 0; i < ir->get_interface_type()->length; i++) { in visit()
905 ir->get_max_ifc_array_access(); in visit()
913 ir->print(); in visit()
920 if (ir->constant_initializer != NULL && !ir->data.has_initializer) { in visit()
923 ir->print(); in visit()
927 if (ir->data.mode == ir_var_uniform in visit()
928 && is_gl_identifier(ir->name) in visit()
929 && ir->get_state_slots() == NULL) { in visit()
931 ir->print(); in visit()
939 ir_validate::visit_enter(ir_assignment *ir) in visit_enter() argument
941 const ir_dereference *const lhs = ir->lhs; in visit_enter()
943 if (ir->write_mask == 0) { in visit_enter()
946 ir->print(); in visit_enter()
952 if (ir->write_mask & (1 << i)) in visit_enter()
956 if (lhs_components != ir->rhs->type->vector_elements) { in visit_enter()
959 lhs_components, ir->rhs->type->vector_elements); in visit_enter()
960 ir->print(); in visit_enter()
965 this->validate_ir(ir, this->data_enter); in visit_enter()
971 ir_validate::visit_enter(ir_call *ir) in visit_enter() argument
973 ir_function_signature *const callee = ir->callee; in visit_enter()
980 if (ir->return_deref) { in visit_enter()
981 if (ir->return_deref->type != callee->return_type) { in visit_enter()
983 callee->return_type->name, ir->return_deref->type->name); in visit_enter()
992 const exec_node *actual_param_node = ir->actual_parameters.get_head_raw(); in visit_enter()
1024 ir->print(); in visit_enter()
1032 ir_validate::validate_ir(ir_instruction *ir, void *data) in validate_ir() argument
1036 if (_mesa_set_search(ir_set, ir)) { in validate_ir()
1038 ir->print(); in validate_ir()
1042 _mesa_set_add(ir_set, ir); in validate_ir()
1046 check_node_type(ir_instruction *ir, void *data) in check_node_type() argument
1050 if (ir->ir_type >= ir_type_max) { in check_node_type()
1052 ir->print(); printf("\n"); in check_node_type()
1054 ir_rvalue *value = ir->as_rvalue(); in check_node_type()
1071 foreach_in_list(ir_instruction, ir, instructions) { in validate_ir_tree()
1072 visit_tree(ir, check_node_type, NULL); in validate_ir_tree()