mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
glsl: Fixed vectorize pass vs. texture lookups.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82574 Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
088106fa79
commit
2b837576eb
1 changed files with 13 additions and 0 deletions
|
|
@ -86,6 +86,7 @@ public:
|
|||
virtual ir_visitor_status visit_enter(ir_expression *);
|
||||
virtual ir_visitor_status visit_enter(ir_if *);
|
||||
virtual ir_visitor_status visit_enter(ir_loop *);
|
||||
virtual ir_visitor_status visit_enter(ir_texture *);
|
||||
|
||||
virtual ir_visitor_status visit_leave(ir_assignment *);
|
||||
|
||||
|
|
@ -351,6 +352,18 @@ ir_vectorize_visitor::visit_enter(ir_loop *ir)
|
|||
return visit_continue_with_parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upon entering an ir_texture, remove the current assignment from
|
||||
* further consideration. Vectorizing multiple texture lookups into one
|
||||
* is wrong.
|
||||
*/
|
||||
ir_visitor_status
|
||||
ir_vectorize_visitor::visit_enter(ir_texture *)
|
||||
{
|
||||
this->current_assignment = NULL;
|
||||
return visit_continue_with_parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upon leaving an ir_assignment, save a pointer to it in ::assignment[] if
|
||||
* the swizzle mask(s) found were appropriate. Also save a pointer in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue