nir/serialize: fix serialization of system values
authorKarol Herbst <kherbst@redhat.com>
Sat, 29 Aug 2020 19:58:37 +0000 (21:58 +0200)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 1 Sep 2020 19:55:05 +0000 (14:55 -0500)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6545>

src/compiler/nir/nir_serialize.c

index 33c740cf623ce75e496bd72aeb15fa20ac2994cf..1d0b696db878528c9fe72387a944af24535a6638 100644 (file)
@@ -253,6 +253,7 @@ write_variable(write_ctx *ctx, const nir_variable *var)
     * which is typically after shaders are linked.
     */
    if (ctx->strip &&
+       data.mode != nir_var_system_value &&
        data.mode != nir_var_shader_in &&
        data.mode != nir_var_shader_out)
       data.location = 0;