Commit Graph
160 Commits
Author SHA1 Message Date
Henrik Rydgård d6d72db0a9 Unify BlitFramebufferDepth. 2020-09-17 20:53:02 +02:00
Henrik Rydgård d0f7b1e30f Make the implementations of CopyFramebufferDepth more similar.
Also avoid matching framebuffers with bad z for copies.
2020-09-17 20:52:45 +02:00
Henrik Rydgård 181ddd842a Unify some GPU_SUPPORT* bits 2020-09-17 20:52:32 +02:00
Henrik Rydgård 1b3413945b Some header include cleanup 2020-09-16 09:20:41 +02:00
Henrik Rydgård d57edfbdac Rename FramebufferCommon.cpp/h to FramebufferManagerCommon.cpp/h for consistency 2020-08-03 23:17:22 +02:00
Henrik Rydgård c5e0b799d9 Remove category from _assert_msg_ functions. We don't filter these by category anyway.
Fixes the inconsistency where we _assert_ didn't take a category but
_assert_msg_ did.
2020-07-19 20:33:25 +02:00
Unknown W. Brackets 9ef521d945 GPU: Avoid immediate postshader FBO recreate.
Before, we created things at the wrong size, then recreated at the right.
Now we just start at the correct size once.
2020-06-12 12:35:35 -07:00
Henrik Rydgård fabe987c8f Add a name tag for all render steps (GL/Vulkan). Helps with debugging and should be cheap enough (a single pointer per "step"). 2020-05-21 11:24:05 +02:00
Unknown W. Brackets a36239473d GLES: Add dependency tracking for render passes.
Let's try to invalidate when it's possible.  We move the invalidate to the
end of the render when detected.
2020-05-17 11:06:39 -07:00
Unknown W. Brackets 32a7e7345e GPU: Centralize framebuffer download.
And try not to use a potentially-null nvfb.  Primarily this can happen on
Direct3D backends.
2020-05-17 10:59:33 -07:00
Unknown W. Brackets 22e46b51c2 GPU: Centralize DestroyAllFBOs().
This cleans up the postshader update code.
2020-05-13 18:15:04 -07:00
Unknown W. Brackets 2faab0e082 GPU: Use postshader for direct VRAM draws again.
Also centralize the pixel texture code while at it.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets 762b656ea2 GPU: Use a texture directly for MakePixelTexture.
This makes it easier to do things with it.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets fa6544b737 GPU: Cleanup leftover postshader stuff. 2020-05-13 18:10:09 -07:00
Unknown W. Brackets cb94487a16 GPU: Move post shader handling to new class.
Currently, Vulkan is not working properly and direct (RAM -> output) is
not hooked up.  But in general, it works.
2020-05-13 18:10:06 -07:00
Unknown W. Brackets d39b0bdca2 GPU: Split FramebufferCommon into two classes.
Only some things moved over so far.

FramebufferCommon does too much, we want to share it with softgpu without
all the buffer management stuff.
2020-05-13 18:07:22 -07:00
Henrik Rydgård 8c2e318416 OpenGL dataformat cleanup - pass Draw::DataFormat to the GLRenderManager.
Avoids triple GLenum all over the place, and also clearly shows that the
mapping is wrong.
2019-10-24 22:41:41 +02:00
Henrik Rydgård 9e7625c74b Workaround for a crash found in #12358 on older devices 2019-09-28 01:11:06 +02:00
Henrik Rydgard 5aed2a2cee Gate fewer effects behind "Disable slow framebuffer effects". 2019-02-08 15:02:31 +01:00
Henrik RydgårdandGitHub 683a4e0fb2 Merge pull request #11676 from unknownbrackets/gles-depth
WIP - GLES: Download depth values via shader
2018-12-19 09:58:38 +01:00
Henrik Rydgård a2cc2b39ca Additional raw string shaders 2018-12-18 10:42:29 +01:00
Unknown W. Brackets 27e8720e14 GLES: Download depth values via shader.
Working on desktop, but not on mobile...
2018-12-16 17:34:16 -08:00
Unknown W. Brackets e49568f67d GLES: Move depth packing code to dedicated file. 2018-12-16 17:34:16 -08:00
Unknown W. Brackets 87085d18f0 GLES: Fix render-to-self detection.
Was broken by the recent fb_address changes, so match Vulkan and D3D11
for consistency.
2018-11-22 09:26:12 -08:00
Unknown W. Brackets 16d7a80980 GPU: Clear alpha more consistently from 565.
Before, the backends all did different things.  Now they are more in sync,
but Vulkan still behaves slightly differently.

Fixes #11326.
2018-08-30 21:00:21 -07:00
Unknown W. Brackets b4496f1975 Core: Move config enums to separate file.
These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
2018-06-23 10:59:18 -07:00
Unknown W. Brackets 03edd6129a GLES: Cut down on use of USING_GLES2. 2018-06-17 20:51:34 -07:00
Unknown W. Brackets 4f93b1d136 GLES: Removed unused skip copy code.
Now it was just making the buffer larger for no reason.  Before, it
allowed us to skip the convBuf copy.
2018-06-06 05:56:30 -07:00
Unknown W. Brackets 8f354e5312 GPU: Minor framebuffer code cleanup. 2018-06-06 05:56:30 -07:00
Unknown W. Brackets 7c8780bfb6 GPU: Remove some unused code. 2018-06-06 05:56:29 -07:00
Henrik Rydgård c1d113e0e9 When creating temp framebuffers for download, size them using bufferWidth/Height instead of width/height.
Or maybe we should make sure to only download within the width/height by
adding more clamps at the beginning of ReadFramebufferToMemory but seems
more dangerous.

Plus some minor things.

Should help #11113
2018-06-01 21:16:07 +02: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
Henrik Rydgård 117dad8a48 Just add some constants for the GL texture slots. 2018-04-13 09:11:08 +02:00
Unknown W. Brackets c6ef547176 GLES: Show post-shader compile errors to user. 2018-04-01 19:47:19 -07:00
Unknown W. Brackets db756b6aeb GLES: Show post-shader translate errors to user.
Usually these should be syntax errors, so better to let them know it
happened.
2018-04-01 19:47:02 -07:00
Henrik Rydgård 99af1d58ad OpenGL task switching fix 2018-03-17 13:45:12 +01:00
Henrik Rydgård 88e8229159 GL: Need to recompile postshaders on Resized() (which is a bit of a misnomer) 2018-02-12 14:01:52 +01:00
Unknown W. Brackets 0474ff5c23 GLES: Use aligned memory for textures.
We use SSE on them, and they used to be aligned, and must be aligned in
PSP RAM, so keep them aligned.

This only really affects 32-bit, since allocs will typically be aligned on
64-bit anyway.

Fixes #10601.
2018-02-11 08:13:57 -08: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 b9081dd624 GL: Set a plain render state in DrawActiveTexture, without relying on the caller having called DisableState 2018-02-08 16:21:34 +01:00
Henrik Rydgård b9b41f52c5 Add a simple spinner to the game load screen to not look frozen. 2018-02-08 12:03:29 +01: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 982a1710ae gl-render-manager: Fix postprocessing shaders. Fixes #10566. Live switching is broken though for some reason. 2018-01-31 17:23:24 +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
Unknown W. BracketsandHenrik Rydgård f6260c75c9 GLES: Reset blend state on clear.
Because now that resets blending parameters.
2018-01-27 15:10:17 +01:00
Unknown W. BracketsandHenrik Rydgård 4f1b8d80a9 GLES: Bind texture on MakePixelTexture().
This is currently necessary because callers expect it.  Also, move inside
render passes.
2018-01-27 15:10:17 +01:00
Henrik Rydgård af6431986d OpenGL: Now run GL on a secondary thread. Sync issues remain. 2018-01-27 15:10:17 +01:00
Henrik Rydgård d0038775e5 TODOs and indentations 2018-01-27 15:10:17 +01:00