Commit Graph

531 Commits

Author SHA1 Message Date
Henrik Rydgård 295f5f391e More consistent handling of lack of depth texture support. Small log improvement. 2022-08-20 08:05:53 +02:00
Henrik Rydgård bd3d97b17b Fix bug in framebuffer matching where the wrong format was checked for depth matching. Fixes #15867 2022-08-20 07:59:11 +02:00
Henrik Rydgård 76333f90fe Bias towards the most recently written framebuffer 2022-08-17 23:51:05 +02:00
Henrik Rydgård fde369332b Remove restrictions on VRAM addresses for depth and color 2022-08-17 23:46:38 +02:00
Henrik Rydgård 31773b42ba Always attempt to match both depth and color 2022-08-17 23:35:36 +02:00
Henrik Rydgård b5f0e26c24 Pre-reject DXT formats, Misc 2022-08-17 23:31:36 +02:00
Henrik Rydgård 705b34d868 Show seqCount in candidate list 2022-08-17 23:25:07 +02:00
Henrik Rydgård 8251932ae3 Stride fix in matching 2022-08-17 22:58:26 +02:00
Henrik Rydgård 7f169436c0 Framebuffer matching simplification 2022-08-17 22:47:17 +02:00
Henrik Rydgård 131098c4d4 Some enum renaming, move RasterChannel to GPU.h. 2022-08-09 19:58:48 +02:00
Henrik Rydgård 1913930541 Careful with mipmaps on old OpenGL ES. Lost this check in the refactor, made it clearer than before at least.
Fixes Burnout rendering issue mentioned in #15818
2022-08-09 17:26:39 +02:00
Henrik Rydgård 852c395fb7 Texcoord attrs must be called a_texcoord0, this should be fixed. Oh well.
Also small fix for depth in float-depal.
2022-08-09 16:07:02 +02:00
Unknown W. Brackets e589b4506b GLES: Correct alpha check for depal framebuffers. 2022-08-07 07:43:10 -07:00
Henrik Rydgård 6f1f482432 Make GLQueueRunner/RenderManager aware of device caps, use it to check for NPOT and some other stuff 2022-08-07 11:15:23 +02:00
Henrik Rydgård 5987c355d3 D3D9: Fix a lot of stuff 2022-08-06 18:27:04 +02:00
Henrik Rydgård ded8ba8806 More cleanup, fixes. 2022-08-06 18:27:04 +02:00
Henrik Rydgård 92a3d45340 Lock out shaderDepal from D3D for now, will implement later. 2022-08-06 18:27:03 +02:00
Henrik Rydgård 81c36578ca Feature detection fixes 2022-08-06 18:27:03 +02:00
Henrik Rydgård 4e3c258140 Delete all the duplicate implementations of ApplyTextureFramebuffer 2022-08-06 18:27:03 +02:00
Henrik Rydgård 45def772ee Move the depal cache instance ownership to TextureCacheCommon 2022-08-06 18:27:03 +02:00
Henrik Rydgård ab560d9224 Move more stuff to Common 2022-08-06 18:27:03 +02:00
Henrik Rydgård fafe727870 Fix corrupted colors when using software upscaling with OpenGL.
Fixes #15779
2022-08-06 18:04:45 +02:00
Henrik Rydgård fce792458b Avoid upscaling textures used for color-to-depth.
(Not a perfect method, it could theoretically have been upscaled in a
normal render pass...)
2022-08-01 14:10:51 +02:00
Henrik Rydgård f73995b5db Disable texture filtering when drawing color into depth 2022-08-01 14:08:16 +02:00
Henrik Rydgård 3331654396 Fix Macross glitches. 2022-08-01 00:19:47 +02:00
Henrik Rydgård 46d6b43618 Support 3D textures in OpenGL ES, add feature check 2022-07-31 10:43:48 +02:00
Henrik Rydgård 0262fbc70a Implement 3D textures for D3D11 2022-07-31 10:43:48 +02:00
Henrik Rydgård 176b460d76 Quick attempt at fixing the Macross glitch 2022-07-31 10:43:48 +02:00
Henrik Rydgård 2cb9e09ad3 Implement new discovery of a larger CLUT than we thought, plus non-shared CLUTs for 8-bit indices.
Not sure yet what limitations apply, regarding using it for even more
16-bit colors, etc...
2022-07-31 10:43:48 +02:00
Henrik Rydgård f061eadc04 Initial implementation of 3D texturing through equal-size mips (see #6357)
Vulkan-only currently, though all the other backends except ES 2.0
without GL_OES_texture_3d can support it with some work.
2022-07-31 10:43:47 +02:00
Henrik Rydgård 6a5a232777 Unify the GLES LoadTextureLevel with the D3D ones. 2022-07-30 19:07:21 +02:00
Henrik Rydgård c6d7423368 Prepare to convert the GLES functions too 2022-07-30 18:37:48 +02:00
Henrik Rydgård dea979433c Share LoadTextureLevel between the two D3D backends. 2022-07-30 17:00:34 +02:00
Henrik Rydgård 9ed96921e1 Cleanup 2022-07-30 16:51:29 +02:00
Henrik Rydgård 063cd18254 Simplify CPU upscaling code
Use the existing expandTo32bit mode in the texture decoder instead of
the backend-specific switches and stuff.

Just gets rid of a bunch of redundant code and makes further changes
easier.
2022-07-30 15:06:25 +02:00
Henrik Rydgård 9f1fdc6c02 Use PrepareBuildTexture from the Vulkan backend too 2022-07-30 10:45:03 +02:00
Henrik Rydgård d0d53091a8 Change from maxLevel to levelsToLoad, for better readability. Cleanup. 2022-07-30 10:45:02 +02:00
Henrik Rydgård 1e9d85cda1 Define texture loading plan semantics better, pre-port some from Vulkan 2022-07-30 10:44:28 +02:00
Henrik Rydgård 6220068fb1 Update PrepareBuildTexture 2022-07-30 10:44:28 +02:00
Henrik Rydgård 043989ca8a Use PrepareBuildTexture from D3D11 backend 2022-07-30 10:44:27 +02:00
Henrik Rydgård 167b837ed3 Break out the preparation part of BuildTexture from GLES 2022-07-30 10:44:27 +02:00
Henrik Rydgård 4165e146e6 Remove unused parameters to some conversion functions 2022-07-30 08:52:24 +02:00
Henrik Rydgård 6f484d0aee Remove unused useBGRA parameter 2022-07-30 08:52:24 +02:00
Unknown W. Brackets acc248164f Replacement: Clear cache on disable.
When lazy loading, let's clear cached replacement data on disable.
This is purges memory immediately, and also allows force-reloading
textures by toggling the setting.
2022-07-27 20:27:56 -07:00
Henrik Rydgård 04a85b1da0 Allows "merging" render targets that overlap on the Y access. Fixes #7295 (Juiced 2)
To be safe, gating this behind the related AllowLargeFBTextureOffsets,
which is also required for the effect to work.

Additionally, fixes the offset check for X offsets, which I guess is a
very small risk.
2022-07-24 11:58:07 +02:00
Henrik Rydgård 15f5ed81a7 Add a simple compat flag to workaround the Clone Wars issue, #12949
Could probably also be fixed by changing the heuristic a bit, but since
we're in heuristic land anyway and close to a release, I feel this is
the safest option.

Also sneaks in a logspam reduction
2022-07-15 11:44:51 +02:00
Henrik Rydgård 5868cf0f1c Convert the blueToAlpha bool to a usageFlag. KEEP instead of CLEAR for depth during reinterpret. 2022-04-30 18:17:29 +02:00
Henrik Rydgård 462972f7ea Add option to redirect blue to alpha if 565 mode is rendered and mask is 0x0FFFFF.
This is used by several games to render to the alpha channel of RGBA4444
images, which cannot normally be done directly on the PSP.

Can be used as a far more efficient replacement for
ReinterpretFramebuffers/ShaderColorBitmask
2022-04-30 18:17:16 +02:00
Unknown W. Brackets 8779421a3e GLES: Reverse alphamask when comparing to CLUT.
The CLUT is already reversed.
2022-04-25 08:54:02 -07:00
Henrik Rydgård 35e7affa3e Simplify alphasum checking for DXT textures, and fix a regression
Got some weird blackness in the sky in Gran Turismo. This fixes that.
2022-04-25 00:54:47 +02:00