Module: Mesa
Branch: staging/22.2
Commit: 9d0016594b911f39ca56a8493f3d7d226625438c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d0016594b911f39ca56a8493f3d7d226625438c

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Sep  1 15:20:46 2022 -0400

zink: don't emit entrypoints for function temp variables

UNASSIGNED-CoreValidation-Shader-InconsistentSpirv(ERROR / SPEC): msgNum: 
7060244 - Validation Error: [ 
UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 
0x3c8a1d0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module 
not valid: OpEntryPoint interfaces should only list global variables

cc: mesa-stable

Reviewed-by: Emma Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18375>
(cherry picked from commit e2773d67fe72a67af04b049590baf050124c345c)

---

 .pick_status.json                                    | 2 +-
 src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 4117af7abed..2a4c1f72a3b 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -6349,7 +6349,7 @@
         "description": "zink: don't emit entrypoints for function temp 
variables",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c 
b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index 93ec73760a9..535d0f91b7d 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -701,8 +701,6 @@ emit_temp(struct ntv_context *ctx, struct nir_variable *var)
       spirv_builder_emit_name(&ctx->builder, var_id, var->name);
 
    _mesa_hash_table_insert(ctx->vars, var, (void *)(intptr_t)var_id);
-   assert(ctx->num_entry_ifaces < ARRAY_SIZE(ctx->entry_ifaces));
-   ctx->entry_ifaces[ctx->num_entry_ifaces++] = var_id;
 }
 
 static SpvDim

Reply via email to