Mesa (master): lima/ppir: don't attempt to clone tex coords if it's not varying
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 25 03:22:51 UTC 2019
Module: Mesa
Branch: master
Commit: 4fcfed426aa0b44dc4e94ec919428346ff0a33a0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4fcfed426aa0b44dc4e94ec919428346ff0a33a0
Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date: Mon Sep 23 21:20:07 2019 -0700
lima/ppir: don't attempt to clone tex coords if it's not varying
It makes no sense to clone texture coords if it's not varying, moreover
we don't support cloning ALU nodes.
Fixes: 1c1890fa7077 ("lima/ppir: clone uniforms and load_coords into each successor")
Reviewed-by: Andreas Baierl <ichgeh at imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
---
src/gallium/drivers/lima/ir/pp/node.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/lima/ir/pp/node.c b/src/gallium/drivers/lima/ir/pp/node.c
index 20c48a1d36a..ded556d87c8 100644
--- a/src/gallium/drivers/lima/ir/pp/node.c
+++ b/src/gallium/drivers/lima/ir/pp/node.c
@@ -635,9 +635,16 @@ ppir_node_clone_tex(ppir_block *block, ppir_node *node)
list_addtail(&new_tnode->node.list, &block->node_list);
if (tex_coords) {
- new_tex_coords = ppir_node_clone(block, tex_coords);
- if (!new_tex_coords)
- return NULL;
+ switch (tex_coords->op) {
+ case ppir_op_load_varying:
+ case ppir_op_load_coords:
+ new_tex_coords = ppir_node_clone(block, tex_coords);
+ assert(new_tex_coords);
+ break;
+ default:
+ new_tex_coords = tex_coords;
+ break;
+ }
}
ppir_dest *dest = ppir_node_get_dest(node);
More information about the mesa-commit
mailing list