diff --git a/cocos/renderer/backend/metal/DeviceInfoMTL.mm b/cocos/renderer/backend/metal/DeviceInfoMTL.mm index 980eb33435..f0102c8f60 100644 --- a/cocos/renderer/backend/metal/DeviceInfoMTL.mm +++ b/cocos/renderer/backend/metal/DeviceInfoMTL.mm @@ -397,9 +397,6 @@ const char* DeviceInfoMTL::getExtension() const bool DeviceInfoMTL::checkForFeatureSupported(FeatureType feature) { - //TODO coulsonwang, removed it later. - return false; - bool featureSupported = false; switch (feature) { diff --git a/cocos/renderer/backend/metal/TextureMTL.mm b/cocos/renderer/backend/metal/TextureMTL.mm index 959ae815d1..ecfc27031e 100644 --- a/cocos/renderer/backend/metal/TextureMTL.mm +++ b/cocos/renderer/backend/metal/TextureMTL.mm @@ -41,21 +41,6 @@ namespace } } - MTLSamplerMipFilter toMTLSamplerMipFilter(SamplerFilter mode) { - switch (mode) { - case SamplerFilter::NEAREST: - case SamplerFilter::LINEAR_MIPMAP_NEAREST: - case SamplerFilter::NEAREST_MIPMAP_NEAREST: - return MTLSamplerMipFilterNearest; - case SamplerFilter::LINEAR: - case SamplerFilter::LINEAR_MIPMAP_LINEAR: - case SamplerFilter::NEAREST_MIPMAP_LINEAR: - return MTLSamplerMipFilterLinear; - case SamplerFilter::DONT_CARE: - return MTLSamplerMipFilterNearest; - } - } - void convertRGB2RGBA(uint8_t* src, uint8_t* dst, uint32_t length) { for (uint32_t i = 0; i < length; ++i) @@ -157,8 +142,8 @@ namespace MTLPixelFormat pixelFormat = Utils::toMTLPixelFormat(textureFormat); uint32_t bytesPerRow = 0; - if(textureFormat >= PixelFormat::PVRTC2 && - textureFormat <= PixelFormat::PVRTC4A) + if(textureFormat >= PixelFormat::PVRTC4 && + textureFormat <= PixelFormat::PVRTC2A) { bytesPerRow = 0; }