aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/vulkanunderqml
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-09-16 15:51:21 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-09-18 02:27:10 +0000
commit89d654fcd4f06311c69393d5a1e1fbc8932347a1 (patch)
tree15ed158c2bbbf6f60de325bd0b8d2fea1d2199d8 /examples/quick/scenegraph/vulkanunderqml
parentdbf40f74de81e2780e3b14e35704750a2e44d978 (diff)
Clean up GraphicsStateInfo after API review
Change-Id: I715ad71153151a0e6521bc182227d9fa2dc0a3ea Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'examples/quick/scenegraph/vulkanunderqml')
-rw-r--r--examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp
index 6e24391257..21f46a25c1 100644
--- a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp
+++ b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp
@@ -212,7 +212,7 @@ void SquircleRenderer::frameStart()
prepareShader(FragmentStage);
if (!m_initialized)
- init(m_window->graphicsStateInfo()->framesInFlight);
+ init(m_window->graphicsStateInfo().framesInFlight);
}
static const float vertices[] = {
@@ -230,10 +230,10 @@ void SquircleRenderer::mainPassRecordingStart()
// the scenegraph's main renderpass. It does not create its own passes,
// rendertargets, etc. so no synchronization is needed.
- const QQuickWindow::GraphicsStateInfo *stateInfo = m_window->graphicsStateInfo();
+ const QQuickWindow::GraphicsStateInfo &stateInfo(m_window->graphicsStateInfo());
QSGRendererInterface *rif = m_window->rendererInterface();
- VkDeviceSize ubufOffset = stateInfo->currentFrameSlot * m_allocPerUbuf;
+ VkDeviceSize ubufOffset = stateInfo.currentFrameSlot * m_allocPerUbuf;
void *p = nullptr;
VkResult err = m_devFuncs->vkMapMemory(m_dev, m_ubufMem, ubufOffset, m_allocPerUbuf, 0, &p);
if (err != VK_SUCCESS || !p)
@@ -259,7 +259,7 @@ void SquircleRenderer::mainPassRecordingStart()
VkDeviceSize vbufOffset = 0;
m_devFuncs->vkCmdBindVertexBuffers(cb, 0, 1, &m_vbuf, &vbufOffset);
- uint32_t dynamicOffset = m_allocPerUbuf * stateInfo->currentFrameSlot;
+ uint32_t dynamicOffset = m_allocPerUbuf * stateInfo.currentFrameSlot;
m_devFuncs->vkCmdBindDescriptorSets(cb, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout, 0, 1,
&m_ubufDescriptor, 1, &dynamicOffset);