shadPS4/src/shader_recompiler/backend/spirv
Lander Gallastegi f9bbde9c79
video_core: Implement DMA. (#2819)
* Import memory

* 64K pages and fix memory mapping

* Queue coverage

* Buffer syncing, faulted readback adn BDA in Buffer

* Base DMA implementation

* Preparations for implementing SPV DMA access

* Base impl (pending 16K pages and getbuffersize)

* 16K pages and stack overflow fix

* clang-format

* clang-format but for real this time

* Try to fix macOS build

* Correct decltype

* Add testing log

* Fix stride and patch phi node blocks

* No need to check if it is a deleted buffer

* Clang format once more

* Offset in bytes

* Removed host buffers (may do it in another PR)

Also some random barrier fixes

* Add IR dumping from my read-const branch

* clang-format

* Correct size insteed of end

* Fix incorrect assert

* Possible fix for NieR deadlock

* Copy to avoid deadlock

* Use 2 mutexes insteed of copy

* Attempt to range sync error

* Revert "Attempt to range sync error"

This reverts commit dd287b48682b50f215680bb0956e39c2809bf3fe.

* Fix size truncated when syncing range

And memory barrier

* Some fixes (and async testing (doesn't work))

* Use compute to parse fault buffer

* Process faults on submit

* Only sync in the first time we see a readconst

Thsi is partialy wrong. We need to save the state into the submission context itself, not the rasterizer since we can yield and process another sumission (if im not understanding wrong).

* Use spec const and 32 bit atomic

* 32 bit counter

* Fix store_index

* Better sync (WIP, breaks PR now)

* Fixes for better sync

* Better sync

* Remove memory coveragte logic

* Point sirit to upstream

* Less waiting and barriers

* Correctly checkout moltenvk

* Bring back applying pending operations in wait

* Sync the whole buffer insteed of only the range

* Implement recursive shared/scoped locks

* Iterators

* Faster syncing with ranges

* Some alignment fixes

* fixed clang format

* Fix clang-format again

* Port page_manager from readbacks-poc

* clang-format

* Defer memory protect

* Remove RENDERER_TRACE

* Experiment: only sync on first readconst

* Added profiling (will be removed)

* Don't sync entire buffers

* Added logging for testing

* Updated temporary workaround to use 4k pages

* clang.-format

* Cleanup part 1

* Make ReadConst a SPIR-V function

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2025-05-22 21:00:15 +03:00
..
emit_spirv_atomic.cpp video_core: Implement DMA. (#2819) 2025-05-22 21:00:15 +03:00
emit_spirv_barriers.cpp Tessellation (#1528) 2024-12-14 12:56:17 +02:00
emit_spirv_bitwise_conversion.cpp shader_recompiler: Add lowering pass for when 64-bit float is unsupported. (#2858) 2025-04-28 00:04:16 -07:00
emit_spirv_composite.cpp shader_recompiler: Replace texel buffers with in-shader buffer format interpretation (#2363) 2025-02-06 20:40:49 -08:00
emit_spirv_context_get_set.cpp video_core: Implement DMA. (#2819) 2025-05-22 21:00:15 +03:00
emit_spirv_convert.cpp shader_recompiler: Small instruction parsing refactor/bugfixes (#340) 2024-07-30 23:32:40 +02:00
emit_spirv_floating_point.cpp shader_recompiler: Misc shader fixes. (#2781) 2025-04-13 23:46:30 -07:00
emit_spirv_image.cpp shader_recompiler: Remove AMD native CubeFaceCoord. (#2129) 2025-01-11 13:57:49 -08:00
emit_spirv_instructions.h video_core: Implement DMA. (#2819) 2025-05-22 21:00:15 +03:00
emit_spirv_integer.cpp shader_recompiler: Implement S_FLBIT_I32_B32 and V_MUL_HI_I32. (#2793) 2025-04-16 18:08:09 +03:00
emit_spirv_logical.cpp video: Import new shader recompiler + display a triangle (#142) 2024-05-22 01:35:12 +03:00
emit_spirv_quad_rect.cpp video_core: Various small improvements and bug fixes (#2525) 2025-02-24 14:31:12 +02:00
emit_spirv_quad_rect.h renderer_vulkan: Implement rectlist emulation with tessellation (#1857) 2024-12-24 13:28:47 +02:00
emit_spirv_select.cpp video_core: Track renderpass scopes properly 2024-07-01 13:56:14 +03:00
emit_spirv_shared_memory.cpp shader_recompiler: Remove special case buffers and add support for aliasing (#2428) 2025-02-15 14:06:56 +02:00
emit_spirv_special.cpp shader_recompiler: Implement AMD buffer bounds checking behavior. (#2448) 2025-02-17 16:13:39 +02:00
emit_spirv_undefined.cpp video_core: Track renderpass scopes properly 2024-07-01 13:56:14 +03:00
emit_spirv_warp.cpp video_core: Add fallback path for pipelines with more than 32 bindings (#837) 2024-09-10 20:54:39 +03:00
emit_spirv.cpp video_core: Implement DMA. (#2819) 2025-05-22 21:00:15 +03:00
emit_spirv.h shader_recompiler: Additional scope handling and user data as push constants (#1013) 2024-09-23 08:55:43 +02:00
spirv_emit_context.cpp video_core: Implement DMA. (#2819) 2025-05-22 21:00:15 +03:00
spirv_emit_context.h video_core: Implement DMA. (#2819) 2025-05-22 21:00:15 +03:00