Commit Graph

113 Commits

Author SHA1 Message Date
Unknown W. Brackets
f6036195d8 GLES: Cleanup stencil upload w/h handling.
In case a buffer has been resized recently, we want to upload just the
detected drawable area, probably.  Before this was inconsistent depending
on the render resolution.
2018-06-17 17:50:38 -07:00
Unknown W. Brackets
2f859425a8 GPU: Use unordered_map for tempFBOs. 2018-06-06 05:56:30 -07:00
Unknown W. Brackets
8d07e6d985 GPU: Prevent temp FBOs from overwriting each other.
Sometimes we'd use two temp FBOs in the same draw (e.g. shader blending +
depal.)  This could cause the same temp FBO to get used for two purposes,
causing weird behavior.
2018-05-06 08:57:44 -07:00
LunaMoo
ffac542f95 Change to int to allow higher supersampling scale. 2018-04-02 13:44:28 +02:00
LunaMoo
199106cad6 Add SSAA flag for post process shaders,
enforces 2x auto resolution, to be used with blurry effects
Also includes a perf. friendly example using simplified gauss filter
2018-04-01 17:00:10 +02:00
aliaspider
23dae72bce prevent reads of uninitialized memory. 2018-03-22 22:25:04 +01:00
Henrik Rydgård
3c93eaf164 GL: Fix clearing alpha on stencil uploads. 2018-02-10 17:18:18 +01:00
Henrik Rydgård
625595c6cc For some reason we use DrawActiveTexture in the GL stencil stuff, don't want to disable stencil unconditionally.. 2018-02-08 16:59:03 +01:00
Henrik Rydgård
86cfc411a4 Remove the confusing "DisableState" across the codebase 2018-02-08 16:27:36 +01:00
Henrik Rydgård
542f9f9ef1 Assorted cleanup 2018-01-27 15:10:17 +01:00
Henrik Rydgård
63b9140ebf Rip out async readbacks from FramebufferManagerGLES. They should be implemented in GLQueueRunner, differently. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
f3282dcfda Delete the gl name cache (might resurrect it on the GLQueueRunner side if needed later). Other cleanup and fixes. 2018-01-27 15:10:17 +01:00
Unknown W. Brackets
ebce6da223 UI: Remove auto-download options.
See previous commit removing actual functionality.
2017-12-25 11:20:26 -08:00
Unknown W. Brackets
025a806ab4 GPU: Remove FBO auto-download hack.
See #6261.  This should be replaced now with block transfer detection,
which is faster and doesn't cause crashes.

Games that previously required this setting should use block transfer
instead.  If that doesn't work, it's a bug.
2017-12-25 11:17:59 -08:00
Unknown W. Brackets
0956fa3ff6 GPU: Reduce depth blits when not updated.
If the game initially clears the depth in a buffer, but then never uses
that depth again, don't keep blitting depth.

Improves #8538, by preventing the depth blits in this case.
2017-12-24 11:52:15 -08:00
Henrik Rydgård
23f7819329 Unify RebindFramebuffer, mostly. 2017-11-15 20:44:25 +01:00
Henrik Rydgård
93e148fed6 Vulkan: Implement post-processing. The Vulkan backend is now "feature-complete", and GL is now legacy :P
Bit hacky but works.
2017-11-12 16:12:26 +01:00
Henrik Rydgård
9e65ae1cef Fix issue in framebuffer size calculation when viewport is bogus in through mode. Fixes #10043. 2017-11-04 11:43:19 +01:00
Henrik Rydgård
85cb604a24 Fix (some) crashes on blits. Validation issues remain. 2017-10-26 10:57:00 +02:00
Henrik Rydgård
d53c88456a Unify GetFramebufferList() (trivial) 2017-10-18 12:49:15 +02:00
Henrik Rydgård
898716cc26 Unify DownloadFramebufferForClut 2017-10-18 12:34:01 +02:00
Henrik Rydgård
981c49615c Unify FlushBeforeCopy. Remove old dummy methods from Vulkan framebuffer manager. 2017-10-18 12:26:02 +02:00
Henrik Rydgård
4e3a9bc3e3 Unify some more framebuffer functions. Leave the GL stuff alone for now due to async. 2017-10-18 11:20:58 +02:00
Henrik Rydgård
f2ea0ce472 Unify (well, almost) GetOutputFramebuffer (D3D11/GL) 2017-10-18 10:54:26 +02:00
Henrik Rydgård
214270d192 Unify GetDepthBuffer/GetStencilBuffer in GL/D3D11 2017-10-18 10:54:26 +02:00
Henrik Rydgård
9b1ee6fce6 Unify GetFramebuffer in GLES and D3D11.
D3D9 is left behind for now, and Vulkan still needs implementation - got a branch with initial work towards that.
2017-10-11 13:39:34 +02:00
LunaMoo
5b75d2af20 Add uniform to make post process aware of videos.
And an example effect ~ subtle AA in-game/heavy smoothing for videos.
2017-09-13 08:13:51 +02:00
Henrik Rydgård
0ac979505c Fixes for D3D11 postprocessing 2017-06-02 17:04:08 +02:00
Unknown W. Brackets
1cc488aef4 SoftGPU: Support Take Screenshot partially.
This doesn't capture the FPS etc. as other backends do, but at least it
takes a screenshot.
2017-06-01 20:40:45 -07:00
Unknown W. Brackets
f1e9180676 Vulkan: Fix Cardboard rendering.
Mostly the Viewport2D flush issue, which may possibly have broken
something else.
2017-05-31 23:26:38 -07:00
Henrik Rydgård
2b14c6b531 Delete obsolete function ClearBuffer 2017-05-31 13:38:22 +02:00
Henrik Rydgård
e8890e3c4a Address a bunch of review comments. 2017-05-30 09:36:17 +02:00
Henrik Rydgård
6bcfe539f7 Use vulkan-style clear-on-bind when switching render targets. Not optimally used yet.
Also removes a bunch of redundant render target binds.
2017-05-30 09:36:17 +02:00
Unknown W. Brackets
fd4399e108 GPU: Centralize fb resize, move to begin of frame.
It makes more sense here, because otherwise when you change it from the UI
settings, it takes a frame to "kick in".
2017-04-24 12:02:52 -07:00
Unknown W. Brackets
c29f70e5e9 GPU: Attempt recreate of FBOs if failed. 2017-04-24 09:41:41 -07:00
Unknown W. Brackets
98ba7afa83 Destroy FBOs only on actual resize.
As a side effect, this means going to settings won't reset all FBOs
anymore.  The behavior can still be obtained by changing render resolution
or rendering mode.

This makes resizing the window faster on Windows, and resumes quicker from
pause.
2017-04-13 23:36:17 -07:00
Henrik Rydgård
a85b76e671 Merge pull request #9585 from unknownbrackets/gpu-clear
Skip VRAM clears when no download has been made
2017-04-10 00:51:01 +02:00
Unknown W. Brackets
70d17d1bc7 Track flags to reduce unnecessary VRAM zeroing.
If we haven't downloaded to RAM since the last zero, no need to zero
again.  This is the most common case.
2017-04-09 15:10:07 -07:00
Unknown W. Brackets
ff14495511 Fix out-of-bounds framebuffer blit on color bind.
This corrects a crash reported in Persona 3 using D3D11.
2017-04-06 18:49:48 -07:00
Unknown W. Brackets
3fbb545451 Allow MakePixelTexture to use a subrange.
For example, if it has a larger texture it wants to reuse, it can control
this via texcoords.  Let's keep it at top left, though.
2017-03-22 20:56:26 -07:00
Henrik Rydgard
a04e24c300 Further D3D11 on mobile fixes 2017-03-05 14:05:04 +01:00
Henrik Rydgard
68ba3070bc D3D11: Add enough debug readback support to support savestate thumbnails 2017-02-18 00:27:32 +01:00
Henrik Rydgard
0e8aeaea3a D3D11: Implement basic framebuffer readback.
Also make debug interfaces more consistent.
2017-02-18 00:07:49 +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
68c5a6c517 Unify CopyDisplayToOutput 2017-02-15 23:24:25 +01:00
Henrik Rydgard
23762ef89f Unify DrawFramebufferToOutput 2017-02-15 23:11:46 +01:00
Henrik Rydgard
26f208a212 Unify "DrawPixels" 2017-02-15 23:06:22 +01:00
Henrik Rydgard
84e6054b23 More work towards unifying CopyDisplayToOutput 2017-02-15 22:48:23 +01:00
Henrik Rydgard
cba37e54d0 Preparations for unifying CopyDisplayToOutput 2017-02-15 22:47:50 +01:00
Henrik Rydgard
7652bc2d8b Declare DrawActiveTexture in FramebufferCommon 2017-02-15 22:47:49 +01:00