mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02:00
graphics: create depth images for comparison textures
This commit is contained in:
+3
-2
@@ -939,7 +939,7 @@ void TextureCache::UploadImage(Image& image, const ImageDesc& desc, Buffer& sour
|
||||
image.Upload(copies, linear.buffer, linear.offset, linear.size);
|
||||
};
|
||||
|
||||
if (desc.type != BindingType::DepthTarget) {
|
||||
if (!info.IsDepth()) {
|
||||
auto plan = BuildColorTransfer(image, desc.type, TransferDirection::Upload);
|
||||
if (!plan.valid) {
|
||||
EXIT("TextureCache: invalid color upload: binding=%u addr=0x%016" PRIx64
|
||||
@@ -963,7 +963,8 @@ void TextureCache::UploadImage(Image& image, const ImageDesc& desc, Buffer& sour
|
||||
return;
|
||||
}
|
||||
|
||||
if (desc.type != BindingType::DepthTarget || info.samples != 1 || image.backing.samples != 1 ||
|
||||
if ((desc.type != BindingType::Texture && desc.type != BindingType::DepthTarget) ||
|
||||
info.samples != 1 || image.backing.samples != 1 ||
|
||||
info.resources.layers == 0 || info.data.size % info.resources.layers != 0 ||
|
||||
Prospero::NumBytesPerElement(info.guest_format) != info.bytes_per_block) {
|
||||
EXIT("TextureCache: invalid depth upload\n");
|
||||
|
||||
Reference in New Issue
Block a user