v3d: call nir_lower_compute_system_values to get rid of base intrinsics

OpenGL doesn't have them and rusticl handles them for CL already.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26800>
This commit is contained in:
Karol Herbst 2024-03-25 13:09:06 +01:00 committed by Marge Bot
parent 51f54cdec4
commit a62fb368d6

View file

@ -380,6 +380,15 @@ v3d_uncompiled_shader_create(struct pipe_context *pctx,
NIR_PASS(_, s, nir_lower_var_copies);
/* Get rid of base CS sys vals */
if (s->info.stage == MESA_SHADER_COMPUTE) {
struct nir_lower_compute_system_values_options cs_options = {
.has_base_global_invocation_id = false,
.has_base_workgroup_id = false,
};
NIR_PASS(_, s, nir_lower_compute_system_values, &cs_options);
}
/* Get rid of split copies */
v3d_optimize_nir(NULL, s);