diff options
author | Jungi Byun <jungi.byun@lge.com> | 2021-02-02 11:53:21 +0900 |
---|---|---|
committer | Jungi Byun <jungi.byun@lge.com> | 2021-02-04 09:59:38 +0000 |
commit | e11dd6c677aa38753682a9e4f782592780358056 (patch) | |
tree | a24a40d830b78f1351cf362d482489cadaba4da0 /src/hardwareintegration | |
parent | 16760280fd04cf70255bab16d9acecad254fdd8f (diff) | |
download | qtwayland-e11dd6c677aa38753682a9e4f782592780358056.tar.gz |
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')
2 files changed, 2 insertions, 0 deletions
diff --git a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp index a4fbc6b5..d3690842 100644 --- a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp @@ -452,6 +452,7 @@ QOpenGLTexture *LinuxDmabufClientBuffer::toOpenGlTexture(int plane) } if (m_textureDirty) { + m_textureDirty = false; texture->bind(); glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); m_integration->gl_egl_image_target_texture_2d(target, d->image(plane)); diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp index a826c5fc..7f8cced3 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]); |