[PR #1412] [MERGED] renderer_vulkan: Commize and adjust buffer bindings #2095

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1412
Author: @raphaelthegreat
Created: 10/18/2024
Status: Merged
Merged: 10/19/2024
Merged by: @raphaelthegreat

Base: mainHead: buffer-common


📝 Commits (7)

  • 2f1d2e5 shader_recompiler: Implement finite cmp class
  • ed84d74 shader_recompiler: Implement more opcodes
  • b1cecf6 renderer_vulkan: Commonize buffer binding
  • 3ece6fc liverpool: More dma data impl
  • 91ef188 fix
  • efa5bcd copy_shader: Handle additional instructions from Knack
  • 2c7d730 translator: Add V_CMPX_GE_I32

📊 Changes

23 files changed (+437 additions, -341 deletions)

View changed files

📝 src/core/address_space.h (+4 -0)
📝 src/core/memory.cpp (+11 -0)
📝 src/core/memory.h (+2 -0)
📝 src/shader_recompiler/frontend/copy_shader.cpp (+8 -0)
📝 src/shader_recompiler/frontend/translate/scalar_alu.cpp (+20 -4)
📝 src/shader_recompiler/frontend/translate/translate.h (+3 -1)
📝 src/shader_recompiler/frontend/translate/vector_alu.cpp (+14 -0)
📝 src/shader_recompiler/ir/passes/constant_propagation_pass.cpp (+7 -25)
📝 src/shader_recompiler/ir/passes/resource_tracking_pass.cpp (+1 -1)
📝 src/shader_recompiler/ir/reg.h (+2 -0)
📝 src/video_core/amdgpu/liverpool.cpp (+67 -3)
📝 src/video_core/amdgpu/pm4_cmds.h (+23 -8)
📝 src/video_core/buffer_cache/buffer.h (+1 -0)
📝 src/video_core/buffer_cache/buffer_cache.cpp (+38 -32)
📝 src/video_core/buffer_cache/buffer_cache.h (+13 -10)
📝 src/video_core/renderer_vulkan/vk_compute_pipeline.cpp (+31 -126)
📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (+25 -118)
📝 src/video_core/renderer_vulkan/vk_pipeline_common.cpp (+145 -1)
📝 src/video_core/renderer_vulkan/vk_pipeline_common.h (+9 -0)
📝 src/video_core/renderer_vulkan/vk_rasterizer.cpp (+8 -10)

...and 3 more files

📄 Description

  • Implements S_BCNT1_I32_B64 and S_ORN2_SAVEEXEC_B64 used by Elden Ring https://github.com/shadps4-emu/shadPS4/issues/496#issuecomment-2411347485
  • Implement Finite compare class, which solves the FoldCmpClass assertion
  • Solves a problem where gpu writes would be lost if done on a buffer that was joined on the same draw
  • Reduces buffer cache invalidations caused by GPU label writes, by writing the label value directly in backing memory
  • Implements additional DmaData modes by writing directly to cached buffers

🔄 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/1412 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 10/18/2024 **Status:** ✅ Merged **Merged:** 10/19/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `buffer-common` --- ### 📝 Commits (7) - [`2f1d2e5`](https://github.com/shadps4-emu/shadPS4/commit/2f1d2e54c6e9c5f6ab1885494d21af2670b6cca5) shader_recompiler: Implement finite cmp class - [`ed84d74`](https://github.com/shadps4-emu/shadPS4/commit/ed84d7460ca91e6fcc417cae85f3e37d9a77c835) shader_recompiler: Implement more opcodes - [`b1cecf6`](https://github.com/shadps4-emu/shadPS4/commit/b1cecf6e878e4d72b9160ddf0013bbfc59f7824a) renderer_vulkan: Commonize buffer binding - [`3ece6fc`](https://github.com/shadps4-emu/shadPS4/commit/3ece6fc8d368506d33f9e91d9aa472f0328f850b) liverpool: More dma data impl - [`91ef188`](https://github.com/shadps4-emu/shadPS4/commit/91ef188f30ed2b89f10830fe124435e711d18e2d) fix - [`efa5bcd`](https://github.com/shadps4-emu/shadPS4/commit/efa5bcd392c1b05edf7ec4b13ed551e223f958bd) copy_shader: Handle additional instructions from Knack - [`2c7d730`](https://github.com/shadps4-emu/shadPS4/commit/2c7d730a09972492d3b33a84b93d1f1638d78635) translator: Add V_CMPX_GE_I32 ### 📊 Changes **23 files changed** (+437 additions, -341 deletions) <details> <summary>View changed files</summary> 📝 `src/core/address_space.h` (+4 -0) 📝 `src/core/memory.cpp` (+11 -0) 📝 `src/core/memory.h` (+2 -0) 📝 `src/shader_recompiler/frontend/copy_shader.cpp` (+8 -0) 📝 `src/shader_recompiler/frontend/translate/scalar_alu.cpp` (+20 -4) 📝 `src/shader_recompiler/frontend/translate/translate.h` (+3 -1) 📝 `src/shader_recompiler/frontend/translate/vector_alu.cpp` (+14 -0) 📝 `src/shader_recompiler/ir/passes/constant_propagation_pass.cpp` (+7 -25) 📝 `src/shader_recompiler/ir/passes/resource_tracking_pass.cpp` (+1 -1) 📝 `src/shader_recompiler/ir/reg.h` (+2 -0) 📝 `src/video_core/amdgpu/liverpool.cpp` (+67 -3) 📝 `src/video_core/amdgpu/pm4_cmds.h` (+23 -8) 📝 `src/video_core/buffer_cache/buffer.h` (+1 -0) 📝 `src/video_core/buffer_cache/buffer_cache.cpp` (+38 -32) 📝 `src/video_core/buffer_cache/buffer_cache.h` (+13 -10) 📝 `src/video_core/renderer_vulkan/vk_compute_pipeline.cpp` (+31 -126) 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp` (+25 -118) 📝 `src/video_core/renderer_vulkan/vk_pipeline_common.cpp` (+145 -1) 📝 `src/video_core/renderer_vulkan/vk_pipeline_common.h` (+9 -0) 📝 `src/video_core/renderer_vulkan/vk_rasterizer.cpp` (+8 -10) _...and 3 more files_ </details> ### 📄 Description * Implements S_BCNT1_I32_B64 and S_ORN2_SAVEEXEC_B64 used by Elden Ring https://github.com/shadps4-emu/shadPS4/issues/496#issuecomment-2411347485 * Implement Finite compare class, which solves the FoldCmpClass assertion * Solves a problem where gpu writes would be lost if done on a buffer that was joined on the same draw * Reduces buffer cache invalidations caused by GPU label writes, by writing the label value directly in backing memory * Implements additional DmaData modes by writing directly to cached buffers --- <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:10 +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#2095
No description provided.