From fba9727f8ec90a47319cd13a488ed9ee03a63333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 18 Dec 2018 16:06:06 -0800 Subject: [PATCH] Cleanup. --- src/renderer_mtl.mm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/renderer_mtl.mm b/src/renderer_mtl.mm index 5391c379a..d15655094 100644 --- a/src/renderer_mtl.mm +++ b/src/renderer_mtl.mm @@ -388,7 +388,7 @@ namespace bgfx { namespace mtl retain(m_device); createFrameBuffer(m_fbh, g_platformData.nwh, 0, 0, TextureFormat::Unknown, TextureFormat::UnknownDepth); - + if ( NULL == m_mainFrameBuffer.m_swapChain->m_metalLayer ) { release(m_device); @@ -3432,7 +3432,6 @@ namespace bgfx { namespace mtl uint8_t primIndex = uint8_t(primType>>BGFX_STATE_PT_SHIFT); PrimInfo prim = s_primInfo[primIndex]; - ProgramMtl* currentProgram = NULL; RenderCommandEncoder rce; bool wasCompute = false; @@ -3690,7 +3689,6 @@ namespace bgfx { namespace mtl wasCompute = false; programIdx = kInvalidHandle; - currentProgram = NULL; //invalidateCompute(); } @@ -3900,14 +3898,10 @@ namespace bgfx { namespace mtl if (kInvalidHandle == programIdx) { - currentProgram = NULL; continue; } else { - ProgramMtl& program = m_program[programIdx]; - currentProgram = &program; - RenderPipelineState pso = NULL; if (0 < numStreams) @@ -3925,7 +3919,6 @@ namespace bgfx { namespace mtl if (NULL == pso) { - currentProgram = NULL; programIdx = kInvalidHandle; continue; }