From e8199a5c4d8c7218178db809bbfc0464f49714b1 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 9 Jan 2020 15:28:54 +0100 Subject: rhi: Add R16F and R32F Can be relevant for Qt Quick 3D shadows, where the shadow map is R16F. Task-number: QTBUG-81268 Change-Id: Ic33e100929e133d1cbe0b062a15697c82536f62a Reviewed-by: Paul Olav Tvete --- src/gui/rhi/qrhimetal.mm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/rhi/qrhimetal.mm') diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 53422470e8..883d6923b9 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -2320,6 +2320,10 @@ static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QR return MTLPixelFormatRGBA16Float; case QRhiTexture::RGBA32F: return MTLPixelFormatRGBA32Float; + case QRhiTexture::R16F: + return MTLPixelFormatR16Float; + case QRhiTexture::R32F: + return MTLPixelFormatR32Float; case QRhiTexture::D16: #ifdef Q_OS_MACOS -- cgit v1.2.3