diff --git a/source/blender/gpu/metal/mtl_texture.mm b/source/blender/gpu/metal/mtl_texture.mm index 36470493400..3767b0b30a2 100644 --- a/source/blender/gpu/metal/mtl_texture.mm +++ b/source/blender/gpu/metal/mtl_texture.mm @@ -1807,22 +1807,12 @@ uint gpu::MTLTexture::gl_bindcode_get() const bool gpu::MTLTexture::init_internal() { - if (format_ == GPU_DEPTH24_STENCIL8) { - /* Apple Silicon requires GPU_DEPTH32F_STENCIL8 instead of GPU_DEPTH24_STENCIL8. */ - format_ = GPU_DEPTH32F_STENCIL8; - } - this->prepare_internal(); return true; } bool gpu::MTLTexture::init_internal(GPUVertBuf *vbo) { - if (this->format_ == GPU_DEPTH24_STENCIL8) { - /* Apple Silicon requires GPU_DEPTH32F_STENCIL8 instead of GPU_DEPTH24_STENCIL8. */ - this->format_ = GPU_DEPTH32F_STENCIL8; - } - MTLPixelFormat mtl_format = gpu_texture_format_to_metal(this->format_); mtl_max_mips_ = 1; mipmaps_ = 0; diff --git a/source/blender/gpu/metal/mtl_texture_util.mm b/source/blender/gpu/metal/mtl_texture_util.mm index 3664ad04dc0..44469d94507 100644 --- a/source/blender/gpu/metal/mtl_texture_util.mm +++ b/source/blender/gpu/metal/mtl_texture_util.mm @@ -103,11 +103,10 @@ MTLPixelFormat gpu_texture_format_to_metal(eGPUTextureFormat tex_format) return MTLPixelFormatRGB10A2Uint; case GPU_R11F_G11F_B10F: return MTLPixelFormatRG11B10Float; + case GPU_DEPTH24_STENCIL8: + /* NOTE(fclem): DEPTH24_STENCIL8 not supported by Apple Silicon. Fallback to Depth32F8S. */ case GPU_DEPTH32F_STENCIL8: return MTLPixelFormatDepth32Float_Stencil8; - case GPU_DEPTH24_STENCIL8: - BLI_assert_msg(false, "GPU_DEPTH24_STENCIL8 not supported by Apple Silicon."); - return MTLPixelFormatDepth24Unorm_Stencil8; case GPU_SRGB8_A8: return MTLPixelFormatRGBA8Unorm_sRGB; /* Texture only formats. */