mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-01 21:44:17 +01:00
set pixel format view usage for textures
This commit is contained in:
parent
25a1d7ef6c
commit
02254d4e57
@ -4,6 +4,7 @@
|
|||||||
#include "Cafe/HW/Latte/Renderer/Metal/LatteToMtl.h"
|
#include "Cafe/HW/Latte/Renderer/Metal/LatteToMtl.h"
|
||||||
#include "Common/precompiled.h"
|
#include "Common/precompiled.h"
|
||||||
#include "Metal/MTLResource.hpp"
|
#include "Metal/MTLResource.hpp"
|
||||||
|
#include "Metal/MTLTexture.hpp"
|
||||||
|
|
||||||
LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels, uint32 swizzle,
|
LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM dim, MPTR physAddress, MPTR physMipAddress, Latte::E_GX2SURFFMT format, uint32 width, uint32 height, uint32 depth, uint32 pitch, uint32 mipLevels, uint32 swizzle,
|
||||||
Latte::E_HWTILEMODE tileMode, bool isDepth)
|
Latte::E_HWTILEMODE tileMode, bool isDepth)
|
||||||
@ -78,8 +79,7 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM
|
|||||||
auto pixelFormat = GetMtlPixelFormat(format, isDepth, m_mtlr->GetPixelFormatSupport());
|
auto pixelFormat = GetMtlPixelFormat(format, isDepth, m_mtlr->GetPixelFormatSupport());
|
||||||
desc->setPixelFormat(pixelFormat);
|
desc->setPixelFormat(pixelFormat);
|
||||||
|
|
||||||
// TODO: using MTL::TextureUsageShaderWrite as well fixes Mario Tennis: Ultra Smash, investigate why
|
MTL::TextureUsage usage = MTL::TextureUsageShaderRead | MTL::TextureUsagePixelFormatView;
|
||||||
MTL::TextureUsage usage = MTL::TextureUsageShaderRead;
|
|
||||||
if (!Latte::IsCompressedFormat(format))
|
if (!Latte::IsCompressedFormat(format))
|
||||||
{
|
{
|
||||||
usage |= MTL::TextureUsageRenderTarget;
|
usage |= MTL::TextureUsageRenderTarget;
|
||||||
|
Loading…
Reference in New Issue
Block a user