Commit Graph

95 Commits

Author SHA1 Message Date
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. Brackets 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. Brackets 2740f74cc4 GLES: Add TODO note for shader blend texture. 2018-01-27 15:10:17 +01:00
Unknown W. Brackets 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
Henrik Rydgard e83dd2b524 Minor cleanup, elimintate some bind ordering hazards that D3D11 warns about 2017-02-17 14:31:02 +01:00
Henrik Rydgard 08d173ceee Unify ApplyShaderBlending 2017-02-17 12:21:27 +01:00
Henrik Rydgard 9359922201 GL: Fix inconsistency with BindFramebufferColor 2017-02-17 12:13:53 +01:00
Henrik Rydgard f1c96c056d Move all the GL/D3D9 FBO code into thin3d. 2017-02-06 11:40:16 +01:00
Henrik Rydgard e4cb44c243 Merge the texture flags into the dirty flags 2017-01-24 18:12:20 +01:00
Henrik Rydgard c289a2c7bf Split TextureChanged into two bools, so we can later convert to dirtyflags 2017-01-24 18:12:20 +01:00
Henrik Rydgard b423998c36 Move uniform dirty-flag to gstate_c, opening up for other uses. 2017-01-24 18:12:20 +01:00
Henrik Rydgard d9acd27126 Rename GLES files to match the convention the other backends use. 2017-01-23 17:08:58 +01:00