72 Commits

Author SHA1 Message Date
Herman Semenoff 400d136f51 GPU: modernize use C++17 constexpr for precalculate compilation 2026-05-19 21:57:45 +03:00
Henrik Rydgård df6ed8cfc9 Do some cleanup of #includes in GPU 2024-12-18 13:57:26 +01:00
Henrik Rydgård 111d0c872d Global rename of FBChannel to Aspect, also make it a class enum 2024-12-15 22:24:05 +01:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård e3177ac870 Make some global string pointers const, not just the strings.
Minor cleanup.
2023-12-29 14:09:45 +01:00
Unknown W. Brackets 92a18eed01 GPU: Discard framebuffer copy when clearing.
This avoids retaining the framebuffer copy any longer than the current
framebuffer target.
2023-03-01 22:11:20 -08:00
Henrik Rydgård 49e5460c9c Remove count parameter from SetViewports. No use foreseen. 2023-02-25 07:12:53 +01:00
Henrik Rydgård 937975000b Add a ReadbackMode parameter to more functions in the FramebufferManager 2023-02-05 13:57:45 +01:00
Henrik Rydgård 4427cb4fc3 Add parameter to thin3d::CopyFramebufferToMemory to specify blocking mode. Not yet implemented. 2023-02-04 23:40:36 +01:00
Henrik Rydgård fb8aff5a8c Split out the depth stuff from the file, move to GPU/Common 2023-02-03 21:06:43 +01:00
Unknown W. Brackets e6ea07bc9d GPU: Cleanup remnants of GLES-only stencil upload. 2022-08-06 20:33:34 -07:00
Henrik Rydgård 19931c003f Clean up blit/copy feature detection. Don't need fast GPU flags for these. 2022-08-02 09:53:46 +02:00
Henrik Rydgård f523341351 Remove unnecessary parameters from MakePixelsTexture 2022-07-24 13:54:09 +02:00
Unknown W. Brackets 0dc7688838 GPU: Cleanup some extra pointers in fb managers.
These weren't being used / weren't final anyway.
2021-11-14 14:13:48 -08:00
Unknown W. Brackets 7d00b6ca90 GLES: Enable/disable clip distance 0. 2021-10-12 20:34:42 -07: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
Henrik Rydgård 38684762c8 Fix Star Ocean stencil issue with OpenGL. Fixes #13746 2020-11-11 23:23:31 +01:00
Henrik Rydgård 84037f448e Remove colorDepth property of framebuffers. They're all 8888. 2020-11-05 14:51:46 +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 dcd33a4692 Remove redundant bind on GL texture build. Improve dirtying of texture state. 2020-09-21 08:56:58 +02:00
Henrik Rydgård 181ddd842a Unify some GPU_SUPPORT* bits 2020-09-17 20:52:32 +02:00
Unknown W. Brackets 3055deeba6 GPU: Fix some case warnings.
Better to avoid the warnings.
2020-08-19 21:18:44 -07:00
Henrik Rydgård 737688a22a Annotate calls to RebindFramebuffer with their cause. 2020-06-02 09:51:38 +02: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 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