zink: always set var used by get_ssbo_size to the 32bit var
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 15 Sep 2022 14:04:08 +0000 (10:04 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Sep 2022 13:53:10 +0000 (13:53 +0000)
avoid depending on iteration ordering

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18144>

src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c

index 1f737f5..5f14f83 100644 (file)
@@ -1069,7 +1069,8 @@ emit_bo(struct ntv_context *ctx, struct nir_variable *var)
    if (ssbo) {
       assert(!ctx->ssbos[idx]);
       ctx->ssbos[idx] = var_id;
-      ctx->ssbo_vars = var;
+      if (bitsize == 32)
+         ctx->ssbo_vars = var;
    } else {
       assert(!ctx->ubos[var->data.driver_location][idx]);
       ctx->ubos[var->data.driver_location][idx] = var_id;