forked from AuroraMiddleware/gtk
vulkan/image: Set HOST and TRANSFER bits for before barriers
Multiple images in the before barrier array are defined with VK_ACCESS_TRANSFER_WRITE_BIT and VK_ACCESS_TRANSFER_READ_BIT, which requires passing VK_PIPELINE_STAGE_TRANSFER_BIT and VK_PIPELINE_STAGE_HOST_BIT to vkCmdPipelineBarrier(). Pass these flags correctly.
This commit is contained in:
parent
a91d0ac156
commit
0b2006b74f
@ -142,13 +142,15 @@ gsk_vulkan_uploader_get_copy_buffer (GskVulkanUploader *self)
|
||||
void
|
||||
gsk_vulkan_uploader_upload (GskVulkanUploader *self)
|
||||
{
|
||||
VkPipelineStageFlagBits host_and_transfer_bits = VK_PIPELINE_STAGE_HOST_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT;
|
||||
|
||||
if (self->before_buffer_barriers->len > 0 || self->before_image_barriers->len > 0)
|
||||
{
|
||||
VkCommandBuffer command_buffer;
|
||||
|
||||
command_buffer = gsk_vulkan_command_pool_get_buffer (self->command_pool);
|
||||
vkCmdPipelineBarrier (command_buffer,
|
||||
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
|
||||
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | host_and_transfer_bits,
|
||||
VK_PIPELINE_STAGE_HOST_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT,
|
||||
0,
|
||||
0, NULL,
|
||||
@ -164,7 +166,7 @@ gsk_vulkan_uploader_upload (GskVulkanUploader *self)
|
||||
{
|
||||
VkCommandBuffer command_buffer = gsk_vulkan_uploader_get_copy_buffer (self);
|
||||
vkCmdPipelineBarrier (command_buffer,
|
||||
VK_PIPELINE_STAGE_HOST_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT,
|
||||
host_and_transfer_bits,
|
||||
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
|
||||
0,
|
||||
0, NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user