summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-10-14 17:46:16 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-10-14 17:46:34 +0200
commit440286655e0ca271506cf7cc02ad0dbf4baef9ca (patch)
tree896fa81adb8b14a69355a3a6cf64d06ec8173c9a /tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp
parent1e27ad1697187549151657ba187928e439300db7 (diff)
parente164d61ca8263fc4b46fdd916e1ea77c7dd2b735 (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Diffstat (limited to 'tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp')
-rw-r--r--tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp b/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp
index 27dd8097ad..af454c2487 100644
--- a/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp
+++ b/tests/manual/rhi/compressedtexture_bc1/compressedtexture_bc1.cpp
@@ -165,11 +165,13 @@ void Window::customRender()
u->updateDynamicBuffer(d.ubuf, 64, 4, &flip);
}
if (!d.compressedData.isEmpty()) {
- QRhiTextureUploadDescription desc;
+ QVarLengthArray<QRhiTextureUploadEntry, 16> descEntries;
for (int i = 0; i < d.compressedData.count(); ++i) {
QRhiTextureSubresourceUploadDescription image(d.compressedData[i].constData(), d.compressedData[i].size());
- desc.append({ 0, i, image });
+ descEntries.append({ 0, i, image });
}
+ QRhiTextureUploadDescription desc;
+ desc.setEntries(descEntries.cbegin(), descEntries.cend());
u->uploadTexture(d.tex, desc);
d.compressedData.clear();
}
@@ -182,7 +184,7 @@ void Window::customRender()
QRhiCommandBuffer *cb = m_sc->currentFrameCommandBuffer();
const QSize outputSizeInPixels = m_sc->currentPixelSize();
- cb->beginPass(m_sc->currentFrameRenderTarget(), QColor::fromRgbF(0.4f, 0.7f, 0.0f, 1.0f), { 1.0f, 0 }, u);
+ cb->beginPass(m_sc->currentFrameRenderTarget(), m_clearColor, { 1.0f, 0 }, u);
cb->setGraphicsPipeline(d.ps);
cb->setViewport({ 0, 0, float(outputSizeInPixels.width()), float(outputSizeInPixels.height()) });