-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
The following test seems to be wrong because the image layout transition is counted as a write operation and therefore it's required to specify VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT in the dstAccessMask.
image_barrier_test("Graphics fragment read from sampled image, Graphics write to color attachment",
THSVS_ACCESS_FRAGMENT_SHADER_READ_SAMPLED_IMAGE_OR_UNIFORM_TEXEL_BUFFER,
THSVS_ACCESS_COLOR_ATTACHMENT_WRITE,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
0,
0,
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
The problem might be in thsvsGetVulkanImageMemoryBarrier in this block:
if (pVkBarrier->srcAccessMask != 0)
pVkBarrier->dstAccessMask |= pNextAccessInfo->accessMask;
I think this code should run after determining the layout to see if a layout transition is specified and then set the dstaccessMask even when the srcAccessMask is 0.
For reference here is this exact synchronization example:
Metadata
Metadata
Assignees
Labels
No labels