diff options
author | Christian Strømme <christian.stromme@qt.io> | 2021-09-24 13:55:50 +0200 |
---|---|---|
committer | Christian Strømme <christian.stromme@qt.io> | 2021-10-19 09:01:19 +0000 |
commit | aad24f603387859531f1b61f94962c862397aba9 (patch) | |
tree | 69b5de6d756a115e1e32f3da9b0e65f0a1adb030 /src | |
parent | 2e81e445f254b188643626a5ba30dbb626ddc36b (diff) |
Rhi: Document expectation for setGraphicsPipeline's pipeline argument
The backed expect the pipeline to be valid, so document it and
assert if the set pipeline is a null pointer.
Pick-to: 6.2
Change-Id: I72b3d0d11b8dc98240d17e13adf2b6ccbd71891d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/rhi/qrhi.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index e3bb8f288e..82a304865e 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -5650,9 +5650,12 @@ void QRhiCommandBuffer::endPass(QRhiResourceUpdateBatch *resourceUpdates) \note This function can only be called inside a render pass, meaning between a beginPass() and endPass() call. + + \note The new graphics pipeline \a ps must be a valid pointer. */ void QRhiCommandBuffer::setGraphicsPipeline(QRhiGraphicsPipeline *ps) { + Q_ASSERT(ps != nullptr); m_rhi->setGraphicsPipeline(this, ps); } |