Skip to content

vk_pipeline_cache: Skip pipelines with geometry shaders when unsupported. #1486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

squidbus
Copy link
Collaborator

@squidbus squidbus commented Nov 5, 2024

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.

@raphaelthegreat raphaelthegreat merged commit 176d222 into shadps4-emu:main Nov 7, 2024
10 checks passed
fpiesche pushed a commit to fpiesche/shadPS4 that referenced this pull request Nov 7, 2024
fpiesche pushed a commit to fpiesche/shadPS4 that referenced this pull request Nov 7, 2024
fpiesche pushed a commit to fpiesche/shadPS4 that referenced this pull request Nov 7, 2024
fpiesche pushed a commit to fpiesche/shadPS4 that referenced this pull request Nov 9, 2024
@squidbus squidbus deleted the gs-mac branch November 16, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants