aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-09-11 14:29:51 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-09-11 15:10:25 +0200
commitd38bac596946c3dd9cce3c0b4127509421dc917d (patch)
tree718cc784b06e18941d064574b50bf20be050c7cf /examples/quick
parent1bb96cfcce47152c578bcc9a7c2ad80b0f0e6553 (diff)
Fix gcc warnings in vulkanunderqml example
Change-Id: Iea81662f39d2a128cea0e83a766395e0fb1e9896 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'examples/quick')
-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 59e9606e7b..6e24391257 100644
--- a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp
+++ b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp
@@ -362,13 +362,13 @@ void SquircleRenderer::init(int framesInFlight)
}
}
}
- if (memTypeIndex < 0)
+ if (memTypeIndex == uint32_t(-1))
qFatal("Failed to find host visible and coherent memory type");
allocInfo.memoryTypeIndex = memTypeIndex;
err = m_devFuncs->vkAllocateMemory(m_dev, &allocInfo, nullptr, &m_vbufMem);
if (err != VK_SUCCESS)
- qFatal("Failed to allocate vertex buffer memory of size %llu: %d", allocInfo.allocationSize, err);
+ qFatal("Failed to allocate vertex buffer memory of size %u: %d", uint(allocInfo.allocationSize), err);
void *p = nullptr;
err = m_devFuncs->vkMapMemory(m_dev, m_vbufMem, 0, allocInfo.allocationSize, 0, &p);
@@ -412,14 +412,14 @@ void SquircleRenderer::init(int framesInFlight)
}
}
}
- if (memTypeIndex < 0)
+ if (memTypeIndex == uint32_t(-1))
qFatal("Failed to find host visible and coherent memory type");
allocInfo.allocationSize = framesInFlight * m_allocPerUbuf;
allocInfo.memoryTypeIndex = memTypeIndex;
err = m_devFuncs->vkAllocateMemory(m_dev, &allocInfo, nullptr, &m_ubufMem);
if (err != VK_SUCCESS)
- qFatal("Failed to allocate uniform buffer memory of size %llu: %d", allocInfo.allocationSize, err);
+ qFatal("Failed to allocate uniform buffer memory of size %u: %d", uint(allocInfo.allocationSize), err);
err = m_devFuncs->vkBindBufferMemory(m_dev, m_ubuf, m_ubufMem, 0);
if (err != VK_SUCCESS)