[PR #1486] [MERGED] vk_pipeline_cache: Skip pipelines with geometry shaders when unsupported. #2131

Closed
opened 2026-02-27 21:15:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1486
Author: @squidbus
Created: 11/5/2024
Status: Merged
Merged: 11/7/2024
Merged by: @raphaelthegreat

Base: mainHead: gs-mac


📝 Commits (1)

  • e85fc9c vk_pipeline_cache: Skip pipelines with geometry shaders when unsupported.

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/video_core/renderer_vulkan/vk_pipeline_cache.cpp (+1 -1)

📄 Description

Properly skip pipelines with geometry shaders when they are unsupported, instead of just skipping binding the shader stage. Otherwise games crash compiling pipelines complaining about missing stage inputs, for example from CUSA01130:

[Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:70: VUID-RuntimeSpirv-OpEntryPoint-08743: Validation Error: [ VUID-RuntimeSpirv-OpEntryPoint-08743 ] Object 0: handle = 0xb43c50000000490, name = vs_0xaf846422_0, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x5e4ce20000000497, name = fs_0xb30c6b28_0, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x89925893 | vkCreateGraphicsPipelines(): pCreateInfos[0] (SPIR-V Interface) VK_SHADER_STAGE_FRAGMENT_BIT declared input at Location 3 Component 0 but it is not an Output declared in VK_SHADER_STAGE_VERTEX_BIT.
The Vulkan spec states: Any user-defined variables shared between the OpEntryPoint of two shader stages, and declared with Input as its Storage Class for the subsequent shader stage, must have all Location slots and Component words declared in the preceding shader stage's OpEntryPoint with Output as the Storage Class (https://vulkan.lunarg.com/doc/view/1.3.296.0/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-OpEntryPoint-08743)
[Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:70: VUID-RuntimeSpirv-OpEntryPoint-08743: Validation Error: [ VUID-RuntimeSpirv-OpEntryPoint-08743 ] Object 0: handle = 0xb43c50000000490, name = vs_0xaf846422_0, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x5e4ce20000000497, name = fs_0xb30c6b28_0, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x89925893 | vkCreateGraphicsPipelines(): pCreateInfos[0] (SPIR-V Interface) VK_SHADER_STAGE_FRAGMENT_BIT declared input at Location 2 Component 0 but it is not an Output declared in VK_SHADER_STAGE_VERTEX_BIT.
The Vulkan spec states: Any user-defined variables shared between the OpEntryPoint of two shader stages, and declared with Input as its Storage Class for the subsequent shader stage, must have all Location slots and Component words declared in the preceding shader stage's OpEntryPoint with Output as the Storage Class (https://vulkan.lunarg.com/doc/view/1.3.296.0/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-OpEntryPoint-08743)
[Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:70: mvk-error: VK_ERROR_INITIALIZATION_FAILED: Render pipeline compile failed (Error code 3):
Fragment input(s) `user(locn2),user(locn3)` mismatching vertex shader output type(s) or not written by vertex shader.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/1486 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 11/5/2024 **Status:** ✅ Merged **Merged:** 11/7/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `gs-mac` --- ### 📝 Commits (1) - [`e85fc9c`](https://github.com/shadps4-emu/shadPS4/commit/e85fc9c37598d724a3e3332b6b70e7aa640b669b) vk_pipeline_cache: Skip pipelines with geometry shaders when unsupported. ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_pipeline_cache.cpp` (+1 -1) </details> ### 📄 Description Properly skip pipelines with geometry shaders when they are unsupported, instead of just skipping binding the shader stage. Otherwise games crash compiling pipelines complaining about missing stage inputs, for example from CUSA01130: ``` [Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:70: VUID-RuntimeSpirv-OpEntryPoint-08743: Validation Error: [ VUID-RuntimeSpirv-OpEntryPoint-08743 ] Object 0: handle = 0xb43c50000000490, name = vs_0xaf846422_0, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x5e4ce20000000497, name = fs_0xb30c6b28_0, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x89925893 | vkCreateGraphicsPipelines(): pCreateInfos[0] (SPIR-V Interface) VK_SHADER_STAGE_FRAGMENT_BIT declared input at Location 3 Component 0 but it is not an Output declared in VK_SHADER_STAGE_VERTEX_BIT. The Vulkan spec states: Any user-defined variables shared between the OpEntryPoint of two shader stages, and declared with Input as its Storage Class for the subsequent shader stage, must have all Location slots and Component words declared in the preceding shader stage's OpEntryPoint with Output as the Storage Class (https://vulkan.lunarg.com/doc/view/1.3.296.0/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-OpEntryPoint-08743) [Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:70: VUID-RuntimeSpirv-OpEntryPoint-08743: Validation Error: [ VUID-RuntimeSpirv-OpEntryPoint-08743 ] Object 0: handle = 0xb43c50000000490, name = vs_0xaf846422_0, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x5e4ce20000000497, name = fs_0xb30c6b28_0, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x89925893 | vkCreateGraphicsPipelines(): pCreateInfos[0] (SPIR-V Interface) VK_SHADER_STAGE_FRAGMENT_BIT declared input at Location 2 Component 0 but it is not an Output declared in VK_SHADER_STAGE_VERTEX_BIT. The Vulkan spec states: Any user-defined variables shared between the OpEntryPoint of two shader stages, and declared with Input as its Storage Class for the subsequent shader stage, must have all Location slots and Component words declared in the preceding shader stage's OpEntryPoint with Output as the Storage Class (https://vulkan.lunarg.com/doc/view/1.3.296.0/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-OpEntryPoint-08743) [Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:70: mvk-error: VK_ERROR_INITIALIZATION_FAILED: Render pipeline compile failed (Error code 3): Fragment input(s) `user(locn2),user(locn3)` mismatching vertex shader output type(s) or not written by vertex shader. ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:15:18 +03:00
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
starred/shadPS4#2131
No description provided.