From 0e7aff8dce600a8e48515be4725cd41a6b826f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 17 May 2018 10:58:06 -0700 Subject: [PATCH] Cleanup. --- src/renderer_mtl.mm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/renderer_mtl.mm b/src/renderer_mtl.mm index 0915468d8..753e18d27 100644 --- a/src/renderer_mtl.mm +++ b/src/renderer_mtl.mm @@ -478,7 +478,8 @@ namespace bgfx { namespace mtl { m_uniformBuffers[i] = m_device.newBufferWithLength(UNIFORM_BUFFER_SIZE, 0); } - m_uniformBufferVertexOffset = 0; + + m_uniformBufferVertexOffset = 0; m_uniformBufferFragmentOffset = 0; const char* vshSource = @@ -851,12 +852,15 @@ namespace bgfx { namespace mtl uint32_t srcWidth = bx::uint32_max(1, texture.m_ptr.width() >> _mip); uint32_t srcHeight = bx::uint32_max(1, texture.m_ptr.height() >> _mip); - const uint8_t bpp = bimg::getBitsPerPixel(bimg::TextureFormat::Enum(texture.m_textureFormat) ); + const uint8_t bpp = bimg::getBitsPerPixel(bimg::TextureFormat::Enum(texture.m_textureFormat) ); - MTLRegion region = { { 0, 0, 0 }, { srcWidth, srcHeight, 1 } }; + MTLRegion region = + { + { 0, 0, 0 }, + { srcWidth, srcHeight, 1 }, + }; texture.m_ptr.getBytes(_data, srcWidth*bpp/8, 0, region, _mip, 0); - } void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) override @@ -951,14 +955,12 @@ namespace bgfx { namespace mtl m_uniformReg.remove(_handle); } - //cmdPre void requestScreenShotPre(const char* _filePath) { BX_UNUSED(_filePath); m_saveScreenshot = true; } - //cmdPost void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) override { BX_UNUSED(_handle); @@ -1070,7 +1072,7 @@ namespace bgfx { namespace mtl renderPassDescriptor.colorAttachments[0].loadAction = MTLLoadActionLoad; renderPassDescriptor.colorAttachments[0].storeAction = - NULL != renderPassDescriptor.colorAttachments[0].resolveTexture + NULL != renderPassDescriptor.colorAttachments[0].resolveTexture ? MTLStoreActionMultisampleResolve : MTLStoreActionStore ;