diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2018-12-18 07:55:42 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2018-12-19 16:39:44 +0000 |
commit | d85eede12eeab74ae446a2db4b12e23a846d0502 (patch) | |
tree | f4bee7d59e90ea424ea72c9a1f7d19f3464f83ba | |
parent | 338addb5a79c32d5b7b3013746c6d5250e1581fe (diff) |
QTexture: DDS handle uncompressed floating point format textures
These textures have a FourCC flag set but havign a fourCC flag
doesn't mean the content is actually compressed. Adjust supported
formats accordingly.
Change-Id: Ided96d64acb6b5ad2f13cfaa9445bbc83c7bb93d
Task-number: QTBUG-72650
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
-rw-r--r-- | src/render/texture/qtexture.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/render/texture/qtexture.cpp b/src/render/texture/qtexture.cpp index f7ee3f6df..e539ce9de 100644 --- a/src/render/texture/qtexture.cpp +++ b/src/render/texture/qtexture.cpp @@ -317,6 +317,12 @@ const struct FourCCFormat { DdsFourCC<'D','X','T','5'>::value, { QOpenGLTexture::NoSourceFormat, QOpenGLTexture::RGBA_DXT5, QOpenGLTexture::NoPixelType, 16, true } }, { DdsFourCC<'A','T','I','1'>::value, { QOpenGLTexture::NoSourceFormat, QOpenGLTexture::R_ATI1N_UNorm, QOpenGLTexture::NoPixelType, 8, true } }, { DdsFourCC<'A','T','I','2'>::value, { QOpenGLTexture::NoSourceFormat, QOpenGLTexture::RG_ATI2N_UNorm, QOpenGLTexture::NoPixelType, 16, true } }, +{ /* DXGI_FORMAT_R16_FLOAT */ 111, { QOpenGLTexture::Red, QOpenGLTexture::R16F, QOpenGLTexture::Float16, 2, false } }, +{ /* DXGI_FORMAT_R16_FLOAT */ 112, { QOpenGLTexture::RG, QOpenGLTexture::RG16F, QOpenGLTexture::Float16, 4, false } }, +{ /* DXGI_FORMAT_R16G16B16A16_FLOAT */113, { QOpenGLTexture::RGBA, QOpenGLTexture::RGBA16F, QOpenGLTexture::Float16, 8, false } }, +{ /* DXGI_FORMAT_R32_FLOAT */ 114, { QOpenGLTexture::Red, QOpenGLTexture::R32F, QOpenGLTexture::Float32, 4, false } }, +{ /* DXGI_FORMAT_R32G32_FLOAT */ 115, { QOpenGLTexture::RG, QOpenGLTexture::RG32F, QOpenGLTexture::Float32, 8, false } }, +{ /* DXGI_FORMAT_R32G32B32A32_FLOAT */116, { QOpenGLTexture::RGBA, QOpenGLTexture::RGBA32F, QOpenGLTexture::Float32, 16, false } } }; const struct DX10Format |