summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhimetal.mm
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2022-01-05 15:48:46 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2022-01-11 22:38:35 +0100
commitcdfbe7092304c3677e8fae95892f53852a90adfc (patch)
treebd6cb326fd2d0cf3edbb9254021f2d4f36efbb75 /src/gui/rhi/qrhimetal.mm
parent0be28d103089a1c5e196e6e722878f495dfc53ce (diff)
rhi: Improve the handling of HDR capable texture formats
Add some sort of autotest for both RGBA16F and the new RGB10A2. The latter is introduced particularly because ideally we should have a texture format that corresponds to the D3D/Vulkan swapchain color buffer format with HDR10. Change-Id: I1e1bbb7c7e32cb3db89275900811c0bcaeac39d6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal.mm')
-rw-r--r--src/gui/rhi/qrhimetal.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm
index ff136debe9..e825f56943 100644
--- a/src/gui/rhi/qrhimetal.mm
+++ b/src/gui/rhi/qrhimetal.mm
@@ -2411,6 +2411,9 @@ static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QR
case QRhiTexture::R32F:
return MTLPixelFormatR32Float;
+ case QRhiTexture::RGB10A2:
+ return MTLPixelFormatRGB10A2Unorm;
+
#ifdef Q_OS_MACOS
case QRhiTexture::D16:
return MTLPixelFormatDepth16Unorm;