From: Ilkka Saarelainen Date: Wed, 2 Feb 2022 13:37:18 +0000 (+0200) Subject: Fix validation errors in compute tests X-Git-Tag: upstream/1.3.5~332^2~3^2~4^2^2~2^2~1^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7854248eb3687c19dd841215d848ab3051891d6;p=platform%2Fupstream%2FVK-GL-CTS.git Fix validation errors in compute tests This CL fixes various validation errors in compute tests. Affects: dEQP-VK.compute.basic.image_barrier* dEQP-VK.compute.cooperative_matrix.* Components: Vulkan VK-GL-CTS Issue: 3451 Change-Id: I33037a50d10a5cf8098c33b55ba42900f97f0019 --- diff --git a/external/vulkancts/modules/vulkan/compute/vktComputeBasicComputeShaderTests.cpp b/external/vulkancts/modules/vulkan/compute/vktComputeBasicComputeShaderTests.cpp index 5aac8b3..7a0f88a 100644 --- a/external/vulkancts/modules/vulkan/compute/vktComputeBasicComputeShaderTests.cpp +++ b/external/vulkancts/modules/vulkan/compute/vktComputeBasicComputeShaderTests.cpp @@ -2272,7 +2272,7 @@ tcu::TestStatus ImageBarrierTestInstance::iterate (void) const VkImageMemoryBarrier imageBarrierBetweenShaders = makeImageMemoryBarrier( VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, - VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, + VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, *image, subresourceRange); const VkBufferMemoryBarrier afterComputeBarrier = makeBufferMemoryBarrier(VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_HOST_READ_BIT, *outputBuffer, 0ull, outputBufferSizeBytes); @@ -2908,7 +2908,7 @@ tcu::TestStatus DeviceIndexTestInstance::iterate (void) vk.cmdSetDeviceMask(*cmdBuffer, physDevMask); vk.cmdDispatch(*cmdBuffer, m_workSize.x(), m_workSize.y(), m_workSize.z()); - vk.cmdPipelineBarrier(*cmdBuffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_HOST_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 1, &shaderWriteBarrier, 0, (const VkImageMemoryBarrier*)DE_NULL); + vk.cmdPipelineBarrier(*cmdBuffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 1, &shaderWriteBarrier, 0, (const VkImageMemoryBarrier*)DE_NULL); endCommandBuffer(vk, *cmdBuffer); submitCommandsAndWait(vk, device, queue, *cmdBuffer, true, physDevMask); diff --git a/external/vulkancts/modules/vulkan/compute/vktComputeCooperativeMatrixTests.cpp b/external/vulkancts/modules/vulkan/compute/vktComputeCooperativeMatrixTests.cpp index 1bf24d2..c45310a 100644 --- a/external/vulkancts/modules/vulkan/compute/vktComputeCooperativeMatrixTests.cpp +++ b/external/vulkancts/modules/vulkan/compute/vktComputeCooperativeMatrixTests.cpp @@ -807,13 +807,15 @@ tcu::TestStatus CooperativeMatrixTestInstance::iterate (void) try { buffers[i] = de::MovePtr(new BufferWithMemory( - vk, device, allocator, makeBufferCreateInfo(bufferSizes[i], VK_BUFFER_USAGE_STORAGE_BUFFER_BIT|VK_BUFFER_USAGE_TRANSFER_DST_BIT|VK_BUFFER_USAGE_TRANSFER_SRC_BIT|VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT), + vk, device, allocator, makeBufferCreateInfo(bufferSizes[i], VK_BUFFER_USAGE_STORAGE_BUFFER_BIT|VK_BUFFER_USAGE_TRANSFER_DST_BIT|VK_BUFFER_USAGE_TRANSFER_SRC_BIT| + (memoryDeviceAddress == MemoryRequirement::DeviceAddress ? VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT : 0)), MemoryRequirement::HostVisible | MemoryRequirement::Cached | MemoryRequirement::Coherent | memoryDeviceAddress)); } catch (const tcu::NotSupportedError&) { buffers[i] = de::MovePtr(new BufferWithMemory( - vk, device, allocator, makeBufferCreateInfo(bufferSizes[i], VK_BUFFER_USAGE_STORAGE_BUFFER_BIT|VK_BUFFER_USAGE_TRANSFER_DST_BIT|VK_BUFFER_USAGE_TRANSFER_SRC_BIT|VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT), + vk, device, allocator, makeBufferCreateInfo(bufferSizes[i], VK_BUFFER_USAGE_STORAGE_BUFFER_BIT|VK_BUFFER_USAGE_TRANSFER_DST_BIT|VK_BUFFER_USAGE_TRANSFER_SRC_BIT| + (memoryDeviceAddress == MemoryRequirement::DeviceAddress ? VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT : 0)), MemoryRequirement::HostVisible | memoryDeviceAddress)); }