From ce9d0491f2a3836991c3c44fa70c32f1f606ab28 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 7 Sep 2021 15:53:59 +0200 Subject: 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 --- src/gui/rhi/qrhi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/rhi/qrhi.cpp') 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); } } -- cgit v1.2.3