Barycentric tessellation helper mismatches vertex BuiltIn blocks (VUID 08746) #7328

Closed
opened 2026-10-18 00:21:57 +00:00 by Amoenus · 1 comment
Amoenus commented 2026-10-18 00:21:57 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-18T00:21:57Z.


Observed on unchanged main

a8581d3331a20766183a9cf8e1b376be826885e7, clean checkout, Windows 11 Enterprise 26200 / WinLibs GCC 15.2 r7. Related implementation: #7308.

agc_driver_pixel_barycentric_emulation passes its image/readback assertions and returns success, but the tessellation path emits five VUID-RuntimeSpirv-OpVariable-08746 validation errors per invocation. Reproduced in three fresh processes on each device:

GPU Windows driver Passing test processes Validation errors
NVIDIA GeForce RTX 5080 (10de:2c02) 610.62 / 32.0.16.1062 3 15
AMD Radeon(TM) Graphics (1002:13c0) 32.0.21036.18 3 15

Each log verifies the selected physical device and Khronos validation layer 1.4.363.0 actually loaded. Vulkan required; project shader cache/pipeline journal disabled; driver caches uncontrolled. Each invocation finishes below 30 seconds. This uses the repository's synthetic fixture, without game assets or our integration changes.

Exact diagnostic

Validation Error: [ VUID-RuntimeSpirv-OpVariable-08746 ]
vkCreateGraphicsPipelines(): pCreateInfos[0] (SPIR-V Interface) Mismatch in BuiltIn blocks:
[VK_SHADER_STAGE_VERTEX_BIT] Output Block {
    0: Position
}
[VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT] Input Block {
    0: Position
    1: ClipDistance
}

The Vulkan interface-matching requirement applies even though these two drivers produce the expected image for this fixture. Expected: matching stage interfaces and no validation error; a successful CTest assertion alone does not establish that.

Reproduce

Build agc_driver_pixel_barycentric_emulation_tests from that main revision and its dependencies. In PowerShell, with the supported toolchain on PATH:

$env:ANYPS5_GPU = 'NVIDIA GeForce RTX 5080'
$env:ANYPS5_REQUIRE_VULKAN = '1'
$env:VK_INSTANCE_LAYERS = 'VK_LAYER_KHRONOS_validation'
$env:VK_LAYER_PATH = '<Vulkan SDK>\Bin'
$env:VK_LOADER_DEBUG = 'layer'
ctest --test-dir build -V -j1 --repeat until-fail:3 --timeout 30 -R '^agc_driver_pixel_barycentric_emulation$'

Repeat with ANYPS5_GPU='AMD Radeon(TM) Graphics'. Inspect the validation messages, not just CTest's success summary.

Proposed solution and validation

Marc opened #7330 for this report. Its exact06379 head still fails the runtime fixture on each physical GPU at tessellation interface array disagrees with control-point count. The three-line correction be22d2fc8 is directly on Marc's work: keep the outer control-point array on the control-stage output and the inner clip-array type on the two access-chain result pointers.

With that correction, full Windows/Linux relinker/library and selected-fixture builds pass. The existing pixel fixture passes3/3 on RTX5080, AMD Radeon Graphics and llvmpipe; CPU graphics passes3/3 on each OS. Both generated-stage paths and numerical image checks execute. Windows VVL is loaded with no observed validation errors; Linux has no validation layer. Exact heads, hardware, reproduction and limits. A separate regression assertion also demonstrates the original main interface failure without requiring the validation layer; that alternative was preserved on our fork before discovering #7330, and no duplicate upstream PR was opened.

No title-unblock, performance or physical-console claim. The baseline above remains unchanged mainA8; the corrected cross-platform validation is explicitly be22. #7330 has now adopted those corrections at ba9aec511 (an identical complete tree); a fresh exact-head Windows build and3/3 CPU plus3/3 per physical GPU run also passes without Vulkan validation messages. See the maintained validation comment above.

AI-assisted investigation/reporting: Codex; author responsible.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5904566921 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7328). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-18T00:21:57Z. --- ### Observed on unchanged main `a8581d3331a20766183a9cf8e1b376be826885e7`, clean checkout, Windows 11 Enterprise 26200 / WinLibs GCC 15.2 r7. Related implementation: #7308. `agc_driver_pixel_barycentric_emulation` passes its image/readback assertions and returns success, but the tessellation path emits **five `VUID-RuntimeSpirv-OpVariable-08746` validation errors per invocation**. Reproduced in three fresh processes on each device: | GPU | Windows driver | Passing test processes | Validation errors | |---|---|---:|---:| | NVIDIA GeForce RTX 5080 (10de:2c02) | 610.62 / 32.0.16.1062 | 3 | 15 | | AMD Radeon(TM) Graphics (1002:13c0) | 32.0.21036.18 | 3 | 15 | Each log verifies the selected physical device and Khronos validation layer 1.4.363.0 actually loaded. Vulkan required; project shader cache/pipeline journal disabled; driver caches uncontrolled. Each invocation finishes below 30 seconds. This uses the repository's synthetic fixture, without game assets or our integration changes. ### Exact diagnostic ```text Validation Error: [ VUID-RuntimeSpirv-OpVariable-08746 ] vkCreateGraphicsPipelines(): pCreateInfos[0] (SPIR-V Interface) Mismatch in BuiltIn blocks: [VK_SHADER_STAGE_VERTEX_BIT] Output Block { 0: Position } [VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT] Input Block { 0: Position 1: ClipDistance } ``` The [Vulkan interface-matching requirement](https://docs.vulkan.org/spec/latest/appendices/spirvenv.html#VUID-RuntimeSpirv-OpVariable-08746) applies even though these two drivers produce the expected image for this fixture. Expected: matching stage interfaces and no validation error; a successful CTest assertion alone does not establish that. ### Reproduce Build `agc_driver_pixel_barycentric_emulation_tests` from that main revision and its dependencies. In PowerShell, with the supported toolchain on PATH: ```powershell $env:ANYPS5_GPU = 'NVIDIA GeForce RTX 5080' $env:ANYPS5_REQUIRE_VULKAN = '1' $env:VK_INSTANCE_LAYERS = 'VK_LAYER_KHRONOS_validation' $env:VK_LAYER_PATH = '<Vulkan SDK>\Bin' $env:VK_LOADER_DEBUG = 'layer' ctest --test-dir build -V -j1 --repeat until-fail:3 --timeout 30 -R '^agc_driver_pixel_barycentric_emulation$' ``` Repeat with `ANYPS5_GPU='AMD Radeon(TM) Graphics'`. Inspect the validation messages, not just CTest's success summary. ### Proposed solution and validation Marc opened #7330 for this report. Its exact06379 head still fails the runtime fixture on each physical GPU at `tessellation interface array disagrees with control-point count`. The [three-line correction be22d2fc8](https://github.com/Amoenus/AnyPS5/commit/be22d2fc8aa4da56ecc5d9c24f3eb17b4f7921ce) is directly on Marc's work: keep the outer control-point array on the control-stage output and the inner clip-array type on the two access-chain result pointers. With that correction, full Windows/Linux relinker/library and selected-fixture builds pass. The existing pixel fixture passes3/3 on RTX5080, AMD Radeon Graphics and llvmpipe; CPU graphics passes3/3 on each OS. Both generated-stage paths and numerical image checks execute. Windows VVL is loaded with no observed validation errors; Linux has no validation layer. [Exact heads, hardware, reproduction and limits](https://github.com/boykopovar/AnyPS5/pull/7330#issuecomment-6243905680). A separate regression assertion also demonstrates the original main interface failure without requiring the validation layer; that alternative was preserved on our fork before discovering #7330, and no duplicate upstream PR was opened. No title-unblock, performance or physical-console claim. The baseline above remains unchanged mainA8; the corrected cross-platform validation is explicitly be22. #7330 has now adopted those corrections at ba9aec511 (an identical complete tree); a fresh exact-head Windows build and3/3 CPU plus3/3 per physical GPU run also passes without Vulkan validation messages. See the maintained validation comment above. AI-assisted investigation/reporting: Codex; author responsible. <!-- codex-barycentric-interface-mainA8-v1 -->
MarcZX10 commented 2026-10-18 00:39:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T00:39:01Z.


Fix is now in #7330: it keeps the generated tessellation Position blocks aligned with the vertex stage and forwards ClipDistance as separate BuiltIn arrays. I built the graphics test executable with GCC 12.2, but this host cannot run it because the project CPU guard rejects its Xeon E5-1620 v2 (missing AVX2/BMI/LZCNT/MOVBE/FMA); GPU runtime validation remains pending.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243815683 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7328#issuecomment-6243815683). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T00:39:01Z. --- Fix is now in #7330: it keeps the generated tessellation Position blocks aligned with the vertex stage and forwards ClipDistance as separate BuiltIn arrays. I built the graphics test executable with GCC 12.2, but this host cannot run it because the project CPU guard rejects its Xeon E5-1620 v2 (missing AVX2/BMI/LZCNT/MOVBE/FMA); GPU runtime validation remains pending.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#7328
No description provided.