mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
graphics: preserve raw D16 uint texture reads
This commit is contained in:
+15
-1
@@ -683,9 +683,23 @@ ImageId TextureCache::ResolveDepthOverlap(const ImageInfo& requested, BindingTyp
|
||||
}
|
||||
const bool stencil_match = requested.HasStencil() == cached.info.HasStencil();
|
||||
const bool bpp_match = requested.bytes_per_block == cached.info.bytes_per_block;
|
||||
// PPSA04264
|
||||
const bool raw_d16_texture =
|
||||
binding == BindingType::Texture && cached.info.IsDepth() &&
|
||||
cached.info.guest_format == Prospero::BufferFormat::k16UNorm &&
|
||||
requested.guest_format == Prospero::BufferFormat::k16UInt &&
|
||||
requested.pixel_format == vk::Format::eR16Uint && cached.backing.samples == 1 &&
|
||||
requested.samples == 1 && requested.data == cached.info.data &&
|
||||
requested.extent == cached.info.extent && requested.resources == cached.info.resources &&
|
||||
requested.type == cached.info.type && requested.pitch == cached.info.pitch &&
|
||||
requested.tile_mode == cached.info.tile_mode && !requested.HasStencil() &&
|
||||
!cached.info.HasStencil() && !requested.HasMetadata() && !cached.info.HasMetadata();
|
||||
bool recreate = cached.info.resources < requested.resources;
|
||||
switch (binding) {
|
||||
case BindingType::Texture: recreate |= requested.IsDepth() && !cached.info.IsDepth(); break;
|
||||
case BindingType::Texture:
|
||||
recreate |= requested.IsDepth() && !cached.info.IsDepth();
|
||||
recreate |= raw_d16_texture;
|
||||
break;
|
||||
case BindingType::Storage: recreate |= cached.info.IsDepth(); break;
|
||||
case BindingType::RenderTarget: recreate |= cached.info.IsDepth(); break;
|
||||
case BindingType::DepthTarget:
|
||||
|
||||
Reference in New Issue
Block a user