nir: skip nir_lower_io_passes for compute shaders
authorMarek Olšák <marek.olsak@amd.com>
Tue, 28 Feb 2023 20:12:21 +0000 (15:12 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Apr 2023 21:42:11 +0000 (21:42 +0000)
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21861>

src/compiler/nir/nir_lower_io.c

index 8e118b0..ab29036 100644 (file)
@@ -3129,7 +3129,8 @@ type_size_vec4(const struct glsl_type *type, bool bindless)
 void
 nir_lower_io_passes(nir_shader *nir)
 {
-   if (!nir->options->lower_io_variables)
+   if (!nir->options->lower_io_variables ||
+       nir->info.stage == MESA_SHADER_COMPUTE)
       return;
 
    bool has_indirect_inputs =