Commit Graph

2 Commits

Author SHA1 Message Date
Jesse Natalie f61788d7d3 nir_lower_task_shader: Fix return from lower_task_intrin (bool, not void*)
Fixes: 8aff8d3d ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>
2022-05-31 18:32:59 +00:00
Timur Kristóf 8aff8d3dd4 nir: Add common task shader lowering to make the backend's job easier.
1. Lowers NV_mesh_shader TASK_COUNT output to launch_mesh_workgroups.

2. Removes all code after launch_mesh_workgroups, enforcing the
fact that it's a terminating instruction.

3. Ensures that task shaders always have at least one
launch_mesh_workgroups instruction, so the backend doesn't
need to implement a special case when the shader doesn't have it.

4. Optionally, implements task_payload using shared memory when
task_payload atomics are used.
This is useful when the backend is otherwise not capable of
handling the same atomic features as it can for shared memory.
If this is used, the backend only has to implement the basic
load/store operations for task_payload.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16720>
2022-05-27 07:52:03 +00:00