diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-09-30 14:08:53 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-10-02 13:14:08 +0200 |
commit | d92b0e18c1b987e60304c2e366ff374405adaab1 (patch) | |
tree | 07734992c8ce08cedf3214c1893dc033c21c2996 /src/gui/rhi/qrhid3d11.cpp | |
parent | 3080194ae41128e91da59301a7e221303a2f04a5 (diff) |
rhi: Make per-frame flags per-pass where appropriate
ExternalContentsInPass becomes a per-pass flag now. Why is this
beneficial? Because while Qt Quick has no choice for its render
pass, not being able to guess if the application wants to do some
native rendering in there, Quick 3D's render passes, all the ones
that are under Quick3D's control, do not have native rendering
from the application in them, and so using secondary command
buffers with Vulkan is not necessary.
Introduce something similar for compute and OpenGL. By knowing that
none of the resources used in a pass are used with a compute pass
(e.g. because we know that there are no compute passes at all) a small
amount of time can be saved by skipping tracking buffers and textures
because the only purpose of said tracking is to generate barriers that
are relevant only to compute.
Change-Id: I0eceb4774d87803c73a39db527f5707a9f4d75c1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhid3d11.cpp')
-rw-r--r-- | src/gui/rhi/qrhid3d11.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index 2fe138dd55..4d00f11c84 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -1711,7 +1711,8 @@ void QRhiD3D11::beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, - QRhiResourceUpdateBatch *resourceUpdates) + QRhiResourceUpdateBatch *resourceUpdates, + QRhiCommandBuffer::BeginPassFlags) { QD3D11CommandBuffer *cbD = QRHI_RES(QD3D11CommandBuffer, cb); Q_ASSERT(cbD->recordingPass == QD3D11CommandBuffer::NoPass); @@ -1822,7 +1823,9 @@ void QRhiD3D11::endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resource enqueueResourceUpdates(cb, resourceUpdates); } -void QRhiD3D11::beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) +void QRhiD3D11::beginComputePass(QRhiCommandBuffer *cb, + QRhiResourceUpdateBatch *resourceUpdates, + QRhiCommandBuffer::BeginPassFlags) { QD3D11CommandBuffer *cbD = QRHI_RES(QD3D11CommandBuffer, cb); Q_ASSERT(cbD->recordingPass == QD3D11CommandBuffer::NoPass); |