Commit Graph
77 Commits
Author SHA1 Message Date
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
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 0b1b36921e Move the now-renamed fragment shader generator to GPU/Common. 2020-10-31 19:03:14 +01: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 737688a22a Annotate calls to RebindFramebuffer with their cause. 2020-06-02 09:51:38 +02:00
Henrik Rydgård bebf649705 OpenGL/Vulkan: Rework the contract around dynamic state. Removes some ugly dirtying from the GL render manager. 2020-05-24 20:27:58 +02:00
Unknown W. Brackets ad98609819 GPU: Use consistent buffered rendering state.
The setting can be changed in Qt and Windows between frames, so let's
track the current setting in most places.  This is everywhere fbman is
easily accessible.
2020-04-04 10:51:47 -07:00
Unknown W. Brackets c5b844cc98 GPU: Respect stencil write mask on clear.
Actually identified this for the softgpu in #11319, but applying it for
RGBA is a problem in most renderers.  Forgot to at least apply it to
stencil.

Fixes #11901.
2019-03-16 19:42:18 -07:00
Henrik Rydgard 3f8aec5147 Remove the "Disable stencil test" hack. Doesn't seem to serve much purpose anymore. 2018-12-14 13:54:03 +01:00
Unknown W. Brackets 5932cbabc3 GPU: Avoid stencil emulation if possible.
This reduces use of replaceAlpha, and reduces use of more complicated
blend states.  This simplifies fragment shaders a little.
2018-12-01 14:05:29 -08:00
Henrik Rydgård 117dad8a48 Just add some constants for the GL texture slots. 2018-04-13 09:11:08 +02:00
Henrik Rydgård ce16547854 GL render manager: Fix bug when setting texture sampler if the wrong GL texture slot is active. Will likely help #10583 2018-02-07 19:49:58 +01:00
Henrik Rydgård c21b02a22d gl-render-manager: Use properly scaled scissor rectangle, oops. Fixes higher resolutions. 2018-01-31 19:36:32 +01:00
Unknown W. BracketsandHenrik Rydgård e280cbbc3c GLES: Correct shader blending.
Lunar's spell effects were blending completely wrong, and are a good
example of shader blending.  This fixes them.
2018-01-27 15:10:17 +01:00
Unknown W. BracketsandHenrik Rydgård 2740f74cc4 GLES: Add TODO note for shader blend texture. 2018-01-27 15:10:17 +01:00
Unknown W. BracketsandHenrik Rydgård 38161f3c69 GLES: Use linear for high-res FBO tex copies. 2018-01-27 15:10:17 +01:00
Henrik Rydgård 4c927c1421 Reintroduce check for GE_LOGIC_COPY 2018-01-27 15:10:17 +01:00
Henrik Rydgård e531a7da43 gl-render-manager: Implement logic ops 2018-01-27 15:10:17 +01:00
Henrik Rydgård d0038775e5 TODOs and indentations 2018-01-27 15:10:17 +01:00