Expand GetFormatEquivalentToIOSurfaceFormat
Add support for IOSurface formats for: - RGBA16Float - RG16Float - R16Float - RGB10A2Unorm Bug: chromium:1241369 Change-Id: I8d3ed2c7575fe651406cb470383f3d4d23fb7aeb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/80820 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: ccameron chromium <ccameron@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
parent
984ea223f2
commit
be72f76c23
|
@ -159,6 +159,14 @@ namespace dawn::native::metal {
|
|||
|
||||
ResultOrError<wgpu::TextureFormat> GetFormatEquivalentToIOSurfaceFormat(uint32_t format) {
|
||||
switch (format) {
|
||||
case kCVPixelFormatType_64RGBAHalf:
|
||||
return wgpu::TextureFormat::RGBA16Float;
|
||||
case kCVPixelFormatType_TwoComponent16Half:
|
||||
return wgpu::TextureFormat::RG16Float;
|
||||
case kCVPixelFormatType_OneComponent16Half:
|
||||
return wgpu::TextureFormat::R16Float;
|
||||
case kCVPixelFormatType_ARGB2101010LEPacked:
|
||||
return wgpu::TextureFormat::RGB10A2Unorm;
|
||||
case kCVPixelFormatType_32RGBA:
|
||||
return wgpu::TextureFormat::RGBA8Unorm;
|
||||
case kCVPixelFormatType_32BGRA:
|
||||
|
|
Loading…
Reference in New Issue