|
@@ -1434,10 +1434,10 @@ static MetalTexture *METAL_INTERNAL_CreateTexture(
|
|
|
// This format isn't natively supported so let's swizzle!
|
|
// This format isn't natively supported so let's swizzle!
|
|
|
if (createinfo->format == SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM) {
|
|
if (createinfo->format == SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM) {
|
|
|
if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) {
|
|
if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) {
|
|
|
- textureDescriptor.swizzle = MTLTextureSwizzleChannelsMake(MTLTextureSwizzleBlue,
|
|
|
|
|
- MTLTextureSwizzleGreen,
|
|
|
|
|
- MTLTextureSwizzleRed,
|
|
|
|
|
- MTLTextureSwizzleAlpha);
|
|
|
|
|
|
|
+ textureDescriptor.swizzle = MTLTextureSwizzleChannelsMake(MTLTextureSwizzleGreen,
|
|
|
|
|
+ MTLTextureSwizzleBlue,
|
|
|
|
|
+ MTLTextureSwizzleAlpha,
|
|
|
|
|
+ MTLTextureSwizzleRed);
|
|
|
} else {
|
|
} else {
|
|
|
SET_STRING_ERROR_AND_RETURN("SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM is not supported", NULL);
|
|
SET_STRING_ERROR_AND_RETURN("SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM is not supported", NULL);
|
|
|
}
|
|
}
|