Skip to content
This repository was archived by the owner on Jul 19, 2018. It is now read-only.
This repository was archived by the owner on Jul 19, 2018. It is now read-only.

Missing check for compute-to-copy barrier? #2267

Description

@hrydgard

I did a simple thing where I wrote some data to a device-local memory buffer using a compute shader, and then copied the output to an image using vkCmdCopyBufferToImage. This worked fine on nVidia but not so much on Mali - which is not surprising, because I had forgotten to add the following barrier:

VkMemoryBarrier barrier{ VK_STRUCTURE_TYPE_MEMORY_BARRIER };
barrier.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
barrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
vkCmdPipelineBarrier(cmdInit, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 
    VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, &barrier, 0, nullptr, 0, nullptr);

Adding this fixed it right up. However, the validation layer didn't trigger without it even though this barrier is clearly required, which is the bug I'm reporting here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions