mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 23:50:11 +01:00
lima: ppir: assign actual index to discard block
Discard block is always added to the block list after translation from NIR, so we can just assign it an index that equals to block list size. Reviewed-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33754>
This commit is contained in:
parent
2a56afed8d
commit
69b119bc00
1 changed files with 3 additions and 2 deletions
|
|
@ -293,7 +293,6 @@ static bool ppir_emit_discard_block(ppir_compiler *comp)
|
|||
|
||||
comp->discard_block = block;
|
||||
block->comp = comp;
|
||||
block->index = INT_MAX;
|
||||
|
||||
discard = ppir_node_create(block, ppir_op_discard, -1, 0);
|
||||
if (discard)
|
||||
|
|
@ -1062,8 +1061,10 @@ bool ppir_compile_nir(struct lima_fs_compiled_shader *prog, struct nir_shader *n
|
|||
goto err_out0;
|
||||
|
||||
/* If we have discard block add it to the very end */
|
||||
if (comp->discard_block)
|
||||
if (comp->discard_block) {
|
||||
comp->discard_block->index = list_length(&comp->block_list);
|
||||
list_addtail(&comp->discard_block->list, &comp->block_list);
|
||||
}
|
||||
|
||||
ppir_node_print_prog(comp);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue