mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[PR #1164] [MERGED] vulkan: Use dynamic vertex buffer strides when dynamic bindings unavailable. #1962
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#1962
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/1164
Author: @squidbus
Created: 9/30/2024
Status: ✅ Merged
Merged: 10/1/2024
Merged by: @georgemoralis
Base:
main← Head:fix-vertex📝 Commits (1)
7af9cb6vulkan: Use dynamic vertex buffer strides when dynamic bindings unavailable.📊 Changes
7 files changed (+65 additions, -26 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)📝
README.md(+1 -1)📝
src/video_core/buffer_cache/buffer_cache.cpp(+10 -1)📝
src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp(+30 -22)📝
src/video_core/renderer_vulkan/vk_graphics_pipeline.h(+1 -0)📝
src/video_core/renderer_vulkan/vk_instance.cpp(+1 -0)📝
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp(+21 -1)📄 Description
Currently when
VK_EXT_vertex_input_dynamic_stateis unsupported, the fallback fixed vertex bindings in the pipeline are not updated when user data affects the definition of the buffer by changing the stride or format. This is the root cause of a lot of vertex explosions and corrupted graphics on drivers like MoltenVK, across many games.Instead, we can take a two-part approach:
VK_EXT_extended_dynamic_state, which is supported on MoltenVK and any Vulkan 1.3 driver.This necessitates a minimum macOS version bump to 14, as dynamic vertex binding stride is not supported before Metal 3.1, which was introduced with macOS 14. Apple Silicon Macs already require 15, so this just affects some older Intel Macs that cannot upgrade to 14. I'm not sure how well this worked on those older models to begin with as I have never tested them, but guaranteeing higher Metal version support will make things a lot easier in general.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.