summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhid3d11.cpp
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-05-25 11:57:57 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-05-25 14:21:03 +0200
commit0ffef9cb8da7682b42f595c683d7ef9cb22dabd7 (patch)
tree3bf51b51cc03cc246ed73d52a3a17a4f1c62bec5 /src/gui/rhi/qrhid3d11.cpp
parentecca816ea1d2b98a500cc621ff1bd5e34771f7af (diff)
RHI: Introduce QRhiTexture::RG8
Change-Id: I58f35b2629bd6464f08cba66e852215472fcbe2a Fixes: QTBUG-84384 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhid3d11.cpp')
-rw-r--r--src/gui/rhi/qrhid3d11.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp
index 97294669f7..d1d4745bc8 100644
--- a/src/gui/rhi/qrhid3d11.cpp
+++ b/src/gui/rhi/qrhid3d11.cpp
@@ -1138,6 +1138,8 @@ static inline DXGI_FORMAT toD3DTextureFormat(QRhiTexture::Format format, QRhiTex
return srgb ? DXGI_FORMAT_B8G8R8A8_UNORM_SRGB : DXGI_FORMAT_B8G8R8A8_UNORM;
case QRhiTexture::R8:
return DXGI_FORMAT_R8_UNORM;
+ case QRhiTexture::RG8:
+ return DXGI_FORMAT_R8G8_UNORM;
case QRhiTexture::R16:
return DXGI_FORMAT_R16_UNORM;
case QRhiTexture::RED_OR_ALPHA8:
@@ -1218,6 +1220,8 @@ static inline QRhiTexture::Format colorTextureFormatFromDxgiFormat(DXGI_FORMAT f
return QRhiTexture::BGRA8;
case DXGI_FORMAT_R8_UNORM:
return QRhiTexture::R8;
+ case DXGI_FORMAT_R8G8_UNORM:
+ return QRhiTexture::RG8;
case DXGI_FORMAT_R16_UNORM:
return QRhiTexture::R16;
default: // this cannot assert, must warn and return unknown