disable shader write usage on textures

This commit is contained in:
Samuliak 2024-09-02 08:10:40 +02:00
parent 491ac694ab
commit 45737e82d9

View File

@ -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;