aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-05-27 17:54:41 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-02 10:38:03 +0200
commitf621603692ccc76c077ba3911048d823f80e4bd5 (patch)
tree841f78439dc7a262b3a1c9f5fdae7eb57d22b7b8 /src
parent3371e1844c4505ecf8dc2be823e13a2b689bf584 (diff)
Follow QRhi create-destroy API update
Change-Id: I0bc2cbce373febcb9073f15067eebbc1723462ba Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickrendertarget.cpp6
-rw-r--r--src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp2
-rw-r--r--src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp28
-rw-r--r--src/quick/scenegraph/coreapi/qsgrhivisualizer.cpp30
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp2
-rw-r--r--src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp4
-rw-r--r--src/quick/scenegraph/qsgrhilayer.cpp16
-rw-r--r--src/quick/scenegraph/qsgrhisupport.cpp4
-rw-r--r--src/quick/scenegraph/qsgrhitextureglyphcache.cpp4
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp2
-rw-r--r--src/quick/scenegraph/util/qsgplaintexture.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgrhiatlastexture.cpp4
13 files changed, 54 insertions, 54 deletions
diff --git a/src/quick/items/qquickrendertarget.cpp b/src/quick/items/qquickrendertarget.cpp
index 924824e456..b4b8154f74 100644
--- a/src/quick/items/qquickrendertarget.cpp
+++ b/src/quick/items/qquickrendertarget.cpp
@@ -247,12 +247,12 @@ bool QQuickRenderTargetPrivate::resolve(QRhi *rhi, QQuickWindowRenderTarget *dst
case Type::NativeTexture:
{
QRhiTexture *texture = rhi->newTexture(QRhiTexture::RGBA8, pixelSize, sampleCount, QRhiTexture::RenderTarget);
- if (!texture->buildFrom({ u.nativeTexture.object, u.nativeTexture.layout })) {
+ if (!texture->createFrom({ u.nativeTexture.object, u.nativeTexture.layout })) {
qWarning("Failed to build texture for QQuickRenderTarget");
return false;
}
QRhiRenderBuffer *depthStencil = rhi->newRenderBuffer(QRhiRenderBuffer::DepthStencil, pixelSize, sampleCount);
- if (!depthStencil->build()) {
+ if (!depthStencil->create()) {
qWarning("Failed to build depth-stencil buffer for QQuickRenderTarget");
delete texture;
return false;
@@ -264,7 +264,7 @@ bool QQuickRenderTargetPrivate::resolve(QRhi *rhi, QQuickWindowRenderTarget *dst
QRhiTextureRenderTarget *rt = rhi->newTextureRenderTarget(rtDesc);
QRhiRenderPassDescriptor *rp = rt->newCompatibleRenderPassDescriptor();
rt->setRenderPassDescriptor(rp);
- if (!rt->build()) {
+ if (!rt->create()) {
qWarning("Failed to build texture render target for QQuickRenderTarget");
delete rp;
delete depthStencil;
diff --git a/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp b/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp
index 5afc681fa0..8084d5a128 100644
--- a/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp
+++ b/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp
@@ -91,7 +91,7 @@ bool Atlas::generateTexture()
if (!m_texture)
return false;
- if (!m_texture->build()) {
+ if (!m_texture->create()) {
delete m_texture;
m_texture = nullptr;
return false;
diff --git a/src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp b/src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp
index 5f00da48f2..c7176875d6 100644
--- a/src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp
+++ b/src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp
@@ -305,7 +305,7 @@ void QSGCompressedTexture::commitTextureOperations(QRhi *rhi, QRhiResourceUpdate
if (!m_texture) {
m_texture = rhi->newTexture(fmt.rhiFormat, m_size, 1, texFlags);
- if (!m_texture->build()) {
+ if (!m_texture->create()) {
qWarning("Failed to create QRhiTexture for compressed data");
delete m_texture;
m_texture = nullptr;
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index ed790fdc5c..bf26b44498 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -416,7 +416,7 @@ QRhiShaderResourceBindings *ShaderManager::srb(const ShaderResourceBindingList &
QRhiShaderResourceBindings *srb = context->rhi()->newShaderResourceBindings();
srb->setBindings(bindings.cbegin(), bindings.cend());
- if (srb->build()) {
+ if (srb->create()) {
srbCache.insert(bindings, srb);
} else {
qWarning("Failed to build srb");
@@ -1177,7 +1177,7 @@ void Renderer::unmap(Buffer *buffer, bool isIndexBuf)
buffer->buf = m_rhi->newBuffer(QRhiBuffer::Immutable,
isIndexBuf ? QRhiBuffer::IndexBuffer : QRhiBuffer::VertexBuffer,
buffer->size);
- if (!buffer->buf->build())
+ if (!buffer->buf->create())
qWarning("Failed to build vertex/index buffer of size %d", buffer->size);
// else
// qDebug("created rhibuf %p size %d", buffer->buf, buffer->size);
@@ -1196,7 +1196,7 @@ void Renderer::unmap(Buffer *buffer, bool isIndexBuf)
}
if (needsRebuild) {
//qDebug("rebuilding rhibuf %p size %d type Dynamic", buffer->buf, buffer->size);
- buffer->buf->build();
+ buffer->buf->create();
}
}
if (buffer->buf->type() != QRhiBuffer::Dynamic) {
@@ -2656,7 +2656,7 @@ QRhiGraphicsPipeline *Renderer::buildStencilPipeline(const Batch *batch, bool fi
ps->setShaderResourceBindings(batch->stencilClipState.srb); // use something, it just needs to be layout-compatible
ps->setRenderPassDescriptor(renderPassDescriptor());
- if (!ps->build()) {
+ if (!ps->create()) {
qWarning("Failed to build stencil clip pipeline");
delete ps;
return nullptr;
@@ -2775,7 +2775,7 @@ void Renderer::updateClipState(const QSGClipNode *clipList, Batch *batch) // RHI
rebuildVBuf = true;
}
if (rebuildVBuf) {
- if (!batch->stencilClipState.vbuf->build()) {
+ if (!batch->stencilClipState.vbuf->create()) {
qWarning("Failed to build stencil clip vertex buffer");
delete batch->stencilClipState.vbuf;
batch->stencilClipState.vbuf = nullptr;
@@ -2793,7 +2793,7 @@ void Renderer::updateClipState(const QSGClipNode *clipList, Batch *batch) // RHI
rebuildIBuf = true;
}
if (rebuildIBuf) {
- if (!batch->stencilClipState.ibuf->build()) {
+ if (!batch->stencilClipState.ibuf->create()) {
qWarning("Failed to build stencil clip index buffer");
delete batch->stencilClipState.ibuf;
batch->stencilClipState.ibuf = nullptr;
@@ -2811,7 +2811,7 @@ void Renderer::updateClipState(const QSGClipNode *clipList, Batch *batch) // RHI
rebuildUBuf = true;
}
if (rebuildUBuf) {
- if (!batch->stencilClipState.ubuf->build()) {
+ if (!batch->stencilClipState.ubuf->create()) {
qWarning("Failed to build stencil clip uniform buffer");
delete batch->stencilClipState.ubuf;
batch->stencilClipState.ubuf = nullptr;
@@ -2824,7 +2824,7 @@ void Renderer::updateClipState(const QSGClipNode *clipList, Batch *batch) // RHI
const QRhiShaderResourceBinding ubufBinding = QRhiShaderResourceBinding::uniformBufferWithDynamicOffset(
0, QRhiShaderResourceBinding::VertexStage, batch->stencilClipState.ubuf, StencilClipUbufSize);
batch->stencilClipState.srb->setBindings({ ubufBinding });
- if (!batch->stencilClipState.srb->build()) {
+ if (!batch->stencilClipState.srb->create()) {
qWarning("Failed to build stencil clip srb");
delete batch->stencilClipState.srb;
batch->stencilClipState.srb = nullptr;
@@ -3300,7 +3300,7 @@ bool Renderer::ensurePipelineState(Element *e, const ShaderManager::Shader *sms)
ps->setLineWidth(m_gstate.lineWidth);
//qDebug("building new ps %p", ps);
- if (!ps->build()) {
+ if (!ps->create()) {
qWarning("Failed to build graphics pipeline state");
delete ps;
return false;
@@ -3389,7 +3389,7 @@ QRhiTexture *Renderer::dummyTexture()
{
if (!m_dummyTexture) {
m_dummyTexture = m_rhi->newTexture(QRhiTexture::RGBA8, QSize(64, 64));
- if (m_dummyTexture->build()) {
+ if (m_dummyTexture->create()) {
if (m_resourceUpdates) {
QImage img(m_dummyTexture->pixelSize(), QImage::Format_RGBA8888_Premultiplied);
img.fill(0);
@@ -3488,7 +3488,7 @@ void Renderer::updateMaterialDynamicData(ShaderManager::Shader *sms,
Q_ASSERT(sampler);
} else {
sampler = newSampler(m_rhi, samplerDesc);
- if (!sampler->build()) {
+ if (!sampler->create()) {
qWarning("Failed to build sampler");
delete sampler;
continue;
@@ -3619,7 +3619,7 @@ bool Renderer::prepareRenderMergedBatch(Batch *batch, PreparedRenderBatch *rende
}
if (ubufRebuild) {
batch->ubufDataValid = false;
- if (!batch->ubuf->build()) {
+ if (!batch->ubuf->create()) {
qWarning("Failed to build uniform buffer of size %d bytes", ubufSize);
delete batch->ubuf;
batch->ubuf = nullptr;
@@ -3796,7 +3796,7 @@ bool Renderer::prepareRenderUnmergedBatch(Batch *batch, PreparedRenderBatch *ren
}
if (ubufRebuild) {
batch->ubufDataValid = false;
- if (!batch->ubuf->build()) {
+ if (!batch->ubuf->create()) {
qWarning("Failed to build uniform buffer of size %d bytes", totalUBufSize);
delete batch->ubuf;
batch->ubuf = nullptr;
@@ -4624,7 +4624,7 @@ void Renderer::invalidatePipelineCacheDependency(QRhiRenderPassDescriptor *rpDes
if (it.key().compatibleRenderPassDescriptor == rpDesc) {
QRhiGraphicsPipeline *ps = it.value();
it = m_shaderManager->pipelineCache.erase(it);
- ps->releaseAndDestroyLater(); // QRhi takes care of it in endFrame()
+ ps->deleteLater(); // QRhi takes care of it in endFrame()
} else {
++it;
}
diff --git a/src/quick/scenegraph/coreapi/qsgrhivisualizer.cpp b/src/quick/scenegraph/coreapi/qsgrhivisualizer.cpp
index a0131a3f67..3468cc270d 100644
--- a/src/quick/scenegraph/coreapi/qsgrhivisualizer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrhivisualizer.cpp
@@ -195,14 +195,14 @@ void RhiVisualizer::Fade::prepare(RhiVisualizer *visualizer,
if (!vbuf) {
float v[] = { -1, 1, 1, 1, -1, -1, 1, -1 };
vbuf = rhi->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, sizeof(v));
- if (!vbuf->build())
+ if (!vbuf->create())
return;
u->uploadStaticBuffer(vbuf, v);
}
if (!ubuf) {
ubuf = rhi->newBuffer(QRhiBuffer::Dynamic, QRhiBuffer::UniformBuffer, DrawCall::UBUF_SIZE);
- if (!ubuf->build())
+ if (!ubuf->create())
return;
float bgOpacity = 0.8f;
if (visualizer->m_visualizeMode == Visualizer::VisualizeBatches)
@@ -221,7 +221,7 @@ void RhiVisualizer::Fade::prepare(RhiVisualizer *visualizer,
if (!srb) {
srb = rhi->newShaderResourceBindings();
srb->setBindings({ QRhiShaderResourceBinding::uniformBuffer(0, ubufVisibility, ubuf) });
- if (!srb->build())
+ if (!srb->create())
return;
}
@@ -239,7 +239,7 @@ void RhiVisualizer::Fade::prepare(RhiVisualizer *visualizer,
ps->setVertexInputLayout(inputLayout);
ps->setShaderResourceBindings(srb);
ps->setRenderPassDescriptor(rpDesc);
- if (!ps->build())
+ if (!ps->create())
return;
}
}
@@ -294,11 +294,11 @@ static bool ensureBuffer(QRhi *rhi, QRhiBuffer **buf, QRhiBuffer::UsageFlags usa
{
if (!*buf) {
*buf = rhi->newBuffer(QRhiBuffer::Dynamic, usage, newSize);
- if (!(*buf)->build())
+ if (!(*buf)->create())
return false;
} else if ((*buf)->size() < newSize) {
(*buf)->setSize(newSize);
- if (!(*buf)->build())
+ if (!(*buf)->create())
return false;
}
return true;
@@ -339,7 +339,7 @@ QRhiGraphicsPipeline *RhiVisualizer::PipelineCache::pipeline(RhiVisualizer *visu
ps->setVertexInputLayout(inputLayout);
ps->setShaderResourceBindings(srb);
ps->setRenderPassDescriptor(rpDesc);
- if (!ps->build())
+ if (!ps->create())
return nullptr;
Pipeline p;
@@ -453,7 +453,7 @@ void RhiVisualizer::ChangeVis::prepare(Node *n, RhiVisualizer *visualizer,
if (!srb) {
srb = rhi->newShaderResourceBindings();
srb->setBindings({ QRhiShaderResourceBinding::uniformBufferWithDynamicOffset(0, ubufVisibility, ubuf, DrawCall::UBUF_SIZE) });
- if (!srb->build())
+ if (!srb->create())
return;
}
}
@@ -591,7 +591,7 @@ void RhiVisualizer::BatchVis::prepare(const QDataBuffer<Batch *> &opaqueBatches,
if (!srb) {
srb = rhi->newShaderResourceBindings();
srb->setBindings({ QRhiShaderResourceBinding::uniformBufferWithDynamicOffset(0, ubufVisibility, ubuf, DrawCall::UBUF_SIZE) });
- if (!srb->build())
+ if (!srb->create())
return;
}
}
@@ -685,7 +685,7 @@ void RhiVisualizer::ClipVis::prepare(QSGNode *node, RhiVisualizer *visualizer,
if (!srb) {
srb = rhi->newShaderResourceBindings();
srb->setBindings({ QRhiShaderResourceBinding::uniformBufferWithDynamicOffset(0, ubufVisibility, ubuf, DrawCall::UBUF_SIZE) });
- if (!srb->build())
+ if (!srb->create())
return;
}
}
@@ -793,14 +793,14 @@ void RhiVisualizer::OverdrawVis::prepare(Node *n, RhiVisualizer *visualizer,
1, 1, 0, 1, 1, 1
};
box.vbuf = rhi->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, sizeof(v));
- if (!box.vbuf->build())
+ if (!box.vbuf->create())
return;
u->uploadStaticBuffer(box.vbuf, v);
}
if (!box.ubuf) {
box.ubuf = rhi->newBuffer(QRhiBuffer::Dynamic, QRhiBuffer::UniformBuffer, DrawCall::UBUF_SIZE);
- if (!box.ubuf->build())
+ if (!box.ubuf->create())
return;
QMatrix4x4 ident;
u->updateDynamicBuffer(box.ubuf, 0, 64, ident.constData());
@@ -817,7 +817,7 @@ void RhiVisualizer::OverdrawVis::prepare(Node *n, RhiVisualizer *visualizer,
if (!box.srb) {
box.srb = rhi->newShaderResourceBindings();
box.srb->setBindings({ QRhiShaderResourceBinding::uniformBuffer(0, ubufVisibility, box.ubuf) });
- if (!box.srb->build())
+ if (!box.srb->create())
return;
}
@@ -840,7 +840,7 @@ void RhiVisualizer::OverdrawVis::prepare(Node *n, RhiVisualizer *visualizer,
box.ps->setVertexInputLayout(inputLayout);
box.ps->setShaderResourceBindings(box.srb);
box.ps->setRenderPassDescriptor(visualizer->m_renderer->renderPassDescriptor());
- if (!box.ps->build())
+ if (!box.ps->create())
return;
}
@@ -881,7 +881,7 @@ void RhiVisualizer::OverdrawVis::prepare(Node *n, RhiVisualizer *visualizer,
if (!srb) {
srb = rhi->newShaderResourceBindings();
srb->setBindings({ QRhiShaderResourceBinding::uniformBufferWithDynamicOffset(0, ubufVisibility, ubuf, DrawCall::UBUF_SIZE) });
- if (!srb->build())
+ if (!srb->create())
return;
}
}
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 61837fb7bb..12797c196b 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -716,7 +716,7 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window)
if (cd->swapchainJustBecameRenderable)
qCDebug(QSG_LOG_RENDERLOOP, "just became exposed");
- cd->hasActiveSwapchain = cd->swapchain->buildOrResize();
+ cd->hasActiveSwapchain = cd->swapchain->createOrResize();
if (!cd->hasActiveSwapchain && rhi->isDeviceLost()) {
handleDeviceLoss();
return;
diff --git a/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
index 53b6fe117f..851da3dc8e 100644
--- a/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
+++ b/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
@@ -227,7 +227,7 @@ void QSGRhiDistanceFieldGlyphCache::createTexture(TextureInfo *texInfo,
}
texInfo->texture = m_rhi->newTexture(QRhiTexture::RED_OR_ALPHA8, QSize(width, height), 1, QRhiTexture::UsedAsTransferSource);
- if (texInfo->texture->build()) {
+ if (texInfo->texture->create()) {
if (!m_resourceUpdates)
m_resourceUpdates = m_rhi->nextResourceUpdateBatch();
@@ -555,7 +555,7 @@ void QSGRhiDistanceFieldGlyphCache::commitResourceUpdates(QRhiResourceUpdateBatc
// now let's assume the resource updates will be committed in this frame
for (QRhiTexture *t : m_pendingDispose)
- t->releaseAndDestroyLater(); // will be releaseAndDestroyed after the frame is submitted -> safe
+ t->deleteLater(); // will be deleted after the frame is submitted -> safe
m_pendingDispose.clear();
}
diff --git a/src/quick/scenegraph/qsgrhilayer.cpp b/src/quick/scenegraph/qsgrhilayer.cpp
index 4abd54fe94..e5c0fc4de0 100644
--- a/src/quick/scenegraph/qsgrhilayer.cpp
+++ b/src/quick/scenegraph/qsgrhilayer.cpp
@@ -278,20 +278,20 @@ void QSGRhiLayer::grab()
if (m_multisampling) {
releaseResources();
m_msaaColorBuffer = m_rhi->newRenderBuffer(QRhiRenderBuffer::Color, m_size, effectiveSamples);
- if (!m_msaaColorBuffer->build()) {
+ if (!m_msaaColorBuffer->create()) {
qWarning("Failed to build multisample color buffer for layer of size %dx%d, sample count %d",
m_size.width(), m_size.height(), effectiveSamples);
releaseResources();
return;
}
m_texture = m_rhi->newTexture(m_format, m_size, 1, textureFlags);
- if (!m_texture->build()) {
+ if (!m_texture->create()) {
qWarning("Failed to build texture for layer of size %dx%d", m_size.width(), m_size.height());
releaseResources();
return;
}
m_ds = m_rhi->newRenderBuffer(QRhiRenderBuffer::DepthStencil, m_size, effectiveSamples);
- if (!m_ds->build()) {
+ if (!m_ds->create()) {
qWarning("Failed to build depth-stencil buffer for layer");
releaseResources();
return;
@@ -309,7 +309,7 @@ void QSGRhiLayer::grab()
return;
}
m_rt->setRenderPassDescriptor(m_rtRp);
- if (!m_rt->build()) {
+ if (!m_rt->create()) {
qWarning("Failed to build texture render target for layer");
releaseResources();
return;
@@ -317,13 +317,13 @@ void QSGRhiLayer::grab()
} else {
releaseResources();
m_texture = m_rhi->newTexture(m_format, m_size, 1, textureFlags);
- if (!m_texture->build()) {
+ if (!m_texture->create()) {
qWarning("Failed to build texture for layer of size %dx%d", m_size.width(), m_size.height());
releaseResources();
return;
}
m_ds = m_rhi->newRenderBuffer(QRhiRenderBuffer::DepthStencil, m_size);
- if (!m_ds->build()) {
+ if (!m_ds->create()) {
qWarning("Failed to build depth-stencil buffer for layer");
releaseResources();
return;
@@ -333,7 +333,7 @@ void QSGRhiLayer::grab()
// Here rt is associated with m_secondaryTexture instead of m_texture.
// We will issue a copy to m_texture afterwards.
m_secondaryTexture = m_rhi->newTexture(m_format, m_size, 1, textureFlags);
- if (!m_secondaryTexture->build()) {
+ if (!m_secondaryTexture->create()) {
qWarning("Failed to build texture for layer of size %dx%d", m_size.width(), m_size.height());
releaseResources();
return;
@@ -348,7 +348,7 @@ void QSGRhiLayer::grab()
return;
}
m_rt->setRenderPassDescriptor(m_rtRp);
- if (!m_rt->build()) {
+ if (!m_rt->create()) {
qWarning("Failed to build texture render target for layer");
releaseResources();
return;
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp
index df1a0e072c..44ba2c54c1 100644
--- a/src/quick/scenegraph/qsgrhisupport.cpp
+++ b/src/quick/scenegraph/qsgrhisupport.cpp
@@ -687,14 +687,14 @@ QImage QSGRhiSupport::grabOffscreen(QQuickWindow *window)
const QSize pixelSize = window->size() * window->devicePixelRatio();
QScopedPointer<QRhiTexture> texture(rhi->newTexture(QRhiTexture::RGBA8, pixelSize, 1,
QRhiTexture::RenderTarget | QRhiTexture::UsedAsTransferSource));
- if (!texture->build()) {
+ if (!texture->create()) {
qWarning("Failed to build texture for offscreen readback");
return QImage();
}
QScopedPointer<QRhiTextureRenderTarget> rt(rhi->newTextureRenderTarget({ texture.data() }));
QScopedPointer<QRhiRenderPassDescriptor> rpDesc(rt->newCompatibleRenderPassDescriptor());
rt->setRenderPassDescriptor(rpDesc.data());
- if (!rt->build()) {
+ if (!rt->create()) {
qWarning("Failed to build render target for offscreen readback");
return QImage();
}
diff --git a/src/quick/scenegraph/qsgrhitextureglyphcache.cpp b/src/quick/scenegraph/qsgrhitextureglyphcache.cpp
index 89c9ea4d5b..45ebe31921 100644
--- a/src/quick/scenegraph/qsgrhitextureglyphcache.cpp
+++ b/src/quick/scenegraph/qsgrhitextureglyphcache.cpp
@@ -68,7 +68,7 @@ QSGRhiTextureGlyphCache::~QSGRhiTextureGlyphCache()
QRhiTexture *QSGRhiTextureGlyphCache::createEmptyTexture(QRhiTexture::Format format)
{
QRhiTexture *t = m_rhi->newTexture(format, m_size, 1, QRhiTexture::UsedAsTransferSource);
- if (!t->build()) {
+ if (!t->create()) {
qWarning("Failed to build new glyph cache texture of size %dx%d", m_size.width(), m_size.height());
return nullptr;
}
@@ -259,7 +259,7 @@ void QSGRhiTextureGlyphCache::commitResourceUpdates(QRhiResourceUpdateBatch *mer
// now let's assume the resource updates will be committed in this frame
for (QRhiTexture *t : m_pendingDispose)
- t->releaseAndDestroyLater(); // will be releaseAndDestroyed after the frame is submitted -> safe
+ t->deleteLater(); // will be deleted after the frame is submitted -> safe
m_pendingDispose.clear();
}
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index e59b4aaabc..1318b2c034 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -734,7 +734,7 @@ void QSGRenderThread::syncAndRender(QImage *grabImage)
if (cd->swapchainJustBecameRenderable)
qCDebug(QSG_LOG_RENDERLOOP, QSG_RT_PAD, "just became exposed");
- cd->hasActiveSwapchain = cd->swapchain->buildOrResize();
+ cd->hasActiveSwapchain = cd->swapchain->createOrResize();
if (!cd->hasActiveSwapchain && rhi->isDeviceLost()) {
handleDeviceLoss();
QCoreApplication::postEvent(window, new QEvent(QEvent::Type(QQuickWindowPrivate::FullUpdateRequest)));
diff --git a/src/quick/scenegraph/util/qsgplaintexture.cpp b/src/quick/scenegraph/util/qsgplaintexture.cpp
index 35d204fed2..55ea0bf181 100644
--- a/src/quick/scenegraph/util/qsgplaintexture.cpp
+++ b/src/quick/scenegraph/util/qsgplaintexture.cpp
@@ -299,7 +299,7 @@ void QSGPlainTexture::setTextureFromNativeObject(QRhi *rhi, QQuickWindow::Native
QRhiTexture *t = rhi->newTexture(QRhiTexture::RGBA8, size, 1, flags);
// ownership of the native object is never taken
- t->buildFrom({nativeObjectHandle, nativeLayout});
+ t->createFrom({nativeObjectHandle, nativeLayout});
setTexture(t);
}
@@ -438,7 +438,7 @@ void QSGPlainTexture::commitTextureOperations(QRhi *rhi, QRhiResourceUpdateBatch
}
if (needsRebuild) {
- if (!m_texture->build()) {
+ if (!m_texture->create()) {
qWarning("Failed to build texture for QSGPlainTexture (size %dx%d)",
m_texture_size.width(), m_texture_size.height());
return;
diff --git a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
index e7430a47d4..ce697a13fc 100644
--- a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
@@ -256,7 +256,7 @@ bool Atlas::generateTexture()
if (!m_texture)
return false;
- if (!m_texture->build()) {
+ if (!m_texture->create()) {
delete m_texture;
m_texture = nullptr;
return false;
@@ -442,7 +442,7 @@ QSGTexture *Texture::removedFromAtlas(QRhiResourceUpdateBatch *resourceUpdates)
const QRect r = atlasSubRectWithoutPadding();
QRhiTexture *extractTex = rhi->newTexture(m_atlas->texture()->format(), r.size());
- if (extractTex->build()) {
+ if (extractTex->create()) {
bool ownResUpd = false;
QRhiResourceUpdateBatch *resUpd = resourceUpdates;
if (!resUpd) {