Commit graph

48 commits

Author SHA1 Message Date
Unknown W. Brackets
4ef4325fdb GPU: Avoid unnecessary clear on stencil upload.
In this common case, we've typically just bound the buffer to upload a
texture to it.  No need to start a new render pass.

This dodges #12927 but doesn't really fix the underlying issue.
2020-05-18 21:36:06 -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
271389b8e5 GLES: Fix stencil buffer upload at > 1x PSP.
Also fixes crashes on ATI.  See #6627.
2019-03-10 08:36:12 -07:00
Unknown W. Brackets
01809f809f GLES: Correct fragment precision check.
Was breaking on Mali-4xx for example, because not defined.
2018-12-23 20:16:59 -08:00
Henrik Rydgård
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
a73c569bf6 Add check for GL_FRAGMENT_PRECISION_HIGH for GLES in stencil code. 2018-12-18 14:30:05 +01:00
Henrik Rydgård
de4dec2a80 Use raw strings for more shaders 2018-12-18 10:37:45 +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
Henrik Rydgård
b17fc67c45 Get rid of MaskedEqual 2018-11-12 08:19:19 +01:00
Henrik Rydgård
42f4d7b40f OpenGL: Fix bug where we could end up calling glUniformMatrix without a bound program. Found by GL debug callback on NV.
This adds a bit of extra checking that's only enabled in _DEBUG builds.
2018-07-28 11:09:01 +02: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
9f4cd3fcdb GLES: Add missing semantics for stencil upload.
Makes #10634 work for GLES properly.
2018-06-17 17:50:38 -07:00
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
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
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
5351c9ddb3 gl-render-manager: Support scissored clears, as used by the GL backend. Fixes GT. 2018-01-31 17:07:20 +01:00
Unknown W. Brackets
638cbf725b GLES: Skip blend reset after stencil upload.
We dirty the flag anyway.  Avoid extra calls.
2018-01-27 15:10:17 +01:00
Unknown W. Brackets
acb692677b GLES: Accept a color mask for clears.
Otherwise, we end up clearing RGB when we try to only clear alpha, which
is fairly common.

Makes Valkyria Chronicles 3 action mode visible again.
2018-01-27 15:10:17 +01:00
Unknown W. Brackets
22bf124631 GLES: Document stencil clearing bug. 2018-01-27 15:10:17 +01:00
Unknown W. Brackets
790e3121d2 GLES: Move stencil upload state into render pass.
Without this, stencil upload simply failed silently.  Fixes Star Ocean
stencil issues.
2018-01-27 15:10:17 +01:00
Unknown W. Brackets
a135035850 GLES: Ensure stencil upload clear in render pass.
Fixes crashes in Star Ocean.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
58854adb80 StencilBufferGLES: Move SetNoBlendAndMask to the right places. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
a642c1a990 Fix goof with the stencil buffer drawing 2018-01-27 15:10:17 +01:00
Henrik Rydgård
b7f4f6e157 GL render manager: Improve shader error reporting. 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
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
Henrik Rydgård
d565e23f4c Stencil copy: Avoid clearing the depth buffer. 2017-12-31 01:06:31 +01:00
Henrik Rydgård
b5e5d72a0a Complete the separation of depth and stencil renderpass flags 2017-12-30 22:52:22 +01:00
Henrik Rydgård
5018e400f2 Remove some code duplication 2017-11-01 14:51:15 +01:00
Unknown W. Brackets
e754cca288 GLES: Add OpenGL 3.x core profile support.
Need to define #version everywhere and avoid varying/etc.
2017-09-20 12:22:01 -07:00
Unknown W. Brackets
f1cf92988f Dirty things on stencil buffer upload. 2017-08-14 11:36:06 +02: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
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
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
Unknown W. Brackets
78191e645d GL: Avoid unnecessary stencil shader binding.
The comment became untrue, so no need to rebind for each bit.
2017-03-18 13:47:49 -07:00
Henrik Rydgard
26f208a212 Unify "DrawPixels" 2017-02-15 23:06:22 +01:00
Henrik Rydgard
0fb1e95bac Remove GLSL program argument to DrawActiveTexture - bind before instead. 2017-02-15 22:47:44 +01:00
Henrik Rydgard
5b181e8244 Further work on DrawActiveTexture 2017-02-07 00:13:54 +01:00
Henrik Rydgard
275f9248a1 Preparing to unify the DrawActiveTexture API 2017-02-07 00:08:45 +01:00
Henrik Rydgard
a0992cce75 Unify DestroyFramebuf() 2017-02-07 00:08:45 +01:00
Henrik Rydgard
e42f5e6f46 Rename the fbo_ functions to match the rest of DrawContext. 2017-02-06 11:40:16 +01:00
Henrik Rydgard
f1c96c056d Move all the GL/D3D9 FBO code into thin3d. 2017-02-06 11:40:16 +01:00
Henrik Rydgard
8f00dd3f30 Hide glBlitFramebuffer behind fbo_blit 2017-02-04 22:25:34 +01:00
Henrik Rydgard
d9acd27126 Rename GLES files to match the convention the other backends use. 2017-01-23 17:08:58 +01:00
Renamed from GPU/GLES/StencilBuffer.cpp (Browse further)