nir: add task_payload and shader_out to nir_var_vec_indexable_modes

Since these can be cross-invocation, we need this to write individual
components without race conditions or loads.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Gitlab: 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:21:32 +00:00 committed by Marge Bot
parent a89755d179
commit e1f5100311

View file

@ -207,10 +207,13 @@ typedef enum {
nir_var_read_only_modes = nir_var_shader_in | nir_var_uniform |
nir_var_system_value | nir_var_mem_constant |
nir_var_mem_ubo,
/** Modes where vector derefs can be indexed as arrays */
/* Modes where vector derefs can be indexed as arrays. nir_var_shader_out is only for mesh
* stages.
*/
nir_var_vec_indexable_modes = nir_var_mem_ubo | nir_var_mem_ssbo |
nir_var_mem_shared | nir_var_mem_global |
nir_var_mem_push_const,
nir_var_mem_push_const | nir_var_mem_task_payload |
nir_var_shader_out,
nir_num_variable_modes = 16,
nir_var_all = (1 << nir_num_variable_modes) - 1,
} nir_variable_mode;