mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 00:12:40 +00:00
graphics: create depth images for comparison textures
This commit is contained in:
1 parent
d762d24f73
commit
0ce19357f6
3 files changed
+130
-5
No files matched your search
+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