summaryrefslogtreecommitdiff
path: root/gsk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-09-26 18:18:31 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-09-26 18:18:31 -0400
commit145e4fde92182b89c278e20cc0dc66ac820a8ea4 (patch)
treef48c3626dfa35588d3ae2cf439e125b6bbd3e1f0 /gsk
parentd812fc8a941e8633bc629e47505efa1b3b7af815 (diff)
downloadgtk+-145e4fde92182b89c278e20cc0dc66ac820a8ea4.tar.gz
gsk: Fix Vulkan validation errors for image upload
I've finally figured out the right combination of src and dest stage and access flags to make all validation warnings go away. This commit only fixes the direct upload code.
Diffstat (limited to 'gsk')
-rw-r--r--gsk/gskvulkanimage.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/gsk/gskvulkanimage.c b/gsk/gskvulkanimage.c
index d09a109e52..1eb9c3a96e 100644
--- a/gsk/gskvulkanimage.c
+++ b/gsk/gskvulkanimage.c
@@ -148,12 +148,8 @@ gsk_vulkan_uploader_upload (GskVulkanUploader *self)
command_buffer = gsk_vulkan_command_pool_get_buffer (self->command_pool);
vkCmdPipelineBarrier (command_buffer,
-#if 0
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
-#endif
- VK_PIPELINE_STAGE_TRANSFER_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
+ VK_PIPELINE_STAGE_HOST_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT,
0,
0, NULL,
self->before_buffer_barriers->len, (VkBufferMemoryBarrier *) self->before_buffer_barriers->data,
@@ -168,12 +164,8 @@ gsk_vulkan_uploader_upload (GskVulkanUploader *self)
{
VkCommandBuffer command_buffer = gsk_vulkan_uploader_get_copy_buffer (self);
vkCmdPipelineBarrier (command_buffer,
-#if 0
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
-#endif
- VK_PIPELINE_STAGE_VERTEX_SHADER_BIT,
- VK_PIPELINE_STAGE_VERTEX_SHADER_BIT,
+ VK_PIPELINE_STAGE_HOST_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
0,
0, NULL,
self->after_buffer_barriers->len, (VkBufferMemoryBarrier *) self->after_buffer_barriers->data,