mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +11:00
Change metal format to BGRA8Unorm
This should fix channel swizzling on M1 and restore functionality on Intel
This commit is contained in:
parent
3ff87c88a7
commit
c95887b4df
|
@ -350,7 +350,7 @@ impl crate::backend::Device for MtlDevice {
|
||||||
//desc.set_mipmap_level_count(1);
|
//desc.set_mipmap_level_count(1);
|
||||||
let mtl_format = match format {
|
let mtl_format = match format {
|
||||||
ImageFormat::A8 => metal::MTLPixelFormat::R8Unorm,
|
ImageFormat::A8 => metal::MTLPixelFormat::R8Unorm,
|
||||||
ImageFormat::Rgba8 => metal::MTLPixelFormat::RGBA8Unorm,
|
ImageFormat::Rgba8 => metal::MTLPixelFormat::BGRA8Unorm,
|
||||||
};
|
};
|
||||||
desc.set_pixel_format(mtl_format);
|
desc.set_pixel_format(mtl_format);
|
||||||
desc.set_usage(metal::MTLTextureUsage::ShaderRead | metal::MTLTextureUsage::ShaderWrite);
|
desc.set_usage(metal::MTLTextureUsage::ShaderRead | metal::MTLTextureUsage::ShaderWrite);
|
||||||
|
|
Loading…
Reference in a new issue