Use the set_vertex_and_primitive_count intrinsic to
express the number of vertices and primitives that the
mesh shader workgroup outputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18366>
vtn_handle_write_packed_primitive_indices(b, opcode, w, count);
break;
+ case SpvOpSetMeshOutputsEXT:
+ nir_set_vertex_and_primitive_count(
+ &b->nb, vtn_get_nir_ssa(b, w[1]), vtn_get_nir_ssa(b, w[2]));
+ break;
+
default:
vtn_fail_with_opcode("Unhandled opcode", opcode);
}