From e714f5743fc32304ed9ab9e6d8141138613bd073 Mon Sep 17 00:00:00 2001 From: "yaozhong.zhang" Date: Thu, 4 Aug 2022 18:59:54 +0800 Subject: [PATCH] Correct the image barrier in ray tracing test When running the ray tracing pipeline CPU build tests, the image barrier is not actually used, as no acceleration structure commands are recorded. On the other hand, the image is used by trace ray command, instead of building acceleration structure. So, change the barrier for trace ray command. Affects: dEQP-VK.ray_tracing_pipeline.build.* Components: Vulkan VK-GL-CTS issue: 3874 Change-Id: Ie70fd57fe9f81952dff21f670a194244856c3d3b --- .../vulkancts/modules/vulkan/ray_tracing/vktRayTracingBuildTests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingBuildTests.cpp b/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingBuildTests.cpp index 97bb2fb..da969a8 100644 --- a/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingBuildTests.cpp +++ b/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingBuildTests.cpp @@ -433,7 +433,7 @@ de::MovePtr RayTracingBuildTestInstance::runTest (bool useGpuB const VkImageMemoryBarrier preImageBarrier = makeImageMemoryBarrier(0u, VK_ACCESS_TRANSFER_WRITE_BIT, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, **image, imageSubresourceRange); - const VkImageMemoryBarrier postImageBarrier = makeImageMemoryBarrier(VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR | VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, + const VkImageMemoryBarrier postImageBarrier = makeImageMemoryBarrier(VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL, **image, imageSubresourceRange); const VkMemoryBarrier postTraceMemoryBarrier = makeMemoryBarrier(VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_TRANSFER_READ_BIT); @@ -447,7 +447,7 @@ de::MovePtr RayTracingBuildTestInstance::runTest (bool useGpuB { 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); bottomLevelAccelerationStructures = initBottomAccelerationStructures(*cmdBuffer, useGpuBuild, workerThreadsCount); topLevelAccelerationStructure = initTopAccelerationStructure(*cmdBuffer, useGpuBuild, workerThreadsCount, bottomLevelAccelerationStructures); -- 2.7.4