diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-05-25 11:57:57 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-05-25 14:21:03 +0200 |
commit | 0ffef9cb8da7682b42f595c683d7ef9cb22dabd7 (patch) | |
tree | 3bf51b51cc03cc246ed73d52a3a17a4f1c62bec5 /src/gui/rhi/qrhimetal.mm | |
parent | ecca816ea1d2b98a500cc621ff1bd5e34771f7af (diff) | |
download | qtbase-0ffef9cb8da7682b42f595c683d7ef9cb22dabd7.tar.gz |
RHI: Introduce QRhiTexture::RG8
Change-Id: I58f35b2629bd6464f08cba66e852215472fcbe2a
Fixes: QTBUG-84384
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal.mm')
-rw-r--r-- | src/gui/rhi/qrhimetal.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 5d94b481a6..33fe389892 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -2247,6 +2247,12 @@ static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QR #else return srgb ? MTLPixelFormatR8Unorm_sRGB : MTLPixelFormatR8Unorm; #endif + case QRhiTexture::RG8: +#ifdef Q_OS_MACOS + return MTLPixelFormatRG8Unorm; +#else + return srgb ? MTLPixelFormatRG8Unorm_sRGB : MTLPixelFormatRG8Unorm; +#endif case QRhiTexture::R16: return MTLPixelFormatR16Unorm; case QRhiTexture::RED_OR_ALPHA8: |