rhi: fix QByteArray static uploads
QByteArray is implicitly convertible to void* (!) so the void* staticUpload overloads were accidentally selected, creating a deep copy and defeating the purpose of QByteArray. Fix this by calling the staticUpload functions with the correct number of arguments. Amends 5d857ed3bce64e4a7bdc5247c7dd9ca4495fb10b. Change-Id: I5ab0baa53b764162ca44a3dd1dc6b1d5c68c7925 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
1b435685be
commit
dee6c21fe0
@ -9630,9 +9630,9 @@ void QRhiResourceUpdateBatch::uploadStaticBuffer(QRhiBuffer *buf, QByteArray dat
|
||||
if (buf->size() > 0 && quint32(data.size()) == buf->size()) {
|
||||
const int idx = d->activeBufferOpCount++;
|
||||
if (idx < d->bufferOps.size())
|
||||
QRhiResourceUpdateBatchPrivate::BufferOp::changeToStaticUpload(&d->bufferOps[idx], buf, 0, 0, std::move(data));
|
||||
QRhiResourceUpdateBatchPrivate::BufferOp::changeToStaticUpload(&d->bufferOps[idx], buf, 0, std::move(data));
|
||||
else
|
||||
d->bufferOps.append(QRhiResourceUpdateBatchPrivate::BufferOp::staticUpload(buf, 0, 0, std::move(data)));
|
||||
d->bufferOps.append(QRhiResourceUpdateBatchPrivate::BufferOp::staticUpload(buf, 0, std::move(data)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user