nir: patch up deref-vars when lowering clip-planes
Otherwise, we fail validation and potentially generate invalid code. Let's fix up the mode of the accesses to the variable. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
@@ -243,6 +243,7 @@ lower_clip_outputs(nir_builder *b, nir_variable *position,
|
||||
exec_node_remove(&clipvertex->node);
|
||||
clipvertex->data.mode = nir_var_shader_temp;
|
||||
exec_list_push_tail(&b->shader->globals, &clipvertex->node);
|
||||
nir_fixup_deref_modes(b->shader);
|
||||
}
|
||||
} else {
|
||||
if (clipvertex)
|
||||
|
Reference in New Issue
Block a user