[PR #2428] [MERGED] shader_recompiler: Remove special case buffers and add support for aliasing #2725

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2428
Author: @raphaelthegreat
Created: 2/14/2025
Status: Merged
Merged: 2/15/2025
Merged by: @raphaelthegreat

Base: mainHead: buffer-cleanup


📝 Commits (10+)

  • dd8fb9d shader_recompiler: Move shared mem lowering into emitter
  • 1a6d0c8 runtime_info: Pack PsColorBuffer into 8 bytes
  • 027c198 emit_spirv_context: Add infrastructure for buffer aliases
  • 7423ccf shader_recompiler: Merge srt_flatbuf into buffers list
  • b0dd81a shader_recompiler: Complete buffer aliasing support
  • 174107b shader_recompiler: Remove existing shared memory emulation
  • b05e657 shader_recompiler: Reintroduce shared memory on ssbo emulation
  • 67998c4 clang format
  • f171b25 buffer_cache: Reduce buffer sizes
  • 42d2b7a vk_rasterizer: Cleanup resource binding code

📊 Changes

36 files changed (+674 additions, -624 deletions)

View changed files

📝 CMakeLists.txt (+1 -1)
📝 src/shader_recompiler/backend/spirv/emit_spirv.cpp (+5 -2)
📝 src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp (+12 -9)
📝 src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp (+86 -62)
📝 src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp (+12 -42)
📝 src/shader_recompiler/backend/spirv/emit_spirv_special.cpp (+3 -0)
📝 src/shader_recompiler/backend/spirv/spirv_emit_context.cpp (+109 -112)
📝 src/shader_recompiler/backend/spirv/spirv_emit_context.h (+33 -7)
📝 src/shader_recompiler/frontend/translate/data_share.cpp (+18 -8)
📝 src/shader_recompiler/frontend/translate/export.cpp (+2 -2)
📝 src/shader_recompiler/frontend/translate/translate.cpp (+19 -3)
📝 src/shader_recompiler/frontend/translate/translate.h (+3 -1)
📝 src/shader_recompiler/info.h (+17 -25)
📝 src/shader_recompiler/ir/attribute.h (+11 -10)
📝 src/shader_recompiler/ir/passes/ir_passes.h (+4 -2)
src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp (+0 -81)
📝 src/shader_recompiler/ir/passes/resource_tracking_pass.cpp (+29 -19)
📝 src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp (+9 -3)
📝 src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp (+48 -24)
src/shader_recompiler/ir/passes/shared_memory_to_storage_pass.cpp (+117 -0)

...and 16 more files

📄 Description

Commit messages are mostly self explanatory. This wont fix any bugs, but needs some testing to ensure no regressions. After its merged 64-bit buffer atomics can be implemented as well


🔄 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/2428 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 2/14/2025 **Status:** ✅ Merged **Merged:** 2/15/2025 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `buffer-cleanup` --- ### 📝 Commits (10+) - [`dd8fb9d`](https://github.com/shadps4-emu/shadPS4/commit/dd8fb9dd4b05c23724fa5e37baafd943ac542ce0) shader_recompiler: Move shared mem lowering into emitter - [`1a6d0c8`](https://github.com/shadps4-emu/shadPS4/commit/1a6d0c8d0a94540054226bcb0aad20ea71b346c2) runtime_info: Pack PsColorBuffer into 8 bytes - [`027c198`](https://github.com/shadps4-emu/shadPS4/commit/027c198d742193cf43a391217758f4594eefaf7e) emit_spirv_context: Add infrastructure for buffer aliases - [`7423ccf`](https://github.com/shadps4-emu/shadPS4/commit/7423ccfe88dce6f5733702f8b3d170e1c04ed49f) shader_recompiler: Merge srt_flatbuf into buffers list - [`b0dd81a`](https://github.com/shadps4-emu/shadPS4/commit/b0dd81a2b9a804a4545ba7aab5c98de1eff81860) shader_recompiler: Complete buffer aliasing support - [`174107b`](https://github.com/shadps4-emu/shadPS4/commit/174107b41003e60ada479438690c79f3d0eb63e1) shader_recompiler: Remove existing shared memory emulation - [`b05e657`](https://github.com/shadps4-emu/shadPS4/commit/b05e6577d198e80582f2beb7b1a42e52b68251cc) shader_recompiler: Reintroduce shared memory on ssbo emulation - [`67998c4`](https://github.com/shadps4-emu/shadPS4/commit/67998c4a027c2446a93ca5c7a85fe9e20825b460) clang format - [`f171b25`](https://github.com/shadps4-emu/shadPS4/commit/f171b25d0396397f00ef894278a4c47a8d2be601) buffer_cache: Reduce buffer sizes - [`42d2b7a`](https://github.com/shadps4-emu/shadPS4/commit/42d2b7a823cb32b54793b417ef9311d16ec12407) vk_rasterizer: Cleanup resource binding code ### 📊 Changes **36 files changed** (+674 additions, -624 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+1 -1) 📝 `src/shader_recompiler/backend/spirv/emit_spirv.cpp` (+5 -2) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp` (+12 -9) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp` (+86 -62) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp` (+12 -42) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_special.cpp` (+3 -0) 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.cpp` (+109 -112) 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.h` (+33 -7) 📝 `src/shader_recompiler/frontend/translate/data_share.cpp` (+18 -8) 📝 `src/shader_recompiler/frontend/translate/export.cpp` (+2 -2) 📝 `src/shader_recompiler/frontend/translate/translate.cpp` (+19 -3) 📝 `src/shader_recompiler/frontend/translate/translate.h` (+3 -1) 📝 `src/shader_recompiler/info.h` (+17 -25) 📝 `src/shader_recompiler/ir/attribute.h` (+11 -10) 📝 `src/shader_recompiler/ir/passes/ir_passes.h` (+4 -2) ➖ `src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp` (+0 -81) 📝 `src/shader_recompiler/ir/passes/resource_tracking_pass.cpp` (+29 -19) 📝 `src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp` (+9 -3) 📝 `src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp` (+48 -24) ➕ `src/shader_recompiler/ir/passes/shared_memory_to_storage_pass.cpp` (+117 -0) _...and 16 more files_ </details> ### 📄 Description Commit messages are mostly self explanatory. This wont fix any bugs, but needs some testing to ensure no regressions. After its merged 64-bit buffer atomics can be implemented as well --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:01: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#2725
No description provided.