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

cube demo has no-op barrier #1024

Closed
janharaldfredriksen-arm opened this issue Oct 6, 2016 · 1 comment
Closed

cube demo has no-op barrier #1024

janharaldfredriksen-arm opened this issue Oct 6, 2016 · 1 comment
Assignees
Milestone

Comments

@janharaldfredriksen-arm
Copy link
Contributor

demos/cube.c does this:

    VkPipelineStageFlags src_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
    VkPipelineStageFlags dest_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;

    vkCmdPipelineBarrier(demo->cmd, src_stages, dest_stages, 0, 0, NULL, 0,
                         NULL, 1, pmemory_barrier);

.. which is a no-op per the explanation in #1006.

At least one of these barriers are inserted after a vkCmdCopyImage command, so src_stages must include at least VK_PIPELINE_STAGE_TRANSFER_BIT. Having dest_stages be TOP_OF_PIPE is overly conservative, but not wrong. (I'm guessing FRAGMENT_SHADER_BIT|TRANSFER_BIT would be sufficient, but I haven't checked in detail.)

@TonyBarbour
Copy link
Contributor

Fixed with df48463

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants