mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-27 08:46:03 +03:00
[PR #1029] [CLOSED] Remove dead vs inputs in spir-v, and don't bind corresponding vbo #1890
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#1890
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/1029
Author: @baggins183
Created: 9/22/2024
Status: ❌ Closed
Base:
main← Head:dead-vs-inputs📝 Commits (2)
5c5f956Remove dead vs inputs in spir-v, and don't bind corresponding vbo946a94cremove warning📊 Changes
2 files changed (+16 additions, -8 deletions)
View changed files
📝
src/shader_recompiler/backend/spirv/spirv_emit_context.cpp(+4 -0)📝
src/video_core/buffer_cache/buffer_cache.cpp(+12 -8)📄 Description
Fixes a validation error about vkCmdSetVertexInputEXT(). If the V#
corresponding to an input semantic has size 0, BindVertexBuffers() won't
bind any buffer and wont add vulkan BindingInfo/AttributeInfo for that semantic.
Detect and remove dead vs inputs from the vs spirv so there aren't spirv Input vars without vertex input info.
Ideally when the buffer is empty, the spirv attribute should be dead.
Seen this happen because of empty V#s with dst_sel == 0001
example
[Render.Vulkan] [thread GPU_CommandProc, tid=456257] vk_platform.cpp:DebugUtilsCallback:68: VUID-vkCmdDrawIndexed-Input-07939: Validation Error: [ VUID-vkCmdDrawIndexed-Input-07939 ] Object 0: handle = 0xe5f5e400000015b9, name = vs_0x9e267629561c22fe_0, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x8d9172cc | vkCmdDrawIndexed(): Vertex shader uses input at location 4, but it was not provided with vkCmdSetVertexInputEXT(). The Vulkan spec states: If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with the Input storage class decorated with Location in the Vertex Execution Model OpEntryPoint must contain a location in VkVertexInputAttributeDescription2EXT::location (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-Input-07939)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.