Should fix the flicker in Castlevania.
Fixes#17517
The heuristic worked for Rainbow Six but broke Castlevania, so I'd rather
use a compat flag instead of breaking a different game until we can find a
more reliable heuristic for Rainbow Six.
For correct lookups, without our texture replacement actually supporting
volume textures, we need to use this mechanism here too.
The game actually uses two mipmaps, but they're identical and point to
the same memory, so we treat them as a regular 2D texture instead for
purposes of both texturing and replacement. This is presumably legacy
from the initial Japanese version that needs to use multiple texture
layers. Similarly it does in in pairs.
This does actually not fully fix texture replacement for the Japanese
version, unfortunately. For that we need more proper support for these
weird textures in the texture replacement code - when I refactored it
before for more natural handling of regular mipmapping, this kinda got
lost.
Might be helpful to diagnose performance problems on user devices.
Additionally, moves the texture replacement controls to the top. They
should probably be moved somewhere else entirely...
See #17918
This gets clang to vectorize on RISC-V V, although it looks suboptimal
(probably faster than not using vector, though.) Also improves other
platforms, but our specializations seem better.
This fixes an issue when you create two sections consecutively and
retain pointers to them, and then modify them, such as happens in the
postshader ini initialization. Previously, one of the section pointers
could get invalidated since the section vector got resized. Now, the
pointed-to sections don't move around in memory, only the list of them
does.
This isn't a huge performance boost for the games that use BBOX (like
Tekken), but it'll be more valuable if we start using soft culling more
widely automatically, see #17808
Accidentally disabled this in #17575
Helps #17797 but only on OpenGL on mobile. There's more to improve
there.
caps_.framebufferFetchSupported is now always set to false in Vulkan.
Fixes#17745 (crash when loading certain texture packs in D3D11)
This is an old unfortunate limitation. Only applies to the top mip
level, which makes it obvious that it's kinda unnecessary for the
hardware and indeed, Vulkan and OpenGL don't have this limitation.