Henri Verbeet pushed to branch master at wine / vkd3d
Commits: 8334386d by Henri Verbeet at 2025-08-13T15:54:12+02:00 vkd3d-shader/spirv: Avoid emitting duplicate built-in inputs in spirv_compiler_emit_input().
This works around an issue introduced by commit 66cb2815f0662713c3255113255cfd7cf5e406fb. SV_PRIMITIVE_ID inputs in geometry shaders use VKD3DSPR_PRIMID registers, and we create the corresponding SPIR-V inputs using spirv_compiler_emit_io_register(). Unfortunately we also have an input signature element for the same input, and simply creating another PrimitiveId input would run into VUID-StandaloneSpirv-OpEntryPoint-09658.
Before the commit mentioned above, we'd use DCL_INPUT instructions to emit input declarations, and these would help to distinguish whether VKD3DSPR_INPUT or VKD3DSPR_PRIMID registers were used for primitive ID inputs. Note that we can't simply ignore input signature element with SIGNATURE_TARGET_LOCATION_UNUSED; the DXIL parser emits SV_SAMPLE_INDEX inputs with that target location, but does require them to use a VKD3DSPR_INPUT register.
- - - - -
2 changed files:
- libs/vkd3d-shader/spirv.c - libs/vkd3d-shader/vkd3d_shader_private.h
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/commit/8334386d99c720ca52afb67b52c7ef...