Henrik Rydgård and Claude Opus 5.5
d0baab5614
Compute FIXA/FIXB blends like the GE
...
The GE's blend terms are floor((2c+1)(2f+1)/1024), which truncates, while the
hardware multiplies by f/255 and rounds, so every pass of a fixed color blend
chain came out up to a level brighter. God Eater Burst's bloom is many such
passes and ended up far too bright.
For additive FIXA/FIXB blends that aren't just 0 and 0xFFFFFF, the shader
now computes the src term exactly and lowers it by 0.5 - (2B+1)/1024, and the
blend constant is the GE's dst factor (2B+1)/512, so the hardware's rounding
of the sum lands on the GE's floor (except where the src term would go below
zero). Blend constants are passed as floats to make that possible.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-09 09:09:36 +02:00
Henrik Rydgård and Claude Opus 5.5
d0e6174389
Apply the pixel masks to clears in the hardware backends
...
On the PSP the color and alpha/stencil write masks apply to clears like to
drawing (gpu/stencil/writemask, ppsspp-re geprobe exp254). Clear-mode draws
now take the same per-channel heuristic as other draws, and a clear with RGB
masked is drawn rather than done as a hardware clear.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-08 11:42:27 +02:00
Henrik Rydgård
1b2f87bf1a
Rename GPUgstate to GEState
2026-07-02 20:34:09 +02:00
Henrik Rydgård
5676e90896
Rename some stencil enums
2026-06-14 13:33:13 +02:00
Henrik Rydgård
40a345bff8
Fix a filtering issue, enable this for Fushigi no Dungeon 4.
2026-06-12 23:52:50 +02:00
Henrik Rydgård
5c340ccd09
Remove the concept of scaled/offset depth buffers.
2026-06-10 10:41:30 +02:00
Henrik Rydgård
d849db6be5
Buildfix, remove redundant variable
2026-05-30 19:07:59 +02:00
Henrik Rydgård
ae98055cec
Delete a lot of legacy depth and viewport code, fix OpenGL
2026-05-30 19:07:58 +02:00
Henrik Rydgård
67010ff2af
Split the display layout config between landscape and portrait orientations
2025-11-05 12:49:51 +01:00
Henrik Rydgård
8accc57df7
Avoid using shader blending (with framebuffer copy) if skip-buffer-effects is enabled
...
Fixes #20267
2025-04-17 19:18:59 +02:00
Henrik Rydgård
4f2f1c4392
Tilt: Fix some edge cases leading to division by zero and similar.
2023-11-09 19:14:31 +01:00
Henrik Rydgård
547ecec074
Replace the rest of the uses of DepthSliceFactor
2023-02-11 14:45:14 +01:00
Henrik Rydgård
241f8e75bc
Replace some uses of DepthSliceFactor
2023-02-11 14:37:48 +01:00
Henrik Rydgård
d40aa17198
Remove ToScaledDepthFromIntegerScale
2023-02-11 13:27:44 +01:00
Henrik Rydgård
28a7912ae6
Add comments, re-enable remaining tests (they do work, just forgot to add expected values)
2023-02-11 01:11:02 +01:00
Henrik Rydgård
8d40684833
Make the test pass, add some commented-out failing ones
2023-02-10 14:57:48 +01:00
Henrik Rydgård
d65dae7185
Depth scale functions: Clean up the naming, add a failing test
2023-02-10 14:57:45 +01:00
Unknown W. Brackets
745d9ad320
GPU: Avoid enabling depth test pointlessly.
...
See #16015 . Attempting to avoid a driver bug.
2022-11-08 20:06:08 -08:00
Unknown W. Brackets
a397c74140
GPU: Fix simulating logicop with blend and shader.
...
We only need to do it in the shader, if we're doing it in the shader.
2022-09-13 19:07:25 -07:00
Henrik Rydgård
d9989ffc16
Don't start blending in the shader just because there's bitmasks, if blend is disabled.
2022-09-12 15:39:29 +02:00
Henrik Rydgård
b15c65540e
Fix the new logic-op-in-shader on OpenGL and D3D11
...
Also disable BlueToAlpha for now for Outrun and DiRT 2, it breaks the
water effect somehow. Will come back to it later.
2022-09-04 22:53:05 +02:00
Henrik Rydgård
8194bb73a1
Turn on logic ops in shader when shader bitmasking is used.
2022-09-04 11:43:36 +02:00
Henrik Rydgård
3d2e78fbf4
spaces->tabs
2022-09-04 00:11:22 +02:00
Henrik Rydgård
ec173559f8
Additional cleanup
2022-09-04 00:10:55 +02:00
Henrik Rydgård
ceda7aef49
Add log functions to state structs
2022-09-04 00:10:55 +02:00
Henrik Rydgård
d35749bfc8
Move the computation of simulate-logic shader type earlier
2022-09-04 00:10:55 +02:00
Henrik Rydgård
87b14fe1c2
Some more renaming and refactoring, extracted from a future PR
2022-09-04 00:10:55 +02:00
Henrik Rydgård
8e39018b95
Channel mask refactor
2022-09-04 00:10:54 +02:00
Henrik Rydgård
c846c2dfa8
Remove confusing resetFramebufferRead flag from secondary framebuffer binding
2022-09-03 14:48:07 +02:00
Henrik Rydgård
8c56abd3dc
Remove setting "Disable slower framebuffer effects"
2022-09-03 11:06:43 +02:00
Henrik Rydgård
68d88726ae
Remove unused function
2022-09-03 11:06:43 +02:00
Henrik Rydgård
0fe064d970
Small steps
2022-09-02 22:43:58 +02:00
Henrik Rydgård
de712b7804
More renaming
2022-09-02 22:20:11 +02:00
Henrik Rydgård
c784c0e94b
Some renaming. Store the BlendState/MaskState.
2022-09-02 21:07:29 +02:00
Unknown W. Brackets
f5efc1aa56
GPU: Make Spongebob hack checks more readable.
...
Multiline clauses are just a lie programmers tell themselves to make them
think they've written readable code, just because it's better than a
single line.
Also add comments while there, in case this causes problems.
2022-08-28 08:50:16 -07:00
Henrik Rydgård
c75b0235e1
Update the Spongebob workaround check to work with MX vs ATV: Reflex. See #15907
...
Not ideal to not check the verts :(
2022-08-28 15:09:58 +02:00
Henrik Rydgård
e63c14b45a
More spongebob check tweaks, assert fix
2022-08-28 09:13:43 +02:00
Henrik Rydgård
98f2e2a370
Remove irrelevant stencil state checks
2022-08-28 07:35:26 +02:00
Henrik Rydgård
dae92b41fb
Safer spongebob depth inverse check, includes color check and depth func
2022-08-28 07:25:08 +02:00
Henrik Rydgård
df92f72ac3
Unify the spongebob depth inverse check
2022-08-28 07:11:00 +02:00
Unknown W. Brackets
b5a4843c1f
GPU: Purify ConvertViewportAndScissor().
...
This makes it harder to misuse. See #15856 .
2022-08-20 14:21:11 -07:00
Henrik Rydgård
73fc9fb520
OpenGL fix
2022-08-01 11:57:22 +02:00
Henrik Rydgård
c9a37ec6b9
Remove bool that was always true in state mapping.
2022-07-24 21:04:54 +02:00
Henrik Rydgård
462972f7ea
Add option to redirect blue to alpha if 565 mode is rendered and mask is 0x0FFFFF.
...
This is used by several games to render to the alpha channel of RGBA4444
images, which cannot normally be done directly on the PSP.
Can be used as a far more efficient replacement for
ReinterpretFramebuffers/ShaderColorBitmask
2022-04-30 18:17:16 +02:00
Henrik Rydgård
6bc7a699fe
Minor cleanups in framebuffer manager
2022-04-30 18:14:53 +02:00
Henrik Rydgård
32df78a2cc
Make the existing ReinterpretFramebuffers/ShaderColorBitmask path work for Split/Second
...
It took writing and debugging #15500 for me to understand what the issue with the old path was..
Much simpler alternative to #15500 , or we could merge both but disable Split/Second
for this one. Needs some benchmarks I guess...
2022-04-25 00:11:09 +02:00
Henrik Rydgård
45308a16c0
Vulkan is strict about scissor rect, so let's clamp centrally.
...
Better than spreading the logic all over.
Fixes #15207
2021-12-08 22:38:01 +01:00
Henrik Rydgård
6310af25fa
Get shader color write masking going on all backends.
2020-11-08 23:45:47 +01:00
Henrik Rydgård
793e89d2e3
Fix some comments, rename a function.
2020-11-08 14:34:04 +01:00
Henrik Rydgård
3d289594f9
ShaderBlend and FramebufferRead are separate concepts. Reflect that in naming.
...
The former has forms that don't need to read the framebuffer.
This exposes that some logic is wrong...
2020-11-08 12:54:05 +01:00