summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
diff options
context:
space:
mode:
authorJungi Byun <jungi.byun@lge.com>2021-02-02 11:53:21 +0900
committerJungi Byun <jungi.byun@lge.com>2021-02-04 09:59:38 +0000
commite11dd6c677aa38753682a9e4f782592780358056 (patch)
treea24a40d830b78f1351cf362d482489cadaba4da0 /src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
parent16760280fd04cf70255bab16d9acecad254fdd8f (diff)
Clear dirty flag to protect original texture
If the dirty flag is kept as true, a texture which is rendered in a thread might be ruined by "glEGLImageTargetTexture2DOES" by another rendering thread. This can cause an undefined behavior like a crash in GPU driver. As same as SharedMemoryBuffer, change the dirty flag into false in WaylandEglClientBuffer and LinuxDmabufClientBuffer. Change-Id: I2deb09703174e6257c13cc0bb542a90f0956c1c2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp')
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index a826c5fca..7f8cced33 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -569,6 +569,7 @@ QOpenGLTexture *WaylandEglClientBuffer::toOpenGlTexture(int plane)
}
if (m_textureDirty) {
+ m_textureDirty = false;
texture->bind();
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
p->gl_egl_image_target_texture_2d(target, d->egl_images[plane]);