Mesa (master): nir: patch up deref-vars when lowering clip-planes
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 12 08:34:11 UTC 2019
Module: Mesa
Branch: master
Commit: 9b8964d06473bda4972c3f00ef68025bf2206c3e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b8964d06473bda4972c3f00ef68025bf2206c3e
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Wed Oct 30 14:53:56 2019 +0100
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 at collabora.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
---
src/compiler/nir/nir_lower_clip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/compiler/nir/nir_lower_clip.c b/src/compiler/nir/nir_lower_clip.c
index 81c714971b2..cf8a5d93c76 100644
--- a/src/compiler/nir/nir_lower_clip.c
+++ b/src/compiler/nir/nir_lower_clip.c
@@ -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)
More information about the mesa-commit
mailing list