Commit graph

1380 commits

Author SHA1 Message Date
Ivan Podogov e72cb6801a Add DXT1-5 decompression on ARM 2025-02-20 14:57:57 +03:00
RipleyTom cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
kd-11 3392f0a271 gl: Fix stencil resolve for NVIDIA cards
- Only NV cards fail to expose ARB_shader_stencil_export which forces a very clunky workaround
- Fix stencil parameter initialization
2025-02-11 02:28:31 +03:00
kd-11 10d5907f46 rsx: Implement framebuffer statistics to track the internal render resolution at runtime. 2025-02-11 02:28:31 +03:00
kd-11 0f3d2c7085 gl: Implement MSAA transparency (sample-to-coverage) 2025-02-11 02:28:31 +03:00
kd-11 485927ed0d gl: Fix crash when launching multiple games with MSAA enabled 2025-02-11 02:28:31 +03:00
kd-11 fab39a6495 gl: Add support for "hw MSAA resolve" option 2025-02-11 02:28:31 +03:00
kd-11 008bfa2cd2 gl: Add extra checks around invalid render/compute passes
- These would have saved a lot of time debugging problems
2025-02-11 02:28:31 +03:00
kd-11 5907a6a67d gl: Fix crash in texture cache due to incorrect surface handling 2025-02-11 02:28:31 +03:00
kd-11 85880e6037 gl: Implement remaining resolvers
- Add support for NVIDIA cards
- Implement all depth-stencil resolver passes
2025-02-11 02:28:31 +03:00
kd-11 042be7d7d1 gl: Implement basic MSAA rendertarget support
- Enough to get some popular titles working.
- Some depth resolvers still need work
2025-02-11 02:28:31 +03:00
kd-11 99ace42447 gl: Enforce full image creation argument declaration
- Closes a class of bugs caused by implicit conversion of similar argument types
2025-02-11 02:28:31 +03:00
kd-11 6c6d03ac5e gl: Upgrade the surface cache to become MSAA-aware 2025-02-11 02:28:31 +03:00
kd-11 8249b5dbfa gl: Implement MSAA resolve/unresolve for color images 2025-02-11 02:28:31 +03:00
kd-11 2a4bd6a7fc gl: Implement multisampled image creation 2025-02-11 02:28:31 +03:00
kd-11 a7a49d9eaa gl: Plumb stubbed MSAA support into the render target handlers 2025-02-11 02:28:31 +03:00
kd-11 808f67a3b2 gl: Stub dynamic sample count when creating textures 2025-02-11 02:28:31 +03:00
kd-11 89eb473dce rsx: Fix graphics corruption when switching between shader interpreter and recompiler at runtime 2025-02-02 12:08:05 +03:00
kd-11 e1c6df0df3 rsx: Fix dynamic constants patching when draw call is skipped
- Also adds an optimization to skip reuploads when patch occurs outside our critical range.
2025-01-15 11:27:04 +03:00
kd-11 7965a0313c rsx: Improved shader interpreter support when hw instancing is active 2025-01-15 11:27:04 +03:00
kd-11 27c56cde22 rsx/shaders: Track active MRT count per shader
- Also use more robust hashing to avoid collisions
2025-01-10 04:34:28 +03:00
Megamouse 1ab3a0bd73 RSX/Qt: Reuse gs_frame if possible 2025-01-06 15:49:09 +01:00
Megamouse 1c22cc2f52 overlays: add trophy list dialog 2025-01-01 13:42:21 +01:00
kd-11 9307abe7f5 rsx: Move more functions from rsx thread to the draw command processor 2024-12-29 20:53:05 +03:00
kd-11 05bab8ec4c rsx: Move draw call related functions to their own class 2024-12-29 20:53:05 +03:00
kd-11 43e04f3fc7 Revert "rsx/vk: Implement hardware instancing (#16466)"
This reverts commit 62701154f1.
2024-12-29 20:53:05 +03:00
kd-11 62701154f1
rsx/vk: Implement hardware instancing (#16466)
* rsx: Add code to detect instanced draw commands

* rsx: Add GLSL support for instanced rendering

* rsx: Move draw call related functions to their own class

* rsx: Move more functions from rsx thread to the draw command processor

* rsx: Fix vertex program compiler crash

* vk: Add support for hardware instanced draws

* rsx: Fix instancing bug when indexed addressing is used to read constants

* rsx: Fix rare crash in vertex program decompiler

- This whole decompiler mess needs a rewrite

* rsx: Handle dangling execution barriers

* rsx: Do not use global registers object in logical "firmware" units

* Cosmetic improvements

* rsx: Test vertex program flags on each draw

* rsx: Properly track changes in instancing state
2024-12-29 17:39:47 +02:00
Elad 575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
kd-11 c9a7abdd09 rsx: Fix OpenGL deadlock 2024-12-16 19:00:08 +03:00
Elad 2222807624 RSX/GCM: Fix memory unmapping for HLE GCM 2024-11-01 10:43:46 +02:00
Elad 488814bb2d rsx/vm: Exclude events from VM mutex
Fixes a deadlock from a recent pull request, perhaps also some deadlocks with locking both IDM and VM mutex.
2024-11-01 07:37:57 +02:00
kd-11 5ed7d043c4 Fix build and cleanup 2024-10-23 16:33:44 +03:00
kd-11 c28ec457fd gl: Silence compiler warnings 2024-10-23 16:33:44 +03:00
kd-11 a79ef1efb2 gl: Fix check_state compilation error 2024-10-23 16:33:44 +03:00
kd-11 681debd8f6 gl: Finalize host labels implementation 2024-10-23 16:33:44 +03:00
kd-11 6ce1816e3f rsx: Move the host job management into common code to share with GL 2024-10-23 16:33:44 +03:00
kd-11 7fdfbe3c52 gl: Implement basic DMA layer using AMD_pinned_memory 2024-10-23 16:33:44 +03:00
kd-11 e9a45a6d06 rsx: Clarify OGL and VK difference when handling border texels 2024-10-03 15:02:09 +03:00
kd-11 497b9ba55b rsx: Make use of remapped border colors 2024-10-03 15:02:09 +03:00
kd-11 826f805902 rsx: Use a proper struct to wrap around channel remap operations 2024-10-03 15:02:09 +03:00
kd-11 81f91e2095 Fix GL stencil tracking 2024-08-29 13:08:23 +03:00
Megamouse 3b36df48e9 Vk/Gl/Overlays: Do not blend the alpha channel when rendering overlays
When blending a source pixel with alpha less than 1 onto a texture, we will end up having even less alpha than before.
This can lead to ugly "holes" in the overlays, especially on the edges of glyphs with smooth fonts for example.
We can fix this by only blending the RGB values while keeping the destination's alpha value.
I haven't really seen this happen in RPCS3, but it's better to be safe than sorry.
2024-08-28 01:19:15 +03:00
kd-11 c7b2a21fcb Fix OpenGL behavior under wayland-egl 2024-08-12 04:55:26 +03:00
kd-11 3ef8046f5c rsx: Fix fragment constants decoding for non-x86 platforms 2024-08-09 15:09:26 +03:00
kd-11 f64c912d02 gl: Fixes for asahi linux 2024-08-01 14:14:56 +03:00
Megamouse 461862be46 rsx: make some functions const 2024-06-11 20:35:49 +02:00
kd-11 e966289ddb rsx: Drop hard requirement for GL_EXT_shader_integer_mix 2024-06-10 20:41:45 +03:00
kd-11 14e1214645 rsx: Properly implement 8-bit signed renormalization for textures 2024-06-10 20:41:45 +03:00
Elad Ashkenazi 0b22423ab8 Minor fs::file usage fixes
Do not crash on file creation failure. Make some config writes atomic.
2024-06-10 13:45:23 +03:00
kd-11 75d6765adc gl: Handle GCM_FORMAT_G8B8 readback compatibility check 2024-05-15 04:18:12 +03:00