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> (cherry picked from commit3f4343c7cd
)
This commit is contained in:

committed by
Dylan Baker

parent
6cf16955f7
commit
d600acf6d9
@@ -1255,7 +1255,7 @@
|
||||
"description": "nir/lower_task_shader: Don't fail adding a launch when last instruction is a jump",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "8aff8d3dd42ecc399f1d7d23ddd641e7e3fce777"
|
||||
},
|
||||
|
@@ -398,7 +398,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));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user