[PR #837] [MERGED] video_core: Add fallback path for pipelines with more than 32 bindings #1800

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/837
Author: @raphaelthegreat
Created: 9/7/2024
Status: Merged
Merged: 9/10/2024
Merged by: @raphaelthegreat

Base: mainHead: bindings


📝 Commits (4)

  • fe5c38f video_core: Small fixes
  • 449c998 renderer_vulkan: Add fallback path for pipelines with more than 32 bindings
  • 8907e4f vk_resource_pool: Rewrite desc heap
  • dc2c9b4 work

📊 Changes

27 files changed (+220 additions, -145 deletions)

View changed files

📝 src/core/libraries/gnmdriver/gnmdriver.cpp (+1 -0)
📝 src/emulator.cpp (+0 -1)
📝 src/shader_recompiler/backend/spirv/emit_spirv.cpp (+3 -0)
📝 src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp (+1 -1)
📝 src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp (+2 -1)
📝 src/shader_recompiler/backend/spirv/spirv_emit_context.cpp (+3 -1)
📝 src/shader_recompiler/frontend/translate/translate.cpp (+1 -1)
📝 src/shader_recompiler/frontend/translate/vector_memory.cpp (+5 -0)
📝 src/shader_recompiler/info.h (+3 -2)
📝 src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp (+1 -2)
📝 src/shader_recompiler/ir/passes/resource_tracking_pass.cpp (+3 -22)
📝 src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp (+5 -0)
📝 src/shader_recompiler/specialization.h (+2 -2)
📝 src/video_core/amdgpu/pm4_cmds.h (+19 -0)
📝 src/video_core/buffer_cache/buffer_cache.cpp (+7 -8)
📝 src/video_core/renderer_vulkan/vk_compute_pipeline.cpp (+25 -7)
📝 src/video_core/renderer_vulkan/vk_compute_pipeline.h (+5 -2)
📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (+21 -8)
📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.h (+6 -1)
📝 src/video_core/renderer_vulkan/vk_instance.cpp (+3 -1)

...and 7 more files

📄 Description

Fixes crashes in games that bind many resources. This is done by maintaining a classic descriptor pool and allocating sets in batches to update them. It is expected that only a small subset of draws will hit this path, thus the update call should be fine perf wise. If there are games that consistently bind that many resources, we can explore options to batch updates.


🔄 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/837 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 9/7/2024 **Status:** ✅ Merged **Merged:** 9/10/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `bindings` --- ### 📝 Commits (4) - [`fe5c38f`](https://github.com/shadps4-emu/shadPS4/commit/fe5c38f77ef8839b90a0db5b0f5aafa41ce50d9b) video_core: Small fixes - [`449c998`](https://github.com/shadps4-emu/shadPS4/commit/449c99868a21f8d0b3bd21a91613b32fef3b5fb5) renderer_vulkan: Add fallback path for pipelines with more than 32 bindings - [`8907e4f`](https://github.com/shadps4-emu/shadPS4/commit/8907e4ff3c08d8b4e51e1c021b7bdd9ec88a13fb) vk_resource_pool: Rewrite desc heap - [`dc2c9b4`](https://github.com/shadps4-emu/shadPS4/commit/dc2c9b4fde8f68d948d48b0e7f275f18d8a839e7) work ### 📊 Changes **27 files changed** (+220 additions, -145 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/gnmdriver/gnmdriver.cpp` (+1 -0) 📝 `src/emulator.cpp` (+0 -1) 📝 `src/shader_recompiler/backend/spirv/emit_spirv.cpp` (+3 -0) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp` (+1 -1) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp` (+2 -1) 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.cpp` (+3 -1) 📝 `src/shader_recompiler/frontend/translate/translate.cpp` (+1 -1) 📝 `src/shader_recompiler/frontend/translate/vector_memory.cpp` (+5 -0) 📝 `src/shader_recompiler/info.h` (+3 -2) 📝 `src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp` (+1 -2) 📝 `src/shader_recompiler/ir/passes/resource_tracking_pass.cpp` (+3 -22) 📝 `src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp` (+5 -0) 📝 `src/shader_recompiler/specialization.h` (+2 -2) 📝 `src/video_core/amdgpu/pm4_cmds.h` (+19 -0) 📝 `src/video_core/buffer_cache/buffer_cache.cpp` (+7 -8) 📝 `src/video_core/renderer_vulkan/vk_compute_pipeline.cpp` (+25 -7) 📝 `src/video_core/renderer_vulkan/vk_compute_pipeline.h` (+5 -2) 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp` (+21 -8) 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.h` (+6 -1) 📝 `src/video_core/renderer_vulkan/vk_instance.cpp` (+3 -1) _...and 7 more files_ </details> ### 📄 Description Fixes crashes in games that bind many resources. This is done by maintaining a classic descriptor pool and allocating sets in batches to update them. It is expected that only a small subset of draws will hit this path, thus the update call should be fine perf wise. If there are games that consistently bind that many resources, we can explore options to batch updates. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:00 +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#1800
No description provided.