Move early fragment tests to fragment_operations group
authorMaciej Jesionowski <maciej.jesionowski@mobica.com>
Mon, 12 Sep 2016 10:15:58 +0000 (12:15 +0200)
committerMaciej Jesionowski <maciej.jesionowski@mobica.com>
Mon, 12 Sep 2016 13:17:44 +0000 (15:17 +0200)
Change-Id: I21589282ad6c5890f108d28d95dd645736db8cdc

14 files changed:
android/cts/master/vk-master.txt
android/cts/nyc/src/vk-master.txt
android/cts/nyc/vk-master.txt
external/vulkancts/modules/vulkan/fragment_ops/CMakeLists.txt
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp [moved from external/vulkancts/modules/vulkan/pipeline/vktPipelineEarlyFragmentTests.cpp with 90% similarity]
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.hpp [moved from external/vulkancts/modules/vulkan/pipeline/vktPipelineEarlyFragmentTests.hpp with 83% similarity]
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.cpp
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsMakeUtil.hpp
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorMultiViewportTests.cpp
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsScissorTests.cpp
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsTests.cpp
external/vulkancts/modules/vulkan/pipeline/CMakeLists.txt
external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp
external/vulkancts/mustpass/1.0.1/vk-default.txt

index 03792a2..ba97c94 100644 (file)
@@ -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
index 29c9ad1..c0adf79 100644 (file)
@@ -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
index 5e1f8f8..049c171 100644 (file)
@@ -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
index 38a73ec..7bc9fb0 100644 (file)
@@ -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
@@ -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"
 
 #include <string>
 
-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<VkImageView>         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<VkImage>                   colorImage                      (makeImage(vk, device, makeImageCreateInfo(renderSize, colorFormat, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT)));
+       const UniquePtr<Allocation>             colorImageAlloc         (bindImage(vk, device, allocator, *colorImage, MemoryRequirement::Any));
+       const Unique<VkImageView>               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<VkImageView>         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<VkImage>                   testImage                               (makeImage(vk, device, makeImageCreateInfo(renderSize, testFormat, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)));
+       const UniquePtr<Allocation>             testImageAlloc                  (bindImage(vk, device, allocator, *testImage, MemoryRequirement::Any));
+       const Unique<VkImageView>               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<VkBuffer>                  vertexBuffer                    (makeBuffer(vk, device, makeBufferCreateInfo(vertexBufferSizeBytes, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT)));
+       const UniquePtr<Allocation>             vertexBufferAlloc               (bindBuffer(vk, device, allocator, *vertexBuffer, MemoryRequirement::HostVisible));
 
        {
-               const Allocation& alloc = vertexBuffer.getAllocation();
-               tcu::Vec4* const pVertices = reinterpret_cast<tcu::Vec4*>(alloc.getHostPtr());
+               tcu::Vec4* const pVertices = reinterpret_cast<tcu::Vec4*>(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<VkBuffer>                  resultBuffer                    (makeBuffer(vk, device, makeBufferCreateInfo(resultBufferSizeBytes, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT)));
+       const UniquePtr<Allocation>             resultBufferAlloc               (bindBuffer(vk, device, allocator, *resultBuffer, MemoryRequirement::HostVisible));
 
        {
-               const Allocation& alloc = resultBuffer.getAllocation();
-               deUint32* const pData = static_cast<deUint32*>(alloc.getHostPtr());
+               deUint32* const pData = static_cast<deUint32*>(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<VkBuffer>                  colorBuffer                             (makeBuffer(vk, device, makeBufferCreateInfo(colorBufferSizeBytes, VK_BUFFER_USAGE_TRANSFER_DST_BIT)));
+       const UniquePtr<Allocation>             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<deInt32*>(alloc.getHostPtr());
+               const int  actualCounter           = *static_cast<deInt32*>(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
@@ -1,5 +1,5 @@
-#ifndef _VKTPIPELINEEARLYFRAGMENTTESTS_HPP
-#define _VKTPIPELINEEARLYFRAGMENTTESTS_HPP
+#ifndef _VKTFRAGMENTOPERATIONSEARLYFRAGMENTTESTS_HPP
+#define _VKTFRAGMENTOPERATIONSEARLYFRAGMENTTESTS_HPP
 /*------------------------------------------------------------------------
  * Vulkan Conformance Tests
  * ------------------------
 
 namespace vkt
 {
-namespace pipeline
+namespace FragmentOperations
 {
 
 tcu::TestCaseGroup* createEarlyFragmentTests (tcu::TestContext& testCtx);
 
-} // pipeline
+} // FragmentOperations
 } // vkt
 
-#endif // _VKTPIPELINEEARLYFRAGMENTTESTS_HPP
+#endif // _VKTFRAGMENTOPERATIONSEARLYFRAGMENTTESTS_HPP
index 27405eb..465b999 100644 (file)
@@ -24,7 +24,6 @@
 #include "vktFragmentOperationsMakeUtil.hpp"
 #include "vkTypeUtil.hpp"
 #include "vkPrograms.hpp"
-#include "vkRefUtil.hpp"
 #include "vkQueryUtil.hpp"
 #include <vector>
 
index b907e5b..b06dbe1 100644 (file)
@@ -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<vk::Allocation>          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<vk::VkBuffer> makeBuffer (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkBufferCreateInfo& createInfo)
+{
+       return createBuffer(vk, device, &createInfo);
+}
+
+inline vk::Move<vk::VkImage> makeImage (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkImageCreateInfo& createInfo)
+{
+       return createImage(vk, device, &createInfo);
+}
+
 } // FragmentOperations
 } // vkt
 
index 4dd6871..69314c9 100644 (file)
@@ -68,7 +68,7 @@ inline VkDeviceSize sizeInBytes(const std::vector<T>& vec)
        return vec.size() * sizeof(vec[0]);
 }
 
-Move<VkImage> 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<VkImage> 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<VkBuffer> 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<IVec4>                scissors                        = generateScissors(numViewports, renderSize);
 
        const VkDeviceSize                              colorBufferSize         = renderSize.x() * renderSize.y() * tcu::getPixelSize(mapVkFormat(colorFormat));
-       const Unique<VkBuffer>                  colorBuffer                     (makeBuffer(vk, device, colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT));
+       const Unique<VkBuffer>                  colorBuffer                     (makeBuffer(vk, device, makeBufferCreateInfo(colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT)));
        const UniquePtr<Allocation>             colorBufferAlloc        (bindBuffer(vk, device, allocator, *colorBuffer, MemoryRequirement::HostVisible));
 
        zeroBuffer(vk, device, *colorBufferAlloc, colorBufferSize);
index c87c190..15fc68c 100644 (file)
@@ -87,7 +87,7 @@ inline VkDeviceSize sizeInBytes(const std::vector<T>& vec)
        return vec.size() * sizeof(vec[0]);
 }
 
-Move<VkImage> 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<VkImage> 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<VkBuffer> 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<VkBuffer>                  colorBufferFull                         (makeBuffer(vk, device, colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT));
+       const Unique<VkBuffer>                  colorBufferFull                         (makeBuffer(vk, device, makeBufferCreateInfo(colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT)));
        const UniquePtr<Allocation>             colorBufferFullAlloc            (bindBuffer(vk, device, allocator, *colorBufferFull, MemoryRequirement::HostVisible));
 
-       const Unique<VkBuffer>                  colorBufferScissored            (makeBuffer(vk, device, colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT));
+       const Unique<VkBuffer>                  colorBufferScissored            (makeBuffer(vk, device, makeBufferCreateInfo(colorBufferSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT)));
        const UniquePtr<Allocation>             colorBufferScissoredAlloc       (bindBuffer(vk, device, allocator, *colorBufferScissored, MemoryRequirement::HostVisible));
 
        zeroBuffer(vk, device, *colorBufferFullAlloc, colorBufferSize);
index f14678a..b70ee7f 100644 (file)
@@ -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
index 5cd9f48..4963575 100644 (file)
@@ -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
index f103944..7d25fef 100644 (file)
@@ -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));
 }
 
index 21c6122..4597ff2 100644 (file)
@@ -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