summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhigles2_p_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/qrhigles2_p_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/qrhigles2_p_p.h')
-rw-r--r--src/gui/rhi/qrhigles2_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h
index e326b661d9..4f64c6d0a3 100644
--- a/src/gui/rhi/qrhigles2_p_p.h
+++ b/src/gui/rhi/qrhigles2_p_p.h
@@ -148,6 +148,7 @@ struct QGles2Texture : public QRhiTexture
GLenum gltype;
QGles2SamplerData samplerState;
bool specified = false;
+ bool compressedAtlasBuilt = false;
int mipLevelCount = 0;
enum Access {