rhi: gl: Avoid crash when reading back the swapchain backbuffer
Change-Id: I9a632c06d8b9e666d99d0f135d3396d2de03f92a Reviewed-by: Christian Strømme <christian.stromme@qt.io>
This commit is contained in:
parent
1fbe3c2316
commit
6f592ea300
@ -1480,7 +1480,8 @@ void QRhiGles2::enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdate
|
||||
cmd.cmd = QGles2CommandBuffer::Command::ReadPixels;
|
||||
cmd.args.readPixels.result = u.read.result;
|
||||
QGles2Texture *texD = QRHI_RES(QGles2Texture, u.read.rb.texture());
|
||||
trackedImageBarrier(cbD, texD, QGles2Texture::AccessRead);
|
||||
if (texD)
|
||||
trackedImageBarrier(cbD, texD, QGles2Texture::AccessRead);
|
||||
cmd.args.readPixels.texture = texD ? texD->texture : 0;
|
||||
if (texD) {
|
||||
cmd.args.readPixels.w = texD->m_pixelSize.width();
|
||||
|
Loading…
x
Reference in New Issue
Block a user