Reuses the existing compat flag BlockTransferDepth.
I do aim to remove that compat flag in the future, it's probably not
even necessary here, it's just that general depth block transfers were
already gated on it.
Fixes#17878
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.
Fixes#17014
Even if our depth-testing-equal heuristic believes that the game needs
lower depth resolution.
This removes some depth-fighting artifacts (that are present on the real
PSP, but nice to avoid) in Outrun, Split/Second and Cars: Race-o-Rama -
essentially reverting these to the behavior we had before the heuristic.
(The heuristic is good though - it means less compat.ini hacks going in
the other direction).
In the case of Outrun, this relies on two passes that pass exactly the
same vertex coordinates twice resulting in the exact same final
geometry. This is actually guaranteed by the spec if the vertex math is
exactly the same and "invariant" is set on the position output, though
I guess you never know.. Haven't seen any issues at least.
Also sneak in disabling some validation messages from using extra Vulkan
validation layers other than the default.
Copies to a framebuffer instead of RAM.
Confirmed through e-mail that is fixes the performance drop from #16714,
but unknown whether there are any regressions in the rest of the game.
I guess we'll find out.