mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 09:20:13 +01:00
glsl: Make read_from_write_only_variable_visitor ignore .length().
.length() on an unsized SSBO variable doesn't actually read any data from the SSBO, and is allowed on variables marked 'writeonly'. Fixes compute shader compilation in Shadow of Mordor. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
9095847c25
commit
c034dbeda8
1 changed files with 9 additions and 0 deletions
|
|
@ -106,6 +106,15 @@ public:
|
|||
return found;
|
||||
}
|
||||
|
||||
virtual ir_visitor_status visit_enter(ir_expression *ir)
|
||||
{
|
||||
/* .length() doesn't actually read anything */
|
||||
if (ir->operation == ir_unop_ssbo_unsized_array_length)
|
||||
return visit_continue_with_parent;
|
||||
|
||||
return visit_continue;
|
||||
}
|
||||
|
||||
private:
|
||||
ir_variable *found;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue