Commit graph

328 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
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
ded8ba8806 More cleanup, fixes. 2022-08-06 18:27:04 +02:00
Henrik Rydgård
4e3c258140 Delete all the duplicate implementations of ApplyTextureFramebuffer 2022-08-06 18:27:03 +02:00
Henrik Rydgård
b5597d1013 Remove Vulkan2D 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
87b128ecaf Compiles on Vulkan, but doesn't yet work. 2022-08-06 18:27:03 +02:00
Henrik Rydgård
e345a6ba3c Works with D3D11, except the depth texturing case 2022-08-06 18:27:03 +02:00
Henrik Rydgård
2fa9b0d0c7 Simplify 2022-08-06 18:27:03 +02:00
Henrik Rydgård
d5a0249678 Fix upscaling in Vulkan. Fixes #15779 2022-08-03 22:22:24 +02:00
Henrik Rydgård
9437d5e3b0 Fix small breakage in Vulkan texture decoder 2022-08-01 11:29:25 +02:00
Henrik Rydgård
99b4e7c54c Vulkan: Don't try to auto-mipmap 3D textures in max quality filter mode 2022-08-01 00:16:57 +02:00
Henrik Rydgård
0262fbc70a Implement 3D textures for D3D11 2022-07-31 10:43:48 +02:00
Henrik Rydgård
e455d6bcfe Some safety checks to avoid bad combinations, probably not really needed in practice. 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
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
Unknown W. Brackets
795b1c04a9 GPU: Small scaling variable cleanup. 2022-07-30 18:18:51 -07:00
Henrik Rydgård
6a5a232777 Unify the GLES LoadTextureLevel with the D3D ones. 2022-07-30 19:07:21 +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
b9b3310c21 Remove some indentation 2022-07-30 10:45:03 +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
eb6d364a2d Vulkan: One step closer to using PrepareBuildTexture 2022-07-30 10:44:28 +02:00
Henrik Rydgård
c031f3085b Additional cleanup 2022-07-30 10:44:26 +02:00
Henrik Rydgård
679a861204 Make the BuildTexture of DX9 and D3D11 backends more similar 2022-07-30 10:44:01 +02:00
Henrik Rydgård
da9f03e356 Remove indentation, useless code 2022-07-30 10:42:16 +02:00
Henrik Rydgård
f728faffdc Remove fake-mipmap logic from LoadTextureLevel 2022-07-30 10:38:17 +02:00
Henrik Rydgård
8b398bbbb7 Minor code simplification 2022-07-30 10:32:50 +02:00
Henrik Rydgård
6f484d0aee Remove unused useBGRA parameter 2022-07-30 08:52:24 +02:00
Henrik Rydgård
c41b780c8c Remove the ReplacedTextureFormat enum 2022-07-30 08:52:24 +02:00
Henrik Rydgård
ef4a6cf873 Remove support for 16-bit replacement texture formats 2022-07-30 08:52:24 +02:00
Unknown W. Brackets
42d7226413 Vulkan: Correct size for tex mip level readback.
Used by the GE debugger to display the texture levels.
2022-05-01 15:23:57 -07:00
Henrik Rydgård
d30024cc88 Vulkan: Follow sampler best practices with auto max quality. 2022-05-01 10:20:11 +02:00
Henrik Rydgård
ed7dfdc8ad Fix mip level bug in Vulkan texture cache. 2022-04-23 22:51:11 +02:00
Henrik Rydgård
c52a5e9e25 Fix checks for the "fake mipmap" situation.
Fixes #15492
2022-04-22 22:59:20 +02:00
Unknown W. Brackets
34d0acac4e Vulkan: Save textures using a memory copy. 2022-04-17 20:55:39 -07:00
Unknown W. Brackets
39d6dc1740 Vulkan: Allow saving const tex levels.
This might be used for fonts, for example.  They could be replaced, so no
reason not to export.
2022-04-17 20:06:03 -07:00
Henrik Rydgård
dffc1a9196 Add the slow comment to one more place 2022-04-18 00:40:49 +02:00
Henrik Rydgård
c4dfbf4f1a Delete a lot of specialized alpha checking code.
This was now only used to check alpha in CLUTs, and the generic functions will not actually be any slower.
2022-04-15 12:34:50 +02:00
Henrik Rydgård
a5ee1884c1 Address feedback 2022-04-15 01:08:14 +02:00
Henrik Rydgård
3bf9ea8de6 Debug log (remove before merge) 2022-04-15 00:56:25 +02:00
Henrik Rydgård
42cd937de2 Simplification and some cleanup 2022-04-15 00:56:25 +02:00
Henrik Rydgård
9f7e0978a9 AND together colors while decoding, and then check against fullAlphaMask. 2022-04-15 00:56:25 +02:00
Henrik Rydgård
a68ddd0a8d Merge separate NEON functions into the normal functions.
We no longer support non-NEON ARM.

It's nice also to have the NEON and SSE implementations "close" to each
other, easier to port optimizations back and forth etc.
2022-04-12 23:43:21 +02:00
Henrik Rydgård
7cab540fca Short circuit the texture replacement code 2022-03-08 19:56:06 +01:00
Unknown W. Brackets
8418287a87 Vulkan: Avoid crash on double DeviceLost.
This caused Android to crash when switching to OpenGL, because the
destructor would try to deinit again.  There weren't any objects, but
draw_ was no longer valid.
2022-02-06 23:34:44 -08:00
Henrik Rydgård
748b8287a6 Add format string support to Vulkan log-profiler 2021-12-19 22:21:34 +01:00
Henrik Rydgård
80ae4b039c Vulkan: Be more restrictive about texture upscaling on "slow" devices.
Applies the same rules as for software upscaling in this case.

Should fix the stutters seen in #15109
2021-12-16 21:00:49 +01:00