diff options
author | Vasily Khoruzhick <[email protected]> | 2019-09-23 21:20:07 -0700 |
---|---|---|
committer | Vasily Khoruzhick <[email protected]> | 2019-09-25 03:07:16 +0000 |
commit | 4fcfed426aa0b44dc4e94ec919428346ff0a33a0 (patch) | |
tree | 64b5d46c85a3277e6493d22a03b3e5c1d1cbe702 /src/gallium | |
parent | 0e1310e59fa2c41efcc173f8a68523dc45432ab9 (diff) |
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 <[email protected]>
Signed-off-by: Vasily Khoruzhick <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/lima/ir/pp/node.c | 13 |
1 files 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); |