Set correct pipeline barrier between clear image and trace ray
authorYun Shu <yun.shu@arm.com>
Mon, 5 Dec 2022 08:20:43 +0000 (16:20 +0800)
committerPiotr Byszewski <piotr.byszewski@mobica.com>
Fri, 16 Dec 2022 08:25:18 +0000 (08:25 +0000)
The image is cleared with fixed value, then used as write destination
in ray tracing shaders. The pipeline barrier set for the image is
incorrect between clear command and trace ray command.

Affects:

dEQP-VK.ray_tracing_pipeline.large_shader_set.*

Components: Vulkan

VK-GL-CTS issue: 4137

Change-Id: I41dd55d51ea995c4c878e053f6d617b2e38ba5b1

external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingBuildLargeTests.cpp

index 2a6d2c5..6a04ad9 100644 (file)
@@ -411,7 +411,7 @@ de::MovePtr<BufferWithMemory> RayTracingBuildLargeTestInstance::runTest (const d
        {
                cmdPipelineImageMemoryBarrier(vkd, *cmdBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, &preImageBarrier);
                vkd.cmdClearColorImage(*cmdBuffer, **image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clearValue.color, 1, &imageSubresourceRange);
-               cmdPipelineImageMemoryBarrier(vkd, *cmdBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, &postImageBarrier);
+               cmdPipelineImageMemoryBarrier(vkd, *cmdBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, &postImageBarrier);
 
                bottomLevelAccelerationStructure        = initBottomAccelerationStructure(*cmdBuffer);
                topLevelAccelerationStructure           = initTopAccelerationStructure(*cmdBuffer, bottomLevelAccelerationStructure);