From 54172322fedbd18fc512adbd1ede1fb2c3c2a180 Mon Sep 17 00:00:00 2001 From: lynxnb Date: Wed, 14 Sep 2022 11:37:59 +0200 Subject: [PATCH] Fix host synchronization for texture with a different guest format Host synchronization of a guest texture with a different guest format represents a valid use case where the host doesn't support the guest format and conversion to a host-compatible format must be performed. The issue is most evident on Mali GPUs, as they don't support BCn texture formats thus needing manual decoding before submission. It was disabled by mistake in a previous commit, this commit re-enables it. --- app/src/main/cpp/skyline/gpu/texture/texture.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/texture/texture.cpp b/app/src/main/cpp/skyline/gpu/texture/texture.cpp index 3ba08741..cdef42b5 100644 --- a/app/src/main/cpp/skyline/gpu/texture/texture.cpp +++ b/app/src/main/cpp/skyline/gpu/texture/texture.cpp @@ -671,8 +671,8 @@ namespace skyline::gpu { } void Texture::SynchronizeHost(bool gpuDirty) { - if (!guest || format != guest->format) - return; // We need to skip GPU dirty if the host format and guest format differ as we don't support re-encoding compressed textures which is when this generally occurs + if (!guest) + return; TRACE_EVENT("gpu", "Texture::SynchronizeHost"); { @@ -708,8 +708,8 @@ namespace skyline::gpu { } void Texture::SynchronizeHostInline(const vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr &pCycle, bool gpuDirty) { - if (!guest || format != guest->format) - return; // See SynchronizeHost(...) + if (!guest) + return; TRACE_EVENT("gpu", "Texture::SynchronizeHostInline");