Commit Graph

139 Commits

Author SHA1 Message Date
Henrik Rydgård
9512bc6174 Don't cache render target copies for shader blending, only cache copies for overlap
Fixes #17451, while also keeping the Dante performance fix from #17032.

Of course, it's possible that something else could slow down now... But
hopefully not. This could also fix other problems.
2023-05-11 12:04:29 +02:00
Unknown W. Brackets
49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Unknown W. Brackets
f6980b9f9d D3D9: Avoid curve Z clip to be safe.
I think it does actually happen, but we don't do it in the shader, so
let's not do it here.
2022-12-18 12:01:28 -08:00
Unknown W. Brackets
3e77cb1475 D3D9: Support old-style user clip planes.
This fixes negative Z issues on D3D9 in many cases, such as #14168
and #16574, but only when clip planes are supported.
2022-12-18 11:04:33 -08:00
Unknown W. Brackets
e50eae1bfb GPU: Cleanup some bounds checks, assignments. 2022-12-03 07:17:12 -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
Unknown W. Brackets
3333f2a5aa GPU: Avoid clears for non-simple depth values.
Some drivers don't round depth the same way for a clear vs for drawing,
which can cause mismatches.  We only do this if we see equals-style depth
comparison funcs used in drawing.
2022-11-08 20:06:08 -08:00
Henrik Rydgård
fb250c4b29 More multiview work 2022-10-27 11:05:58 +02:00
Henrik Rydgård
ee46f8992e Don't use fragmentShaderInt32Support as a replacement for checking for bitwiseOps 2022-10-10 18:02:19 +02:00
Henrik Rydgård
ce82fce8de Use subpass dependencies to implement shader framebuffer read in Vulkan. 2022-09-16 19:19:42 +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
ec173559f8 Additional cleanup 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
c784c0e94b Some renaming. Store the BlendState/MaskState. 2022-09-02 21:07:29 +02:00
Henrik Rydgård
67d6549afd Rename Slow Framebuf effects to Shader Blending (might remove). Reassign readbacks to BlockTransferGPU. 2022-08-31 14:23:33 +02:00
Henrik Rydgård
4da2ca0935 Implement shader blending for D3D9
This was easy, dunno why I never got around to it before..
I guess I didn't know about VPOS.

This does raise our minimum shader model requirement to ps_3_0.
2022-08-30 12:19:56 +02:00
Unknown W. Brackets
a8190f3eb4 GPU: Recheck depth/stencil after Spongebob hack.
Since we swap the compare, we should at least recheck it later.
2022-08-28 08:39:05 -07:00
Unknown W. Brackets
18e1efece1 GPU: Add a way to defer dirty rechecks.
These are situations where we have temporary state which will require
recalc again later.
2022-08-28 08:34:48 -07:00
Henrik Rydgård
df92f72ac3 Unify the spongebob depth inverse check 2022-08-28 07:11:00 +02:00
Henrik Rydgård
880ea48e2d Implement the stencil/alpha reverse trick for all backends 2022-08-27 10:25:18 +02:00
Henrik Rydgård
27ba7438eb Comment fix, cleanup 2022-08-27 10:05:47 +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
12db0e52d4 Fix deferred-depth for bezier/spline. Move updating of last_frame_depth_render to GPUCommon. 2022-08-20 08:29:33 +02:00
Henrik Rydgård
886679c7ec Remove the color-to-depth mode 2022-08-20 08:29:33 +02:00
Henrik Rydgård
d0cdb360fd Remove the DX9 namespace, for consistency with the other backends 2022-08-16 21:49:16 +02:00
Henrik Rydgård
131098c4d4 Some enum renaming, move RasterChannel to GPU.h. 2022-08-09 19:58:48 +02:00
Henrik Rydgård
5987c355d3 D3D9: Fix a lot of stuff 2022-08-06 18:27:04 +02:00
Henrik Rydgård
08e2d951b4 State handling reordering in D3D11 and D3D9 backends. 2022-08-05 23:07:01 +02:00
Henrik Rydgård
7b7d16d2fb D3D9 fix 2022-08-01 12:11:42 +02:00
Henrik Rydgård
512382c4db
Merge pull request #15723 from hrydgard/d3d9-state-cache-cleanup
D3D9 state cache cleanup
2022-07-30 08:51:17 +02:00
Henrik Rydgård
16d4545967 Clarity improvement in dx state cache stencil func 2022-07-24 21:44:12 +02:00
Henrik Rydgård
e758506bdb Remove unnecessary complexity from the D3D9 state cache 2022-07-24 21:26:40 +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
66ddbe9513 Remove the rather problematic limit on framebuffer copies 2022-05-01 12:49:19 +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
Unknown W. Brackets
9fc94a3494 GPU: Skip cull for lines and points.
These already always go through software transform, so make sure we handle
them consistently.  We'll eventually convert to triangles.
2021-10-31 10:54:50 -07: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
6310af25fa Get shader color write masking going on all backends. 2020-11-08 23:45:47 +01:00
Henrik Rydgård
3e06eaccfb Fix some comments 2020-11-08 14:57:35 +01:00
Henrik Rydgård
793e89d2e3 Fix some comments, rename a function. 2020-11-08 14:34:04 +01:00
Henrik Rydgård
391b8155c5 More work on detangling the concepts and making things make more sense. 2020-11-08 13:14:23 +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
Henrik Rydgård
3d36049b65 Rename shader generator functions, a bit of moving around and adding an errorString param. 2020-10-21 23:20:25 +02:00
Henrik Rydgård
0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård
821817e6d4 Move the profiler to Common 2020-10-04 11:42:16 +02:00
Unknown W. Brackets
cbeeb8fdf1 GPU: Allow culling in through mode.
It works per tests and is used in Soul Caliber.  Fixes #13400.
2020-09-08 15:52:01 -07:00
Henrik Rydgård
cb568b8f5e Rename FramebufferDX9.cpp/h to FramebufferManagerDX9.cpp/h 2020-08-03 23:24:50 +02:00