99 Commits

Author SHA1 Message Date
Henrik Rydgård 058b1af285 Revert to software on out-of-bounds projected depth 2026-05-30 19:07:59 +02:00
Henrik Rydgård 5808afef10 Implement minZ/maxZ through user clip planes 2026-05-30 19:07:58 +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
Herman Semenoff 400d136f51 GPU: modernize use C++17 constexpr for precalculate compilation 2026-05-19 21:57:45 +03: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 df6ed8cfc9 Do some cleanup of #includes in GPU 2024-12-18 13:57:26 +01:00
Henrik Rydgård 53aa2cc596 Apply stencil writemask when clearing properly again, see #17478
Also renames vpAndScissor to vpAndScissor_ for consistency.
2023-06-12 11:49:44 +02:00
Henrik Rydgård cb38c43d7e GL render manager: Merge the two stencil commands, for more compact command lists 2023-05-23 09:14:23 +02:00
Henrik Rydgård 470ebbfe73 GL: When setting a stencil value for clear, override both func and op for consistency. 2023-05-23 09:14:23 +02:00
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 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 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
Henrik Rydgård e0e29a1556 Merge pull request #16197 from hrydgard/more-uniform-optimization
More uniform optimization, fixes
2022-10-12 01:00:27 +02:00
Henrik Rydgård d30d8bf35c Removes the option, autodetect instead - only enable if the GPU doesn't support bitwise ops. 2022-10-11 16:09:57 +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
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 c80245af91 OpenGL graphics fixes 2022-08-27 19:37:28 +02:00
Henrik Rydgård 8d1157e107 GL bugfix, log cleanup 2022-08-27 14:40:42 +02:00
Henrik Rydgård 880ea48e2d Implement the stencil/alpha reverse trick for all backends 2022-08-27 10:25:18 +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 131098c4d4 Some enum renaming, move RasterChannel to GPU.h. 2022-08-09 19:58:48 +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 73fc9fb520 OpenGL fix 2022-08-01 11:57:22 +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
Henrik Rydgård 4c9b5ada0f Address feedback 2021-07-09 21:09:44 +02:00
Henrik Rydgård df6abe83a3 Support depth clamping in OpenGL where available.
Should make support for depth texturing quite easy.

Unfortunately, this extension does not exist on OpenGL ES. There we'll
have to use ugly tricks with gl_FragDepth if we want this.
2021-07-09 21:09:44 +02:00
Unknown W. Brackets 5119d79082 Build: Remove IOS define. 2021-03-02 21:04:03 -08: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