vtn: add mesh output and task_payload to vtn_mode_is_cross_invocation

This fixes a potential race condition, and removes output loads (which
should not exist in the EXT_mesh_shader).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7391
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19597>
This commit is contained in:
Rhys Perry 2022-11-09 16:22:27 +00:00 committed by Marge Bot
parent e1f5100311
commit 085828ea4d

View file

@ -179,12 +179,16 @@ static bool
vtn_mode_is_cross_invocation(struct vtn_builder *b,
enum vtn_variable_mode mode)
{
/* TODO: add TCS here once nir_remove_unused_io_vars() can handle vector indexing. */
bool cross_invocation_outputs = b->shader->info.stage == MESA_SHADER_MESH;
return mode == vtn_variable_mode_ssbo ||
mode == vtn_variable_mode_ubo ||
mode == vtn_variable_mode_phys_ssbo ||
mode == vtn_variable_mode_push_constant ||
mode == vtn_variable_mode_workgroup ||
mode == vtn_variable_mode_cross_workgroup;
mode == vtn_variable_mode_cross_workgroup ||
(cross_invocation_outputs && mode == vtn_variable_mode_output) ||
(b->shader->info.stage == MESA_SHADER_TASK && mode == vtn_variable_mode_task_payload);
}
static bool