Fixed build.

This commit is contained in:
Branimir Karadžić 2017-11-24 19:50:23 -08:00
parent 77c00da989
commit 11e701987b
2 changed files with 10 additions and 7 deletions

View File

@ -330,7 +330,9 @@ namespace bgfx { namespace mtl
void setLabel(const char* _label)
{
if ([m_obj respondsToSelector:@selector(setLabel:)])
{
[m_obj setLabel:@(_label)];
}
}
MTL_CLASS_END

View File

@ -955,14 +955,15 @@ namespace bgfx { namespace mtl
m_commandBuffer = m_cmd.alloc();
}
void updateViewName(uint8_t _id, const char* _name) override
void updateViewName(ViewId _id, const char* _name) override
{
if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) )
{
bx::strCopy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED]
, BX_COUNTOF(s_viewName[0])-BGFX_CONFIG_MAX_VIEW_NAME_RESERVED
, _name
);
bx::strCopy(
&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED]
, BX_COUNTOF(s_viewName[0])-BGFX_CONFIG_MAX_VIEW_NAME_RESERVED
, _name
);
}
}
@ -2558,8 +2559,8 @@ namespace bgfx { namespace mtl
|| bimg::isDepth(bimg::TextureFormat::Enum(m_textureFormat) )
? 2 /*MTLStorageModePrivate*/
: (BX_ENABLED(BX_PLATFORM_IOS)
? 0 /* MTLStorageModeShared */
: 1 /*MTLStorageModeManaged*/
? 0 /* MTLStorageModeShared */
: 1 /* MTLStorageModeManaged */
) );
desc.usage = MTLTextureUsageShaderRead;