summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-09-10 09:45:16 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-09-12 08:34:11 +0000
commit48897f97e726dd34559b9fa213501ea24bfb692d (patch)
treefeec78d8890beea8332b5026ebe911293e9a5825 /examples
parent73af8e75534732f64b606131d53460bd22d212de (diff)
Fix src access with staging buffer in hellovulkantexture
Change-Id: Iafcd94ec812a61dcfae6da43b1ca9f5771e05e56 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/vulkan/hellovulkantexture/hellovulkantexture.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp b/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp
index 67ae0ca5dc..c3dc891efa 100644
--- a/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp
+++ b/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp
@@ -294,12 +294,12 @@ void VulkanRenderer::ensureTexture()
barrier.oldLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
barrier.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
- barrier.srcAccessMask = 0; // VK_ACCESS_HOST_WRITE_BIT ### no, keep validation layer happy (??)
+ barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
barrier.image = m_texImage;
m_devFuncs->vkCmdPipelineBarrier(cb,
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
+ VK_PIPELINE_STAGE_HOST_BIT,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
0, 0, nullptr, 0, nullptr,
1, &barrier);
@@ -312,7 +312,7 @@ void VulkanRenderer::ensureTexture()
barrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
barrier.image = m_texStaging;
m_devFuncs->vkCmdPipelineBarrier(cb,
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
+ VK_PIPELINE_STAGE_HOST_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT,
0, 0, nullptr, 0, nullptr,
1, &barrier);