summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhi_p.h
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2020-05-15 09:20:08 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2020-05-22 10:32:11 +0200
commit880f709fd079817eac3e798280b833ba13dd2515 (patch)
tree355f87ab10e99da92d2a04ef24fca8158ea58f26 /src/gui/rhi/qrhi_p.h
parent3ec0df4b5f9bf82918e0b783f547d2bc560f5ccf (diff)
RHI: facilitate compressed atlas textures in gles2 backend
Since glCompressedTexImage2D() does not allow zero data, it could not be executed during texture build. Instead it would be done during the first subresource upload. This made atlasing clumsy, since one had to introduce a fake upload of the full texture size before the subtexture uploads. This commits lets the gles2 backend deal with that instead. Introduces the UsedAsCompressedAtlas QRhiTexture::Flag for opting in to this behavior. Task-number: QTBUG-78582 Change-Id: Ib6e4ea637c62cc8a51bd9a4a06e59882f335f2a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi_p.h')
-rw-r--r--src/gui/rhi/qrhi_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h
index 71064cfc6a..12a294e8c2 100644
--- a/src/gui/rhi/qrhi_p.h
+++ b/src/gui/rhi/qrhi_p.h
@@ -727,7 +727,8 @@ public:
sRGB = 1 << 4,
UsedAsTransferSource = 1 << 5,
UsedWithGenerateMips = 1 << 6,
- UsedWithLoadStore = 1 << 7
+ UsedWithLoadStore = 1 << 7,
+ UsedAsCompressedAtlas = 1 << 8
};
Q_DECLARE_FLAGS(Flags, Flag)