From 45737e82d97cc5ce122f5db371da50d664e23c2b Mon Sep 17 00:00:00 2001 From: Samuliak Date: Mon, 2 Sep 2024 08:10:40 +0200 Subject: [PATCH] disable shader write usage on textures --- src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp b/src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp index 4510571a..27fd9dbe 100644 --- a/src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp +++ b/src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp @@ -76,9 +76,7 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM auto pixelFormat = GetMtlPixelFormat(format, isDepth, m_mtlr->GetPixelFormatSupport()); desc->setPixelFormat(pixelFormat); - // HACK: even though the textures are never written to from a shader, we still need to use `ShaderWrite` usage to prevent pink lines over the screen - MTL::TextureUsage usage = MTL::TextureUsageShaderRead | MTL::TextureUsageShaderWrite; - // TODO: add more conditions + MTL::TextureUsage usage = MTL::TextureUsageShaderRead; if (!Latte::IsCompressedFormat(format)) { usage |= MTL::TextureUsageRenderTarget;