zink: use implicit offsets for function temp variables in ntv

this is also apparently illegal

Fixes: 0b7611824a ("zink: use implicit stride in ntv for temp vars"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37312>
(cherry picked from commit f419a96d76)
This commit is contained in:
Mike Blumenkrantz 2025-09-11 13:50:01 -04:00 committed by Eric Engestrom
parent 8dd3853f23
commit 7337e57115
2 changed files with 2 additions and 2 deletions

View file

@ -5614,7 +5614,7 @@
"description": "zink: use implicit offsets for function temp variables in ntv",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0b7611824a1ab95a37577bed8d11b1e110b036b7",
"notes": null

View file

@ -630,7 +630,7 @@ get_glsl_type(struct ntv_context *ctx, const struct glsl_type *type, bool implic
glsl_get_length(type));
for (unsigned i = 0; i < glsl_get_length(type); i++) {
int32_t offset = glsl_get_struct_field_offset(type, i);
if (offset >= 0)
if (offset >= 0 && !implicit_stride)
spirv_builder_emit_member_offset(&ctx->builder, ret, i, offset);
}
} else