|
|
@@ -329,7 +329,7 @@ namespace bgfx { namespace mtl
|
|
|
{ MTLPixelFormatRGB10A2Unorm, MTLPixelFormatInvalid, MTLReadWriteTextureTierNone, { $R, $G, $B, $A }, true }, // RGB10A2
|
|
|
{ MTLPixelFormatRG11B10Float, MTLPixelFormatInvalid, MTLReadWriteTextureTierNone, { $R, $G, $B, $A }, true }, // RG11B10F
|
|
|
{ MTLPixelFormatInvalid, MTLPixelFormatInvalid, MTLReadWriteTextureTierNone, { $R, $G, $B, $A }, false }, // UnknownDepth
|
|
|
- { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid, MTLReadWriteTextureTierNone, { $R, $G, $B, $A }, false }, // D16
|
|
|
+ { MTLPixelFormatDepth16Unorm, MTLPixelFormatInvalid, MTLReadWriteTextureTierNone, { $R, $G, $B, $A }, false }, // D16
|
|
|
{ MTLPixelFormatDepth32Float, MTLPixelFormatInvalid, MTLReadWriteTextureTierNone, { $R, $G, $B, $A }, false }, // D24
|
|
|
{ MTLPixelFormat(255/*Depth24Unorm_Stencil8*/), MTLPixelFormatInvalid, MTLReadWriteTextureTierNone, { $R, $G, $B, $A }, false }, // D24S8
|
|
|
{ MTLPixelFormatDepth32Float, MTLPixelFormatInvalid, MTLReadWriteTextureTierNone, { $R, $G, $B, $A }, false }, // D32
|
|
|
@@ -687,6 +687,10 @@ BX_STATIC_ASSERT(BX_COUNTOF(s_accessNames) == Access::Count, "Invalid s_accessNa
|
|
|
: 0
|
|
|
;
|
|
|
|
|
|
+ if (!(iOSVersionEqualOrGreater("13.0.0") || macOSVersionEqualOrGreater(12, 0, 0))){
|
|
|
+ s_textureFormat[TextureFormat::D16].m_fmt = MTLPixelFormatDepth32Float;
|
|
|
+ }
|
|
|
+
|
|
|
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
|
|
|
{
|
|
|
uint16_t support = 0;
|