summaryrefslogtreecommitdiffstats
path: root/src/gui/vulkan
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-09-10 10:04:36 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-09-12 08:34:15 +0000
commit1c6bd414dd1c8d1e87b5310cf704a2a8a2966ee4 (patch)
treed5f0f1fef18e76906165ec279b00a4003a811778 /src/gui/vulkan
parent48897f97e726dd34559b9fa213501ea24bfb692d (diff)
Fix device local alloc in hellovulkantexture
Running with QT_VK_FORCE_STAGE_TEX does not work at all with recent NVIDIA drivers due to QVulkanWindow's and the example's naive way of picking the memory index. Enhance this and add a warning note to the QVulkanWindow docs as well. Change-Id: I7f200e11d982b56e3da3b71ee3915bd7bfca5cc1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/vulkan')
-rw-r--r--src/gui/vulkan/qvulkanwindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/vulkan/qvulkanwindow.cpp b/src/gui/vulkan/qvulkanwindow.cpp
index e45a16170e..9f3655505c 100644
--- a/src/gui/vulkan/qvulkanwindow.cpp
+++ b/src/gui/vulkan/qvulkanwindow.cpp
@@ -2298,6 +2298,11 @@ uint32_t QVulkanWindow::hostVisibleMemoryIndex() const
\note Calling this function is only valid from the invocation of
QVulkanWindowRenderer::initResources() up until
QVulkanWindowRenderer::releaseResources().
+
+ \note It is not guaranteed that this memory type is always suitable. The
+ correct, cross-implementation solution - especially for device local images
+ - is to manually pick a memory type after checking the mask returned from
+ \c{vkGetImageMemoryRequirements}.
*/
uint32_t QVulkanWindow::deviceLocalMemoryIndex() const
{