nir/serialize: fix serialization of system values

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6545>
diff --git a/src/compiler/nir/nir_serialize.c b/src/compiler/nir/nir_serialize.c
index 33c740c..1d0b696 100644
--- a/src/compiler/nir/nir_serialize.c
+++ b/src/compiler/nir/nir_serialize.c
@@ -253,6 +253,7 @@
     * 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;