Unknown W. Brackets
98758573e3
GPU: Convert alphamask to FF/00 for 5551.
...
When masking via uniform, we don't care about the lower bits of alpha.
Games often use 7F / 80 to control writes of FF/00.
2022-11-12 17:41:48 -08: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
Henrik Rydgård
69941c0d72
Android fix
2022-11-06 20:01:22 +01:00
Henrik Rydgård
30aa07b156
Two more renames to make things read better
2022-10-17 08:47:05 +02:00
Henrik Rydgård
9b8a5d1db3
Rename GPU_SUPPORTS_ to GPU_USE_
2022-10-17 08:47:03 +02:00
Henrik Rydgård
daca0b2109
Rename gstate_c.Supports to gstate_c.Use
2022-10-17 08:46:37 +02:00
Unknown W. Brackets
162b27e136
GPU: Replace logic ops with blend for simple cases.
...
So that alpha/stencil are handled correctly.
2022-10-16 22:24:43 -07:00
Henrik Rydgård
85d1f28997
Throw in assorted warning fixes
2022-09-20 18:04:08 +02:00
Henrik Rydgård
9ec35d1464
Logic op fix, min filter fix. Also remove some unnecessary indentation. Fixes the water on Adreno (no logic)
2022-09-16 12:39:37 +02: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
b86648b352
Address feedback
2022-09-12 16:30:08 +02: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
ed8c4e8758
Remove the assembly implementation of 4x4 matrix mul, in favor of intrinsics.
2022-09-05 10:33:05 +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
5f1ffeae70
Correct LogicOp API support detection
2022-09-04 00:08:40 +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
fd6ab4c495
Avoid recomputing the shaderblend setup in ComputeFragmentShaderID.
2022-09-02 23:06:41 +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
Henrik Rydgård
d99e4b6714
Quicker way to update the through projection matrix with the split framebuffer offset
2022-08-31 08:44:15 +02:00
Henrik Rydgård
7186fc2c17
Offset the draws properly. Now just some texel clamping left to fix
2022-08-31 01:40:53 +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
886679c7ec
Remove the color-to-depth mode
2022-08-20 08:29:33 +02:00
Unknown W. Brackets
a321aba68c
GPU: Avoid stencil force pass when writing depth.
...
There's a risk if the stencil test failed, it might cause a depth write
unless it's also masked. Hunter x Hunter doesn't in this case.
2022-08-10 23:11:16 -07:00
Henrik Rydgård
f80dd088b8
Merge pull request #15822 from unknownbrackets/gpu-stencil
...
GPU: Write stencil fail to alpha is RGB masked
2022-08-10 14:59:53 +02:00
Unknown W. Brackets
710abcc288
GPU: Write stencil fail to alpha is RGB masked.
...
See #15813 (Hunter x Hunter) which does this for shadows.
2022-08-09 18:45:49 -07:00
Henrik Rydgård
131098c4d4
Some enum renaming, move RasterChannel to GPU.h.
2022-08-09 19:58:48 +02:00
Henrik Rydgård
90a44579bf
Implement color-to-depth for Vulkan, start implementing for D3D11
2022-08-01 11:30:36 +02:00
Henrik Rydgård
a44bee6f85
Fix bug in blue-to-alpha - alpha blending could be on when it shouldn't be.
...
Fixes #15732 . (Split/Second environment mapping problem in the menu).
2022-07-27 10:59:39 +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
04a85b1da0
Allows "merging" render targets that overlap on the Y access. Fixes #7295 (Juiced 2)
...
To be safe, gating this behind the related AllowLargeFBTextureOffsets,
which is also required for the effect to work.
Additionally, fixes the offset check for X offsets, which I guess is a
very small risk.
2022-07-24 11:58:07 +02:00
Henrik Rydgård
6b2dec91b5
Finish BlueToAlpha functionality
2022-04-30 18:17:17 +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
7be86264d0
Move framebufFormat to gstate_c, so we can override it
2022-04-30 18:16:09 +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
69ae3f4c02
Better protection against broken viewports.
...
It's ok if this emits a single pixel sized viewport, since the cause of
this is generally the viewport being specified outside the scissor
rectangle.
Fixes #13921
2021-07-12 21:19:26 +02:00
Henrik Rydgård
7359c8f083
Revert "Make sure we don't try to set a negative viewport size."
...
This reverts commit 0386cafe53
.
2021-07-12 21:03:29 +02:00
Unknown W. Brackets
9857e8d1b1
GPU: Respect stencil write mask for 5551 buffers.
...
If the mask is 0x7F on 5551, that's equivalent to allowing the clear
entirely. See #13391 .
2021-01-24 15:54:13 -08:00
Henrik Rydgård
0386cafe53
Make sure we don't try to set a negative viewport size.
...
Should help #13921 .
2021-01-16 09:45:21 +01:00
Henrik Rydgård
d5fe6154b5
Enable color reinterpret for Ultimate Ghosts & Goblins
...
The game uses it by accident probably, but whatever - it's a clean fix.
Fixes, but only for "modern" APIs, #13717 .
2020-11-27 23:52:33 +01:00