summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErico Nunes <[email protected]>2019-05-05 10:53:33 +0200
committerErico Nunes <[email protected]>2019-05-06 17:15:27 +0200
commit11602ccd5dfa6c98400a484cae8d3221f325da6d (patch)
treeeeadbbbfbf9d27122cef20e5b23ecd293b357da2
parent60a128fe8172826837fd6f91ae323aaa07ba7607 (diff)
lima/ppir: abort compilation in case of unsupported intrinsic
Currently ppir continues compilation when there is an unsupported intrinsic, resulting in a shader that will surely not work as intended. This is a problem during piglit runs as some tests don't compile properly due to this but actually still get submitted to the gpu and leave the system in an unstable state after executing, causing further tests to fail. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Qiang Yu <[email protected]>
-rw-r--r--src/gallium/drivers/lima/ir/pp/nir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/lima/ir/pp/nir.c b/src/gallium/drivers/lima/ir/pp/nir.c
index 6cb90701fd3..bb5038541ea 100644
--- a/src/gallium/drivers/lima/ir/pp/nir.c
+++ b/src/gallium/drivers/lima/ir/pp/nir.c
@@ -380,8 +380,10 @@ static bool ppir_emit_block(ppir_compiler *comp, nir_block *nblock)
nir_foreach_instr(instr, nblock) {
assert(instr->type < nir_instr_type_phi);
ppir_node *node = ppir_emit_instr[instr->type](block, instr);
- if (node)
- list_addtail(&node->list, &block->node_list);
+ if (!node)
+ return false;
+
+ list_addtail(&node->list, &block->node_list);
}
return true;