mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 00:49:04 +02:00
nir/lower_task_shader: Don't fail adding a launch when last instruction is a jump
Fixes: 8aff8d3dd4 ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>
This commit is contained in:
parent
15e78caf8d
commit
3f4343c7cd
1 changed files with 2 additions and 1 deletions
|
|
@ -417,7 +417,8 @@ nir_lower_task_shader(nir_shader *shader,
|
|||
* If the shader already had a launch_mesh_workgroups by any chance,
|
||||
* this will be removed.
|
||||
*/
|
||||
builder.cursor = nir_after_cf_list(&builder.impl->body);
|
||||
nir_block *last_block = nir_impl_last_block(impl);
|
||||
builder.cursor = nir_after_block_before_jump(last_block);
|
||||
nir_launch_mesh_workgroups(&builder, nir_imm_zero(&builder, 3, 32));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue