58 Commits
Author SHA1 Message Date
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
Henrik Rydgård 2b12776137 Remove viewport flipping where it's not needed 2018-01-27 15:10:17 +01:00
Henrik Rydgård f99fa02ba7 Run the depal stuff, seems a bit broken. Add some state filtering. 2018-01-27 15:10:17 +01:00
Henrik Rydgård 7e3e652963 Fix more gl-render-manager problems 2018-01-27 15:10:17 +01:00
Henrik Rydgård 51f467a7b3 Kill off the GL state cache 2018-01-27 15:10:17 +01:00
Henrik Rydgård 376d92fcc9 Start messing with the draw engine... 2018-01-27 15:10:17 +01:00
Henrik Rydgård 9340260802 Finish the shader manager (almost) 2018-01-27 15:10:17 +01:00
Henrik Rydgård b75c8b72c6 Fix another little inconsistency (two uniforms were merged for bad reasons) 2017-12-07 21:39:09 +01:00
Henrik Rydgard 1098bf7342 All: Only convert viewportscissor state if dirty 2017-08-14 11:14:26 +02:00
Henrik Rydgard e439055a32 All: Only convert raster state if dirty 2017-08-14 11:14:26 +02:00
Henrik Rydgard e2b179d6e2 All: Only convert depth stencil state if dirty 2017-08-14 11:14:26 +02:00
Henrik Rydgard e4567c694c All: Only convert blend state if "dirty" 2017-08-14 11:14:26 +02:00
Henrik Rydgård 6669fd0879 Buildfix 2017-05-26 16:42:38 +02:00
Henrik Rydgård 1d96ead852 Remove "Always Depth Write" setting. One step forward for #8171 2017-05-26 10:23:45 +02:00
Henrik Rydgård 5a8e9c4f71 Port some accessors over from #9255 to be able to catch these changes and dirty state later. 2017-04-03 17:04:58 +02:00
Henrik Rydgård 73d762f506 Reorganize raster state mapping 2017-04-03 16:37:11 +02:00
Henrik Rydgard cffb1d7014 Reorganize depth-stencil 2017-04-03 16:37:11 +02:00
Henrik Rydgard d581a96d79 All backends: Reorganize blend state mapping to make dirty-tracking easier 2017-04-03 16:37:08 +02:00
Henrik Rydgard 5d4700ae7e Sprinkle calls to CHECK_GL_ERROR_IF_DEBUG all over the place, disabled by default. 2017-03-03 14:18:40 +01:00
Henrik Rydgard fc1a1a810f Fix oversight that could cause crashes with shader blending in GL 2017-02-18 11:10:47 +01:00