From 88625709058b386ee74cca536c6c5556159c99fa Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 21 Jun 2019 15:04:13 +0200 Subject: [PATCH] rhi: d3d: gl: Remove incorrect exec.Cmd.Buf. assumption May very well be called within an active pass when going through beginExternal() (think examples like d3d11underqml) Change-Id: Ie98e72609308f47497d83fbe10c19ad1ae8eade3 Reviewed-by: Lars Knoll --- src/gui/rhi/qrhid3d11.cpp | 2 -- src/gui/rhi/qrhigles2.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index 6d5caec57a..7d9c934c18 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -1938,8 +1938,6 @@ void QRhiD3D11::resetShaderResources() void QRhiD3D11::executeCommandBuffer(QD3D11CommandBuffer *cbD, QD3D11SwapChain *timestampSwapChain) { - Q_ASSERT(cbD->recordingPass == QD3D11CommandBuffer::NoPass); - quint32 stencilRef = 0; float blendConstants[] = { 1, 1, 1, 1 }; diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 32a25dd615..7c40a36701 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -1500,8 +1500,6 @@ static inline GLenum toGlTextureCompareFunc(QRhiSampler::CompareOp op) void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb) { QGles2CommandBuffer *cbD = QRHI_RES(QGles2CommandBuffer, cb); - Q_ASSERT(cbD->recordingPass == QGles2CommandBuffer::NoPass); - GLenum indexType = GL_UNSIGNED_SHORT; quint32 indexStride = sizeof(quint16); quint32 indexOffset = 0;