Commit graph

171 commits

Author SHA1 Message Date
Malcolm Jestadt 7b9aaacc4b RSX: ProgramStateCache logic cleanup and microoptimizations
- Eliminate some redundant checks in fragment and vertex comparison functions
- Add is_any_src_constant optimization, eliminates 1 instruction per loop
2025-02-16 12:28:10 +02:00
Malcolm Jestadt d891b83e4b RSX: Use checksum with rotated inputs for shader hashing instead of FNV
- Raises FPS from ~180 to ~200 in Ninja Gaiden
2025-02-16 12:28:10 +02:00
RipleyTom cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01: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 f3e913b56a vk: Redesign resource binding for overlay passes 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 82981384d5 vk: Move MSAA resolve/unresolve shaders to common GPU program layer 2025-02-11 02:28:31 +03:00
kd-11 2af497efbb rsx: Fix texcoord transformation bug caused by incorrect BFE usage 2025-01-19 19:31:59 +03:00
kd-11 7da0822419 rsx/shaders: Fix MSAA coords wrapping when input is negative 2025-01-15 11:27:04 +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 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
kd-11 a635e24fc2 rsx: Default initialize vertex program fields
- Fixes a crash when RSXVertexProgram is default-initialized. This
  probably also fixes a whole class of crashes that occur when
  shader interpreter is in use since that pipeline uses a
  default-initialized stub.
2025-01-10 04:34:28 +03:00
kd-11 dce0abc8b9 rsx/fp: Re-design register write tracking
- Always collapse register writes when exporting FS outputs
2025-01-10 04:34:28 +03:00
kd-11 88e13d8326 rsx: Don't crash when invalid buffer is allocated for a shader 2025-01-10 04:34:28 +03:00
kd-11 01fe39fbb9 rsx: Fix rare crash in vertex program decompiler
- This whole decompiler mess needs a rewrite
2024-12-29 20:53:05 +03:00
kd-11 15961b353a vk: Add support for hardware instanced draws 2024-12-29 20:53:05 +03:00
kd-11 d4573e233a rsx: Fix vertex program compiler crash 2024-12-29 20:53:05 +03:00
kd-11 9e9ae54455 rsx: Add GLSL support for instanced rendering 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
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
Megamouse 0dfc622b58 Fix unused function warning 2024-08-11 00:56:07 +02: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
kd-11 71524271e9 rsx: Fix codegen when depth-conversion is enabled 2024-06-28 12:13:33 +02:00
kd-11 a5956cfa82 rsx: Fix wrapped/clamped MSAA sampling behavior with dynamic flags 2024-06-27 22:55:56 +02:00
Megamouse 461862be46 rsx: make some functions const 2024-06-11 20:35:49 +02:00
Megamouse 1c7850de17 rsx: fix warnings and add missing default cases 2024-06-11 20:35:49 +02:00
kd-11 2647a09790 rsx: Avoid the complex remapper checks if the texture isn't in the XINT8 group 2024-06-10 20:41:45 +03: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
kd-11 37c9392e59 rsx: Initialize some vars 2024-05-12 21:26:25 +03:00
kd-11 b0375d9c9a rsx: Add a base class for vertex programs and implement range intersection for constant IDs 2024-05-12 21:26:25 +03:00
oltolm 9e9a3262eb simplify template code like std::is_same<T>::value 2024-04-21 18:15:17 +03:00
kd-11 40eda1b972 rsx: Make const explicitly unsigned
- Can silence some GLSL compiler noise in mesa
2024-04-17 22:22:37 +03:00
kd-11 a5c3e303c7 rsx: Improve ROP output rounding precision
- Lower 12 bits seem to be unused based on empirical sampling
2024-04-17 22:22:37 +03:00
oltolm 59410b9d62 fix compiler warnings 2024-03-28 08:45:20 +01:00
kd-11 4594c912a6
rsx: Move SPIRV stuff into common code 2024-03-27 19:20:21 +02:00
kd-11 071baf63b0 rsx: Implement FSR1 integration for OpenGL 2024-02-26 18:15:06 +03:00
kd-11 e7d8ef924f rsx/vk: Refactor FSR integration to support multiple backends 2024-02-26 18:15:06 +03:00
kd-11 823c72bf27 rsx/vk: Redefine the (de)tiler config interface 2024-02-10 15:15:02 +03:00
Megamouse cba51b4a5e rsx/glsl: use const for left/right 2024-02-02 10:07:23 +01:00
kd-11 8962ddca01 rsx/glsl: Fix typo 2024-02-02 10:07:23 +01:00
kd-11 1808a4373b rsx: Improvements to the video out passes
- Use shared VS for vulkan as well as GL
- Simplify binding model and give control back to the cpp side
2024-02-02 10:07:23 +01:00
Megamouse ac9afbfede glsl: use fragCoord to decide interlacing 2024-02-02 10:07:23 +01:00
Megamouse 4e8130bd99 glsl: use textureSize instead of height 2024-02-02 10:07:23 +01:00
Megamouse 00c9321b1d glsl: use const in for params 2024-02-02 10:07:23 +01:00
Megamouse 8e8b582747 glsl: move anaglpyh to separate functions 2024-02-02 10:07:23 +01:00
Megamouse 6f2e843193 vk/gl: add amber-blue anaglyph (ColorCode 3D) 2024-02-02 10:07:23 +01:00
Megamouse 7d9460a560 vk/gl: cleanup formatting in glsl, move some common magic numbers to variables 2024-02-02 10:07:23 +01:00