From 367618221ecadfacdef5aa50110347bcb8cddef8 Mon Sep 17 00:00:00 2001 From: Maciej Jesionowski Date: Mon, 12 Sep 2016 12:15:58 +0200 Subject: [PATCH] Move early fragment tests to fragment_operations group Change-Id: I21589282ad6c5890f108d28d95dd645736db8cdc --- android/cts/master/vk-master.txt | 16 ++--- android/cts/nyc/src/vk-master.txt | 16 ++--- android/cts/nyc/vk-master.txt | 16 ++--- .../modules/vulkan/fragment_ops/CMakeLists.txt | 14 +++-- .../vktFragmentOperationsEarlyFragmentTests.cpp} | 71 +++++++++++----------- .../vktFragmentOperationsEarlyFragmentTests.hpp} | 10 +-- .../fragment_ops/vktFragmentOperationsMakeUtil.cpp | 1 - .../fragment_ops/vktFragmentOperationsMakeUtil.hpp | 11 ++++ ...FragmentOperationsScissorMultiViewportTests.cpp | 16 ++--- .../vktFragmentOperationsScissorTests.cpp | 18 ++---- .../fragment_ops/vktFragmentOperationsTests.cpp | 4 +- .../modules/vulkan/pipeline/CMakeLists.txt | 2 - .../modules/vulkan/pipeline/vktPipelineTests.cpp | 2 - external/vulkancts/mustpass/1.0.1/vk-default.txt | 16 ++--- 14 files changed, 106 insertions(+), 107 deletions(-) rename external/vulkancts/modules/vulkan/{pipeline/vktPipelineEarlyFragmentTests.cpp => fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp} (90%) rename external/vulkancts/modules/vulkan/{pipeline/vktPipelineEarlyFragmentTests.hpp => fragment_ops/vktFragmentOperationsEarlyFragmentTests.hpp} (83%) diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt index 03792a2..ba97c94 100644 --- a/android/cts/master/vk-master.txt +++ b/android/cts/master/vk-master.txt @@ -73956,14 +73956,6 @@ dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_clear_depth_stencil_im dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_resolve_image_method dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_copy_query_pool_results_method dEQP-VK.pipeline.timestamp.misc_tests.timestamp_only -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_depth -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_stencil -dEQP-VK.pipeline.early_fragment.early_fragment_tests_depth -dEQP-VK.pipeline.early_fragment.early_fragment_tests_stencil -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_depth_no_attachment -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_stencil_no_attachment -dEQP-VK.pipeline.early_fragment.early_fragment_tests_depth_no_attachment -dEQP-VK.pipeline.early_fragment.early_fragment_tests_stencil_no_attachment dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_fragment_stage dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_geometry_stage_fragment_stage dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_tessellation_control_stage_tessellation_evaluation_stage_fragment_stage @@ -115969,3 +115961,11 @@ dEQP-VK.fragment_operations.scissor.multi_viewport.scissor_13 dEQP-VK.fragment_operations.scissor.multi_viewport.scissor_14 dEQP-VK.fragment_operations.scissor.multi_viewport.scissor_15 dEQP-VK.fragment_operations.scissor.multi_viewport.scissor_16 +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_depth +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_stencil +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_depth +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_depth_no_attachment +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_stencil_no_attachment +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_depth_no_attachment +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil_no_attachment diff --git a/android/cts/nyc/src/vk-master.txt b/android/cts/nyc/src/vk-master.txt index 29c9ad1..c0adf79 100644 --- a/android/cts/nyc/src/vk-master.txt +++ b/android/cts/nyc/src/vk-master.txt @@ -55664,14 +55664,6 @@ dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_clear_depth_stencil_im dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_resolve_image_method dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_copy_query_pool_results_method dEQP-VK.pipeline.timestamp.misc_tests.timestamp_only -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_depth -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_stencil -dEQP-VK.pipeline.early_fragment.early_fragment_tests_depth -dEQP-VK.pipeline.early_fragment.early_fragment_tests_stencil -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_depth_no_attachment -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_stencil_no_attachment -dEQP-VK.pipeline.early_fragment.early_fragment_tests_depth_no_attachment -dEQP-VK.pipeline.early_fragment.early_fragment_tests_stencil_no_attachment dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_fragment_stage dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_geometry_stage_fragment_stage dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_tessellation_control_stage_tessellation_evaluation_stage_fragment_stage @@ -81463,3 +81455,11 @@ dEQP-VK.sparse_resources.buffer_sparse_memory_aliasing.buffer_size_2_16 dEQP-VK.sparse_resources.buffer_sparse_memory_aliasing.buffer_size_2_17 dEQP-VK.sparse_resources.buffer_sparse_memory_aliasing.buffer_size_2_20 dEQP-VK.sparse_resources.buffer_sparse_memory_aliasing.buffer_size_2_24 +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_depth +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_stencil +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_depth +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_depth_no_attachment +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_stencil_no_attachment +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_depth_no_attachment +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil_no_attachment diff --git a/android/cts/nyc/vk-master.txt b/android/cts/nyc/vk-master.txt index 5e1f8f8..049c171 100644 --- a/android/cts/nyc/vk-master.txt +++ b/android/cts/nyc/vk-master.txt @@ -56716,14 +56716,6 @@ dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_clear_depth_stencil_im dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_resolve_image_method dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_copy_query_pool_results_method dEQP-VK.pipeline.timestamp.misc_tests.timestamp_only -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_depth -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_stencil -dEQP-VK.pipeline.early_fragment.early_fragment_tests_depth -dEQP-VK.pipeline.early_fragment.early_fragment_tests_stencil -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_depth_no_attachment -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_stencil_no_attachment -dEQP-VK.pipeline.early_fragment.early_fragment_tests_depth_no_attachment -dEQP-VK.pipeline.early_fragment.early_fragment_tests_stencil_no_attachment dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_fragment_stage dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_geometry_stage_fragment_stage dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_tessellation_control_stage_tessellation_evaluation_stage_fragment_stage @@ -81463,3 +81455,11 @@ dEQP-VK.sparse_resources.buffer_sparse_memory_aliasing.buffer_size_2_16 dEQP-VK.sparse_resources.buffer_sparse_memory_aliasing.buffer_size_2_17 dEQP-VK.sparse_resources.buffer_sparse_memory_aliasing.buffer_size_2_20 dEQP-VK.sparse_resources.buffer_sparse_memory_aliasing.buffer_size_2_24 +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_depth +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_stencil +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_depth +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_depth_no_attachment +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_stencil_no_attachment +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_depth_no_attachment +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil_no_attachment diff --git a/external/vulkancts/modules/vulkan/fragment_ops/CMakeLists.txt b/external/vulkancts/modules/vulkan/fragment_ops/CMakeLists.txt index 38a73ec..7bc9fb0 100644 --- a/external/vulkancts/modules/vulkan/fragment_ops/CMakeLists.txt +++ b/external/vulkancts/modules/vulkan/fragment_ops/CMakeLists.txt @@ -1,14 +1,16 @@ include_directories(..) set(DEQP_VK_FRAGMENT_OPS_SRCS - vktFragmentOperationsTests.cpp - vktFragmentOperationsTests.hpp - vktFragmentOperationsScissorTests.cpp - vktFragmentOperationsScissorTests.hpp - vktFragmentOperationsScissorMultiViewportTests.cpp - vktFragmentOperationsScissorMultiViewportTests.hpp + vktFragmentOperationsEarlyFragmentTests.cpp + vktFragmentOperationsEarlyFragmentTests.hpp vktFragmentOperationsMakeUtil.cpp vktFragmentOperationsMakeUtil.hpp + vktFragmentOperationsScissorMultiViewportTests.cpp + vktFragmentOperationsScissorMultiViewportTests.hpp + vktFragmentOperationsScissorTests.cpp + vktFragmentOperationsScissorTests.hpp + vktFragmentOperationsTests.cpp + vktFragmentOperationsTests.hpp ) set(DEQP_VK_FRAGMENT_OPS_LIBS diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineEarlyFragmentTests.cpp b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp similarity index 90% rename from external/vulkancts/modules/vulkan/pipeline/vktPipelineEarlyFragmentTests.cpp rename to external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp index dd3649f..bff226d 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineEarlyFragmentTests.cpp +++ b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp @@ -22,8 +22,8 @@ * \brief Early fragment tests *//*--------------------------------------------------------------------*/ -#include "vktPipelineEarlyFragmentTests.hpp" -#include "vktPipelineMakeUtil.hpp" +#include "vktFragmentOperationsEarlyFragmentTests.hpp" +#include "vktFragmentOperationsMakeUtil.hpp" #include "vktTestCaseUtil.hpp" #include "vkDefs.hpp" @@ -43,14 +43,14 @@ #include -using namespace vk; - namespace vkt { -namespace pipeline +namespace FragmentOperations { namespace { +using namespace vk; +using de::UniquePtr; //! Basic 2D image. inline VkImageCreateInfo makeImageCreateInfo (const tcu::IVec2& size, const VkFormat format, const VkImageUsageFlags usage) @@ -586,11 +586,12 @@ tcu::TestStatus EarlyFragmentTestInstance::iterate (void) // Color attachment - const tcu::IVec2 renderSize = tcu::IVec2(32, 32); - const VkFormat colorFormat = VK_FORMAT_R8G8B8A8_UNORM; - const VkImageSubresourceRange colorSubresourceRange = makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u); - const Image colorImage (vk, device, allocator, makeImageCreateInfo(renderSize, colorFormat, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT), MemoryRequirement::Any); - const Unique colorImageView (makeImageView(vk, device, *colorImage, VK_IMAGE_VIEW_TYPE_2D, colorFormat, colorSubresourceRange)); + const tcu::IVec2 renderSize = tcu::IVec2(32, 32); + const VkFormat colorFormat = VK_FORMAT_R8G8B8A8_UNORM; + const VkImageSubresourceRange colorSubresourceRange = makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u); + const Unique colorImage (makeImage(vk, device, makeImageCreateInfo(renderSize, colorFormat, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT))); + const UniquePtr colorImageAlloc (bindImage(vk, device, allocator, *colorImage, MemoryRequirement::Any)); + const Unique colorImageView (makeImageView(vk, device, *colorImage, VK_IMAGE_VIEW_TYPE_2D, colorFormat, colorSubresourceRange)); // Test attachment (depth or stencil) static const VkFormat stencilFormats[] = @@ -610,21 +611,22 @@ tcu::TestStatus EarlyFragmentTestInstance::iterate (void) if (m_useTestAttachment) m_context.getTestContext().getLog() << tcu::TestLog::Message << "Using depth/stencil format " << getFormatName(testFormat) << tcu::TestLog::EndMessage; - const VkImageSubresourceRange testSubresourceRange = makeImageSubresourceRange(getImageAspectFlags(testFormat), 0u, 1u, 0u, 1u); - const Image testImage (vk, device, allocator, makeImageCreateInfo(renderSize, testFormat, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT), MemoryRequirement::Any); - const Unique testImageView (makeImageView(vk, device, *testImage, VK_IMAGE_VIEW_TYPE_2D, testFormat, testSubresourceRange)); - const VkImageView attachmentImages[] = { *colorImageView, *testImageView }; - const deUint32 numUsedAttachmentImages = (m_useTestAttachment ? 2u : 1u); + const VkImageSubresourceRange testSubresourceRange = makeImageSubresourceRange(getImageAspectFlags(testFormat), 0u, 1u, 0u, 1u); + const Unique testImage (makeImage(vk, device, makeImageCreateInfo(renderSize, testFormat, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT))); + const UniquePtr testImageAlloc (bindImage(vk, device, allocator, *testImage, MemoryRequirement::Any)); + const Unique testImageView (makeImageView(vk, device, *testImage, VK_IMAGE_VIEW_TYPE_2D, testFormat, testSubresourceRange)); + const VkImageView attachmentImages[] = { *colorImageView, *testImageView }; + const deUint32 numUsedAttachmentImages = (m_useTestAttachment ? 2u : 1u); // Vertex buffer - const deUint32 numVertices = 6; - const VkDeviceSize vertexBufferSizeBytes = sizeof(tcu::Vec4) * numVertices; - const Buffer vertexBuffer (vk, device, allocator, makeBufferCreateInfo(vertexBufferSizeBytes, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT), MemoryRequirement::HostVisible); + const deUint32 numVertices = 6; + const VkDeviceSize vertexBufferSizeBytes = sizeof(tcu::Vec4) * numVertices; + const Unique vertexBuffer (makeBuffer(vk, device, makeBufferCreateInfo(vertexBufferSizeBytes, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT))); + const UniquePtr vertexBufferAlloc (bindBuffer(vk, device, allocator, *vertexBuffer, MemoryRequirement::HostVisible)); { - const Allocation& alloc = vertexBuffer.getAllocation(); - tcu::Vec4* const pVertices = reinterpret_cast(alloc.getHostPtr()); + tcu::Vec4* const pVertices = reinterpret_cast(vertexBufferAlloc->getHostPtr()); pVertices[0] = tcu::Vec4( 1.0f, -1.0f, 0.5f, 1.0f); pVertices[1] = tcu::Vec4(-1.0f, -1.0f, 0.0f, 1.0f); @@ -634,27 +636,28 @@ tcu::TestStatus EarlyFragmentTestInstance::iterate (void) pVertices[4] = tcu::Vec4( 1.0f, 1.0f, 1.0f, 1.0f); pVertices[5] = tcu::Vec4( 1.0f, -1.0f, 0.5f, 1.0f); - flushMappedMemoryRange(vk, device, alloc.getMemory(), alloc.getOffset(), vertexBufferSizeBytes); + flushMappedMemoryRange(vk, device, vertexBufferAlloc->getMemory(), vertexBufferAlloc->getOffset(), vertexBufferSizeBytes); // No barrier needed, flushed memory is automatically visible } // Result buffer - const VkDeviceSize resultBufferSizeBytes = sizeof(deUint32); - const Buffer resultBuffer(vk, device, allocator, makeBufferCreateInfo(resultBufferSizeBytes, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT), MemoryRequirement::HostVisible); + const VkDeviceSize resultBufferSizeBytes = sizeof(deUint32); + const Unique resultBuffer (makeBuffer(vk, device, makeBufferCreateInfo(resultBufferSizeBytes, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT))); + const UniquePtr resultBufferAlloc (bindBuffer(vk, device, allocator, *resultBuffer, MemoryRequirement::HostVisible)); { - const Allocation& alloc = resultBuffer.getAllocation(); - deUint32* const pData = static_cast(alloc.getHostPtr()); + deUint32* const pData = static_cast(resultBufferAlloc->getHostPtr()); *pData = 0; - flushMappedMemoryRange(vk, device, alloc.getMemory(), alloc.getOffset(), resultBufferSizeBytes); + flushMappedMemoryRange(vk, device, resultBufferAlloc->getMemory(), resultBufferAlloc->getOffset(), resultBufferSizeBytes); } // Render result buffer (to retrieve color attachment contents) - const VkDeviceSize colorBufferSizeBytes = tcu::getPixelSize(mapVkFormat(colorFormat)) * renderSize.x() * renderSize.y(); - const Buffer colorBuffer (vk, device, allocator, makeBufferCreateInfo(colorBufferSizeBytes, VK_BUFFER_USAGE_TRANSFER_DST_BIT), MemoryRequirement::HostVisible); + const VkDeviceSize colorBufferSizeBytes = tcu::getPixelSize(mapVkFormat(colorFormat)) * renderSize.x() * renderSize.y(); + const Unique colorBuffer (makeBuffer(vk, device, makeBufferCreateInfo(colorBufferSizeBytes, VK_BUFFER_USAGE_TRANSFER_DST_BIT))); + const UniquePtr colorBufferAlloc (bindBuffer(vk, device, allocator, *colorBuffer, MemoryRequirement::HostVisible)); // Descriptors @@ -758,10 +761,9 @@ tcu::TestStatus EarlyFragmentTestInstance::iterate (void) // Log result image { - const Allocation& alloc = colorBuffer.getAllocation(); - invalidateMappedMemoryRange(vk, device, alloc.getMemory(), alloc.getOffset(), colorBufferSizeBytes); + invalidateMappedMemoryRange(vk, device, colorBufferAlloc->getMemory(), colorBufferAlloc->getOffset(), colorBufferSizeBytes); - const tcu::ConstPixelBufferAccess imagePixelAccess(mapVkFormat(colorFormat), renderSize.x(), renderSize.y(), 1, alloc.getHostPtr()); + const tcu::ConstPixelBufferAccess imagePixelAccess(mapVkFormat(colorFormat), renderSize.x(), renderSize.y(), 1, colorBufferAlloc->getHostPtr()); tcu::TestLog& log = m_context.getTestContext().getLog(); log << tcu::TestLog::Image("color0", "Rendered image", imagePixelAccess); @@ -769,10 +771,9 @@ tcu::TestStatus EarlyFragmentTestInstance::iterate (void) // Verify results { - const Allocation& alloc = resultBuffer.getAllocation(); - invalidateMappedMemoryRange(vk, device, alloc.getMemory(), alloc.getOffset(), resultBufferSizeBytes); + invalidateMappedMemoryRange(vk, device, resultBufferAlloc->getMemory(), resultBufferAlloc->getOffset(), resultBufferSizeBytes); - const int actualCounter = *static_cast(alloc.getHostPtr()); + const int actualCounter = *static_cast(resultBufferAlloc->getHostPtr()); const bool expectPartialResult = (m_useEarlyTests && m_useTestAttachment); const int expectedCounter = expectPartialResult ? renderSize.x() * renderSize.y() / 2 : renderSize.x() * renderSize.y(); const int tolerance = expectPartialResult ? de::max(renderSize.x(), renderSize.y()) * 3 : 0; @@ -835,5 +836,5 @@ tcu::TestCaseGroup* createEarlyFragmentTests (tcu::TestContext& testCtx) return testGroup.release(); } -} // pipeline +} // FragmentOperations } // vkt diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineEarlyFragmentTests.hpp b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.hpp similarity index 83% rename from external/vulkancts/modules/vulkan/pipeline/vktPipelineEarlyFragmentTests.hpp rename to external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.hpp index 18eda78..a138b56 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineEarlyFragmentTests.hpp +++ b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.hpp @@ -1,5 +1,5 @@ -#ifndef _VKTPIPELINEEARLYFRAGMENTTESTS_HPP -#define _VKTPIPELINEEARLYFRAGMENTTESTS_HPP +#ifndef _VKTFRAGMENTOPERATIONSEARLYFRAGMENTTESTS_HPP +#define _VKTFRAGMENTOPERATIONSEARLYFRAGMENTTESTS_HPP /*------------------------------------------------------------------------ * Vulkan Conformance Tests * ------------------------ @@ -29,12 +29,12 @@ namespace vkt { -namespace pipeline +namespace FragmentOperations { tcu::TestCaseGroup* createEarlyFragmentTests (tcu::TestContext& testCtx); -} // pipeline +} // FragmentOperations } // vkt -#endif // _VKTPIPELINEEARLYFRAGMENTTESTS_HPP +#endif // _VKTFRAGMENTOPERATIONSEARLYFRAGMENTTESTS_HPP diff --git a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.cpp b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.cpp index 27405eb..465b999 100644 --- a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.cpp +++ b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.cpp @@ -24,7 +24,6 @@ #include "vktFragmentOperationsMakeUtil.hpp" #include "vkTypeUtil.hpp" #include "vkPrograms.hpp" -#include "vkRefUtil.hpp" #include "vkQueryUtil.hpp" #include diff --git a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.hpp b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.hpp index b907e5b..b06dbe1 100644 --- a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.hpp +++ b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.hpp @@ -25,6 +25,7 @@ #include "vkDefs.hpp" #include "vkRef.hpp" +#include "vkRefUtil.hpp" #include "vkMemUtil.hpp" #include "deUniquePtr.hpp" #include "tcuVector.hpp" @@ -50,6 +51,16 @@ de::MovePtr bindBuffer (const vk::DeviceInterface& vk, const void beginCommandBuffer (const vk::DeviceInterface& vk, const vk::VkCommandBuffer commandBuffer); void submitCommandsAndWait (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkQueue queue, const vk::VkCommandBuffer commandBuffer); +inline vk::Move makeBuffer (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkBufferCreateInfo& createInfo) +{ + return createBuffer(vk, device, &createInfo); +} + +inline vk::Move makeImage (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkImageCreateInfo& createInfo) +{ + return createImage(vk, device, &createInfo); +} + } // FragmentOperations } // vkt diff --git a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorMultiViewportTests.cpp b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorMultiViewportTests.cpp index 4dd6871..69314c9 100644 --- a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorMultiViewportTests.cpp +++ b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorMultiViewportTests.cpp @@ -68,7 +68,7 @@ inline VkDeviceSize sizeInBytes(const std::vector& vec) return vec.size() * sizeof(vec[0]); } -Move makeImage (const DeviceInterface& vk, const VkDevice device, const VkFormat format, const IVec2& size, VkImageUsageFlags usage) +VkImageCreateInfo makeImageCreateInfo (const VkFormat format, const IVec2& size, VkImageUsageFlags usage) { const VkImageCreateInfo imageParams = { @@ -88,13 +88,7 @@ Move makeImage (const DeviceInterface& vk, const VkDevice device, const DE_NULL, // const deUint32* pQueueFamilyIndices; VK_IMAGE_LAYOUT_UNDEFINED, // VkImageLayout initialLayout; }; - return createImage(vk, device, &imageParams); -} - -inline Move makeBuffer (const DeviceInterface& vk, const VkDevice device, const VkDeviceSize bufferSize, const VkBufferUsageFlags usage) -{ - const VkBufferCreateInfo bufferCreateInfo = makeBufferCreateInfo(bufferSize, usage); - return createBuffer(vk, device, &bufferCreateInfo); + return imageParams; } //! A single-attachment, single-subpass render pass. @@ -569,11 +563,11 @@ public: const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex(); Allocator& allocator = context.getDefaultAllocator(); - m_colorImage = makeImage (vk, device, m_colorFormat, m_renderSize, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT); + m_colorImage = makeImage (vk, device, makeImageCreateInfo(m_colorFormat, m_renderSize, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT)); m_colorImageAlloc = bindImage (vk, device, allocator, *m_colorImage, MemoryRequirement::Any); m_colorAttachment = makeImageView (vk, device, *m_colorImage, VK_IMAGE_VIEW_TYPE_2D, m_colorFormat, m_colorSubresourceRange); - m_vertexBuffer = makeBuffer (vk, device, m_vertexBufferSize, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT); + m_vertexBuffer = makeBuffer (vk, device, makeBufferCreateInfo(m_vertexBufferSize, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT)); m_vertexBufferAlloc = bindBuffer (vk, device, allocator, *m_vertexBuffer, MemoryRequirement::HostVisible); { @@ -731,7 +725,7 @@ tcu::TestStatus test (Context& context, const int numViewports) const std::vector scissors = generateScissors(numViewports, renderSize); const VkDeviceSize colorBufferSize = renderSize.x() * renderSize.y() * tcu::getPixelSize(mapVkFormat(colorFormat)); - const Unique colorBuffer (makeBuffer(vk, device, colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT)); + const Unique colorBuffer (makeBuffer(vk, device, makeBufferCreateInfo(colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT))); const UniquePtr colorBufferAlloc (bindBuffer(vk, device, allocator, *colorBuffer, MemoryRequirement::HostVisible)); zeroBuffer(vk, device, *colorBufferAlloc, colorBufferSize); diff --git a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorTests.cpp b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorTests.cpp index c87c190..15fc68c 100644 --- a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorTests.cpp +++ b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorTests.cpp @@ -87,7 +87,7 @@ inline VkDeviceSize sizeInBytes(const std::vector& vec) return vec.size() * sizeof(vec[0]); } -Move makeImage (const DeviceInterface& vk, const VkDevice device, const VkFormat format, const IVec2& size, VkImageUsageFlags usage) +VkImageCreateInfo makeImageCreateInfo (const VkFormat format, const IVec2& size, VkImageUsageFlags usage) { const VkImageCreateInfo imageParams = { @@ -107,13 +107,7 @@ Move makeImage (const DeviceInterface& vk, const VkDevice device, const DE_NULL, // const deUint32* pQueueFamilyIndices; VK_IMAGE_LAYOUT_UNDEFINED, // VkImageLayout initialLayout; }; - return createImage(vk, device, &imageParams); -} - -inline Move makeBuffer (const DeviceInterface& vk, const VkDevice device, const VkDeviceSize bufferSize, const VkBufferUsageFlags usage) -{ - const VkBufferCreateInfo bufferCreateInfo = makeBufferCreateInfo(bufferSize, usage); - return createBuffer(vk, device, &bufferCreateInfo); + return imageParams; } //! A single-attachment, single-subpass render pass. @@ -547,11 +541,11 @@ public: const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex(); Allocator& allocator = context.getDefaultAllocator(); - m_colorImage = makeImage(vk, device, m_colorFormat, m_renderSize, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT); + m_colorImage = makeImage(vk, device, makeImageCreateInfo(m_colorFormat, m_renderSize, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT)); m_colorImageAlloc = bindImage(vk, device, allocator, *m_colorImage, MemoryRequirement::Any); m_colorAttachment = makeImageView(vk, device, *m_colorImage, VK_IMAGE_VIEW_TYPE_2D, m_colorFormat, m_colorSubresourceRange); - m_vertexBuffer = makeBuffer(vk, device, m_vertexBufferSize, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT); + m_vertexBuffer = makeBuffer(vk, device, makeBufferCreateInfo(m_vertexBufferSize, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT)); m_vertexBufferAlloc = bindBuffer(vk, device, allocator, *m_vertexBuffer, MemoryRequirement::HostVisible); { @@ -710,10 +704,10 @@ tcu::TestStatus test (Context& context, const CaseDef caseDef) const Vec4 clearColor (0.5f, 0.5f, 1.0f, 1.0f); const VkDeviceSize colorBufferSize = renderSize.x() * renderSize.y() * tcu::getPixelSize(mapVkFormat(colorFormat)); - const Unique colorBufferFull (makeBuffer(vk, device, colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT)); + const Unique colorBufferFull (makeBuffer(vk, device, makeBufferCreateInfo(colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT))); const UniquePtr colorBufferFullAlloc (bindBuffer(vk, device, allocator, *colorBufferFull, MemoryRequirement::HostVisible)); - const Unique colorBufferScissored (makeBuffer(vk, device, colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT)); + const Unique colorBufferScissored (makeBuffer(vk, device, makeBufferCreateInfo(colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT))); const UniquePtr colorBufferScissoredAlloc (bindBuffer(vk, device, allocator, *colorBufferScissored, MemoryRequirement::HostVisible)); zeroBuffer(vk, device, *colorBufferFullAlloc, colorBufferSize); diff --git a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsTests.cpp b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsTests.cpp index f14678a..b70ee7f 100644 --- a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsTests.cpp +++ b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsTests.cpp @@ -24,6 +24,7 @@ #include "vktFragmentOperationsTests.hpp" #include "vktTestGroupUtil.hpp" #include "vktFragmentOperationsScissorTests.hpp" +#include "vktFragmentOperationsEarlyFragmentTests.hpp" namespace vkt { @@ -36,7 +37,8 @@ void addFragmentOperationsTests (tcu::TestCaseGroup* fragmentOperationsTestsGrou { tcu::TestContext& testCtx = fragmentOperationsTestsGroup->getTestContext(); - fragmentOperationsTestsGroup->addChild(createScissorTests(testCtx)); + fragmentOperationsTestsGroup->addChild(createScissorTests (testCtx)); + fragmentOperationsTestsGroup->addChild(createEarlyFragmentTests (testCtx)); } } // anonymous diff --git a/external/vulkancts/modules/vulkan/pipeline/CMakeLists.txt b/external/vulkancts/modules/vulkan/pipeline/CMakeLists.txt index 5cd9f48..4963575 100644 --- a/external/vulkancts/modules/vulkan/pipeline/CMakeLists.txt +++ b/external/vulkancts/modules/vulkan/pipeline/CMakeLists.txt @@ -50,8 +50,6 @@ set(DEQP_VK_PIPELINE_SRCS vktPipelineTimestampTests.hpp vktPipelineVertexUtil.cpp vktPipelineVertexUtil.hpp - vktPipelineEarlyFragmentTests.cpp - vktPipelineEarlyFragmentTests.hpp vktPipelineCacheTests.cpp vktPipelineCacheTests.hpp vktPipelineMakeUtil.cpp diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp index f103944..7d25fef 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp @@ -36,7 +36,6 @@ #include "vktPipelineMultisampleInterpolationTests.hpp" #include "vktPipelineVertexInputTests.hpp" #include "vktPipelineTimestampTests.hpp" -#include "vktPipelineEarlyFragmentTests.hpp" #include "vktPipelineCacheTests.hpp" #include "vktTestGroupUtil.hpp" @@ -65,7 +64,6 @@ void createChildren (tcu::TestCaseGroup* pipelineTests) pipelineTests->addChild(createVertexInputTests (testCtx)); pipelineTests->addChild(createInputAssemblyTests (testCtx)); pipelineTests->addChild(createTimestampTests (testCtx)); - pipelineTests->addChild(createEarlyFragmentTests (testCtx)); pipelineTests->addChild(createCacheTests (testCtx)); } diff --git a/external/vulkancts/mustpass/1.0.1/vk-default.txt b/external/vulkancts/mustpass/1.0.1/vk-default.txt index 21c6122..4597ff2 100644 --- a/external/vulkancts/mustpass/1.0.1/vk-default.txt +++ b/external/vulkancts/mustpass/1.0.1/vk-default.txt @@ -67824,14 +67824,6 @@ dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_clear_depth_stencil_im dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_resolve_image_method dEQP-VK.pipeline.timestamp.transfer_tests.host_stage_with_copy_query_pool_results_method dEQP-VK.pipeline.timestamp.misc_tests.timestamp_only -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_depth -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_stencil -dEQP-VK.pipeline.early_fragment.early_fragment_tests_depth -dEQP-VK.pipeline.early_fragment.early_fragment_tests_stencil -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_depth_no_attachment -dEQP-VK.pipeline.early_fragment.no_early_fragment_tests_stencil_no_attachment -dEQP-VK.pipeline.early_fragment.early_fragment_tests_depth_no_attachment -dEQP-VK.pipeline.early_fragment.early_fragment_tests_stencil_no_attachment dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_fragment_stage dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_geometry_stage_fragment_stage dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_tessellation_control_stage_tessellation_evaluation_stage_fragment_stage @@ -109383,3 +109375,11 @@ dEQP-VK.fragment_operations.scissor.multi_viewport.scissor_13 dEQP-VK.fragment_operations.scissor.multi_viewport.scissor_14 dEQP-VK.fragment_operations.scissor.multi_viewport.scissor_15 dEQP-VK.fragment_operations.scissor.multi_viewport.scissor_16 +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_depth +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_stencil +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_depth +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_depth_no_attachment +dEQP-VK.fragment_operations.early_fragment.no_early_fragment_tests_stencil_no_attachment +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_depth_no_attachment +dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil_no_attachment -- 2.7.4