diff options
author | Erik Faye-Lund <[email protected]> | 2019-10-30 14:53:56 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-11-12 09:13:22 +0100 |
commit | 9b8964d06473bda4972c3f00ef68025bf2206c3e (patch) | |
tree | d8062170182fa76cdfbc712260e9d3dd08535151 /src/compiler/nir | |
parent | bef7b2f805f20661733ecc6b6499551d83c512e3 (diff) |
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 <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_lower_clip.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) |