mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-01-08 08:00:44 +01:00
fix: performance regression
This commit is contained in:
parent
b8e9bb355c
commit
07989d828c
@ -161,6 +161,9 @@ MetalRenderer::~MetalRenderer()
|
|||||||
delete m_samplerCache;
|
delete m_samplerCache;
|
||||||
delete m_memoryManager;
|
delete m_memoryManager;
|
||||||
|
|
||||||
|
m_nullTexture1D->release();
|
||||||
|
m_nullTexture2D->release();
|
||||||
|
|
||||||
m_nearestSampler->release();
|
m_nearestSampler->release();
|
||||||
m_linearSampler->release();
|
m_linearSampler->release();
|
||||||
|
|
||||||
@ -743,13 +746,14 @@ void MetalRenderer::draw_execute(uint32 baseVertex, uint32 baseInstance, uint32
|
|||||||
const auto fetchShader = LatteSHRC_GetActiveFetchShader();
|
const auto fetchShader = LatteSHRC_GetActiveFetchShader();
|
||||||
|
|
||||||
// Depth stencil state
|
// Depth stencil state
|
||||||
auto depthStencilContext = LatteGPUState.contextNew;
|
// TODO: implement this somehow
|
||||||
|
//auto depthControl = LatteGPUState.contextNew.DB_DEPTH_CONTROL;
|
||||||
|
|
||||||
// Disable depth write when there is no depth attachment
|
// Disable depth write when there is no depth attachment
|
||||||
if (!m_state.m_lastUsedFBO->depthBuffer.texture)
|
//if (!m_state.m_lastUsedFBO->depthBuffer.texture)
|
||||||
depthStencilContext.DB_DEPTH_CONTROL.set_Z_WRITE_ENABLE(false);
|
// depthControl.set_Z_WRITE_ENABLE(false);
|
||||||
|
|
||||||
MTL::DepthStencilState* depthStencilState = m_depthStencilCache->GetDepthStencilState(depthStencilContext);
|
MTL::DepthStencilState* depthStencilState = m_depthStencilCache->GetDepthStencilState(LatteGPUState.contextNew);
|
||||||
if (depthStencilState != encoderState.m_depthStencilState)
|
if (depthStencilState != encoderState.m_depthStencilState)
|
||||||
{
|
{
|
||||||
renderCommandEncoder->setDepthStencilState(depthStencilState);
|
renderCommandEncoder->setDepthStencilState(depthStencilState);
|
||||||
|
Loading…
Reference in New Issue
Block a user