diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-09-07 15:53:59 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-09-07 21:47:44 +0200 |
commit | ce9d0491f2a3836991c3c44fa70c32f1f606ab28 (patch) | |
tree | d190772248643c714ad47140c427aaa8febcca4f /src/gui/rhi/qrhi.cpp | |
parent | 7e8c7b3ed86828e4b0fcc1f01a7666cfb1ecbe99 (diff) |
rhi: Improve srb layout serialization helpers
Be idiomatic and return the output iterator one past the last element.
Otherwise passing in a plain pointer (as exercised by the autotest now)
fails to function because we write over the same 4 elements again and
again for each binding.
Pick-to: 6.2
Change-Id: If74463fa5140ffa2b1d5be97b71868848ad46614
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi.cpp')
-rw-r--r-- | src/gui/rhi/qrhi.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index acea9a780a..f4855cd046 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -3052,7 +3052,7 @@ void QRhiImplementation::updateLayoutDesc(QRhiShaderResourceBindings *srb) const QRhiShaderResourceBinding::Data *d = b.data(); srb->m_layoutDescHash ^= uint(d->binding) ^ uint(d->stage) ^ uint(d->type) ^ uint(d->type == QRhiShaderResourceBinding::SampledTexture ? d->u.stex.count : 1); - d->serialize(layoutDescAppender); + layoutDescAppender = d->serialize(layoutDescAppender); } } |