Clean up Vulkan test hierarcy
authorPyry Haulos <phaulos@google.com>
Mon, 7 Dec 2015 23:05:28 +0000 (15:05 -0800)
committerPyry Haulos <phaulos@google.com>
Tue, 8 Dec 2015 20:05:48 +0000 (12:05 -0800)
Renamed following groups:

dEQP-VK.api.buffers -> dEQP-VK.api.buffer
dEQP-VK.api.buffersView -> dEQP-VK.api.buffer_view.create
dEQP-VK.api.buffersViewMemory -> dEQP-VK.api.buffer_view.access
dEQP-VK.api.shaderRenderCase.discard -> dEQP-VK.glsl.discard

Change-Id: Ieca71086b2dd78d1d062f3af8ad58451a7c9950b

14 files changed:
external/vulkancts/modules/vulkan/api/CMakeLists.txt
external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp [moved from external/vulkancts/modules/vulkan/api/vktApiBuffersTests.cpp with 98% similarity]
external/vulkancts/modules/vulkan/api/vktApiBufferTests.hpp [moved from external/vulkancts/modules/vulkan/api/vktApiBuffersTests.hpp with 94% similarity]
external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.cpp [moved from external/vulkancts/modules/vulkan/api/vktApiBuffersViewMemoryTests.cpp with 99% similarity]
external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.hpp [moved from external/vulkancts/modules/vulkan/api/vktApiBuffersViewMemoryTests.hpp with 90% similarity]
external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.cpp [moved from external/vulkancts/modules/vulkan/api/vktApiBuffersViewCreationTests.cpp with 98% similarity]
external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.hpp [moved from external/vulkancts/modules/vulkan/api/vktApiBuffersViewCreationTests.hpp with 89% similarity]
external/vulkancts/modules/vulkan/api/vktApiTests.cpp
external/vulkancts/modules/vulkan/shaderrender/CMakeLists.txt
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.cpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.hpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.cpp [deleted file]
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.hpp [deleted file]
external/vulkancts/modules/vulkan/vktTestPackage.cpp

index f4ac568..93dcca0 100644 (file)
@@ -11,12 +11,12 @@ set(DEQP_VK_API_SRCS
        vktApiDeviceInitializationTests.hpp
        vktApiObjectManagementTests.cpp
        vktApiObjectManagementTests.hpp
-       vktApiBuffersTests.cpp
-       vktApiBuffersTests.hpp
-       vktApiBuffersViewCreationTests.cpp
-       vktApiBuffersViewCreationTests.hpp
-       vktApiBuffersViewMemoryTests.cpp
-       vktApiBuffersViewMemoryTests.hpp
+       vktApiBufferTests.cpp
+       vktApiBufferTests.hpp
+       vktApiBufferViewCreateTests.cpp
+       vktApiBufferViewCreateTests.hpp
+       vktApiBufferViewAccessTests.cpp
+       vktApiBufferViewAccessTests.hpp
        )
 
 set(DEQP_VK_API_LIBS
@@ -33,7 +33,7 @@
  * \brief Vulkan Buffers Tests
  *//*--------------------------------------------------------------------*/
 
-#include "vktApiBuffersTests.hpp"
+#include "vktApiBufferTests.hpp"
 
 #include "deStringUtil.hpp"
 #include "gluVarType.hpp"
@@ -189,7 +189,7 @@ tcu::TestStatus BufferTestInstance::iterate (void)
 
 } // anonymous
 
- tcu::TestCaseGroup* createBufferTests (tcu::TestContext&      testCtx)
+ tcu::TestCaseGroup* createBufferTests (tcu::TestContext& testCtx)
 {
        const VkBufferUsageFlags bufferUsageModes[] =
        {
@@ -211,7 +211,7 @@ tcu::TestStatus BufferTestInstance::iterate (void)
                VK_BUFFER_CREATE_SPARSE_ALIASED_BIT
        };
 
-       de::MovePtr<tcu::TestCaseGroup> buffersTests    (new tcu::TestCaseGroup(testCtx, "buffers", "Buffers Tests"));
+       de::MovePtr<tcu::TestCaseGroup> buffersTests    (new tcu::TestCaseGroup(testCtx, "buffer", "Buffer Tests"));
 
        deUint32        numberOfBufferUsageFlags                        = DE_LENGTH_OF_ARRAY(bufferUsageModes);
        deUint32        numberOfBufferCreateFlags                       = DE_LENGTH_OF_ARRAY(bufferCreateFlags);
@@ -1,6 +1,5 @@
-#ifndef _VKTAPIBUFFERSTESTS_HPP
-#define _VKTAPIBUFFERSTESTS_HPP
-
+#ifndef _VKTAPIBUFFERTESTS_HPP
+#define _VKTAPIBUFFERTESTS_HPP
 /*------------------------------------------------------------------------
  * Vulkan Conformance Tests
  * ------------------------
@@ -50,4 +49,4 @@ tcu::TestCaseGroup*           createBufferTests               (tcu::TestContext& testCtx);
 } // api
 } // vkt
 
-#endif // _VKTAPIBUFFERSTESTS_HPP
+#endif // _VKTAPIBUFFERTESTS_HPP
@@ -33,7 +33,7 @@
  * \brief Vulkan Buffer View Memory Tests
  *//*--------------------------------------------------------------------*/
 
-#include "vktApiBuffersViewMemoryTests.hpp"
+#include "vktApiBufferViewAccessTests.hpp"
 
 #include "deStringUtil.hpp"
 #include "deUniquePtr.hpp"
@@ -875,9 +875,9 @@ void BufferViewTestCase::initPrograms (SourceCollections& programCollection) con
 
 } // anonymous
 
-tcu::TestCaseGroup* createBufferViewMemoryTests (tcu::TestContext& testCtx)
+tcu::TestCaseGroup* createBufferViewAccessTests (tcu::TestContext& testCtx)
 {
-       de::MovePtr<tcu::TestCaseGroup> bufferViewTests (new tcu::TestCaseGroup(testCtx, "buffersViewMemory", "BufferView Memory Tests"));
+       de::MovePtr<tcu::TestCaseGroup> bufferViewTests (new tcu::TestCaseGroup(testCtx, "access", "BufferView Access Tests"));
 
        {
                BufferViewCaseParams info =
@@ -1,6 +1,5 @@
-#ifndef _VKTAPIBUFFERSVIEWMEMORYTESTS_HPP
-#define _VKTAPIBUFFERSVIEWMEMORYTESTS_HPP
-
+#ifndef _VKTAPIBUFFERVIEWACCESSTESTS_HPP
+#define _VKTAPIBUFFERVIEWACCESSTESTS_HPP
 /*------------------------------------------------------------------------
  * Vulkan Conformance Tests
  * ------------------------
@@ -45,9 +44,9 @@ namespace vkt
 namespace api
 {
 
-tcu::TestCaseGroup*            createBufferViewMemoryTests     (tcu::TestContext& testCtx);
+tcu::TestCaseGroup*            createBufferViewAccessTests     (tcu::TestContext& testCtx);
 
 } // api
 } // vkt
 
-#endif // _VKTAPIBUFFERSVIEWMEMORYTESTS_HPP
+#endif // _VKTAPIBUFFERVIEWACCESSTESTS_HPP
@@ -33,7 +33,7 @@
  * \brief Vulkan Buffer View Creation Tests
  *//*--------------------------------------------------------------------*/
 
-#include "vktApiBuffersViewCreationTests.hpp"
+#include "vktApiBufferViewCreateTests.hpp"
 
 #include "deStringUtil.hpp"
 #include "gluVarType.hpp"
@@ -206,9 +206,9 @@ tcu::TestStatus BufferViewTestInstance::iterate (void)
 
 } // anonymous
 
- tcu::TestCaseGroup* createBufferViewCreationTests (tcu::TestContext&  testCtx)
+ tcu::TestCaseGroup* createBufferViewCreateTests (tcu::TestContext& testCtx)
 {
-       de::MovePtr<tcu::TestCaseGroup> bufferViewTests (new tcu::TestCaseGroup(testCtx, "buffersView", "BufferView Tests"));
+       de::MovePtr<tcu::TestCaseGroup> bufferViewTests (new tcu::TestCaseGroup(testCtx, "create", "BufferView Construction Tests"));
 
        const VkDeviceSize range = 96;
        for (deUint32 format = VK_FORMAT_UNDEFINED + 1; format < VK_FORMAT_LAST; format++)
@@ -1,6 +1,5 @@
-#ifndef _VKTAPIBUFFERSVIEWCREATIONTESTS_HPP
-#define _VKTAPIBUFFERSVIEWCREATIONTESTS_HPP
-
+#ifndef _VKTAPIBUFFERVIEWCREATETESTS_HPP
+#define _VKTAPIBUFFERVIEWCREATETESTS_HPP
 /*------------------------------------------------------------------------
  *  Vulkan Conformance Tests
  * ------------------------
@@ -45,9 +44,9 @@ namespace vkt
 namespace api
 {
 
-tcu::TestCaseGroup*            createBufferViewCreationTests   (tcu::TestContext& testCtx);
+tcu::TestCaseGroup*            createBufferViewCreateTests     (tcu::TestContext& testCtx);
 
 } // api
 } // vkt
 
-#endif // _VKTAPIBUFFERSVIEWCREATIONTESTS_HPP
+#endif // _VKTAPIBUFFERVIEWCREATETESTS_HPP
index 8046a5f..47ed995 100644 (file)
 #include "vktApiSmokeTests.hpp"
 #include "vktApiDeviceInitializationTests.hpp"
 #include "vktApiObjectManagementTests.hpp"
-#include "vktApiBuffersTests.hpp"
-#include "vktApiBuffersViewCreationTests.hpp"
-#include "vktApiBuffersViewMemoryTests.hpp"
+#include "vktApiBufferTests.hpp"
+#include "vktApiBufferViewCreateTests.hpp"
+#include "vktApiBufferViewAccessTests.hpp"
 
 namespace vkt
 {
 namespace api
 {
 
+namespace
+{
+
+tcu::TestCaseGroup* createBufferViewTests (tcu::TestContext& testCtx)
+{
+       de::MovePtr<tcu::TestCaseGroup> bufferViewTests (new tcu::TestCaseGroup(testCtx, "buffer_view", "BufferView tests"));
+
+       bufferViewTests->addChild(createBufferViewCreateTests   (testCtx));
+       bufferViewTests->addChild(createBufferViewAccessTests   (testCtx));
+
+       return bufferViewTests.release();
+}
+
+} // anonymous
+
 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
 {
        de::MovePtr<tcu::TestCaseGroup> apiTests        (new tcu::TestCaseGroup(testCtx, "api", "API Tests"));
@@ -56,8 +71,7 @@ tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
        apiTests->addChild(createDeviceInitializationTests      (testCtx));
        apiTests->addChild(createObjectManagementTests          (testCtx));
        apiTests->addChild(createBufferTests                            (testCtx));
-       apiTests->addChild(createBufferViewCreationTests        (testCtx));
-       apiTests->addChild(createBufferViewMemoryTests          (testCtx));
+       apiTests->addChild(createBufferViewTests                        (testCtx));
 
        return apiTests.release();
 }
index 97058ca..83ae801 100644 (file)
@@ -1,21 +1,18 @@
 include_directories(
        ..
-)
+       )
 
 set(DEQP_VK_SHADERRENDER_SRCS
        vktShaderRender.cpp
        vktShaderRender.hpp
-       vktShaderRenderTests.cpp
-       vktShaderRenderTests.hpp
-
        vktShaderRenderDiscardTests.cpp
        vktShaderRenderDiscardTests.hpp
-)
+       )
 
 set(DEQP_VK_SHADERRENDER_LIBS
        tcutil
        vkutil
-)
+       )
 
 add_library(deqp-vk-shaderrender STATIC ${DEQP_VK_SHADERRENDER_SRCS})
 target_link_libraries(deqp-vk-shaderrender ${DEQP_VK_SHADERRENDER_LIBS})
index 904eea3..30e382f 100644 (file)
@@ -34,6 +34,7 @@
  *//*--------------------------------------------------------------------*/
 
 #include "vktShaderRenderDiscardTests.hpp"
+#include "vktShaderRender.hpp"
 #include "tcuStringTemplate.hpp"
 #include "gluTexture.hpp"
 
@@ -367,7 +368,18 @@ de::MovePtr<ShaderDiscardCase> makeDiscardCase (tcu::TestContext& testCtx, Disca
        return de::MovePtr<ShaderDiscardCase>(new ShaderDiscardCase(testCtx, name.c_str(), description.c_str(), shaderTemplate.specialize(params).c_str(), getEvalFunc(mode), mode == DISCARDMODE_TEXTURE));
 }
 
-} // anonymous
+class ShaderDiscardTests : public tcu::TestCaseGroup
+{
+public:
+                                                       ShaderDiscardTests              (tcu::TestContext& textCtx);
+       virtual                                 ~ShaderDiscardTests             (void);
+
+       virtual void                    init                                    (void);
+
+private:
+                                                       ShaderDiscardTests              (const ShaderDiscardTests&);            // not allowed!
+       ShaderDiscardTests&             operator=                               (const ShaderDiscardTests&);            // not allowed!
+};
 
 ShaderDiscardTests::ShaderDiscardTests (tcu::TestContext& testCtx)
        : TestCaseGroup(testCtx, "discard", "Discard statement tests")
@@ -385,5 +397,12 @@ void ShaderDiscardTests::init (void)
                        addChild(makeDiscardCase(m_testCtx, (DiscardTemplate)tmpl, (DiscardMode)mode).release());
 }
 
+} // anonymous
+
+tcu::TestCaseGroup* createDiscardTests (tcu::TestContext& testCtx)
+{
+       return new ShaderDiscardTests(testCtx);
+}
+
 } // sr
 } // vkt
index 239ac21..1bc4c98 100644 (file)
  * \brief Shader discard statement tests.
  *//*--------------------------------------------------------------------*/
 
-#include "vktShaderRender.hpp"
+#include "tcuDefs.hpp"
+#include "tcuTestCase.hpp"
 
 namespace vkt
 {
 namespace sr
 {
 
-class ShaderDiscardTests : public tcu::TestCaseGroup
-{
-public:
-                                                       ShaderDiscardTests              (tcu::TestContext& textCtx);
-       virtual                                 ~ShaderDiscardTests             (void);
-
-       virtual void                    init                                    (void);
-
-private:
-                                                       ShaderDiscardTests              (const ShaderDiscardTests&);            // not allowed!
-       ShaderDiscardTests&             operator=                               (const ShaderDiscardTests&);            // not allowed!
-};
+tcu::TestCaseGroup*    createDiscardTests      (tcu::TestContext& testCtx);
 
 } // sr
 } // vkt
diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.cpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.cpp
deleted file mode 100644 (file)
index 45fe711..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*------------------------------------------------------------------------
- * Copyright (c) 2015 The Khronos Group Inc.
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice(s) and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * The Materials are Confidential Information as defined by the
- * Khronos Membership Agreement until designated non-confidential by Khronos,
- * at which point this condition clause shall be removed.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- *
- *//*!
- * \file
- * \brief Vulkan shader render test cases
- *//*--------------------------------------------------------------------*/
-
-#include "vktShaderRenderTests.hpp"
-
-#include "deUniquePtr.hpp"
-
-#include "vktShaderRender.hpp"
-#include "vktShaderRenderDiscardTests.hpp"
-
-namespace vkt
-{
-namespace sr
-{
-
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
-{
-       de::MovePtr<tcu::TestCaseGroup> shaderRenderCaseTests (new tcu::TestCaseGroup(testCtx, "shaderRenderCase", "ShaderRenderCase Tests"));
-
-       shaderRenderCaseTests->addChild(new ShaderDiscardTests(testCtx));
-
-       return shaderRenderCaseTests.release();
-}
-
-} // sr
-} // vkt
diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.hpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.hpp
deleted file mode 100644 (file)
index ef7cb77..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef _VKTSHADERRENDERTESTS_HPP
-#define _VKTSHADERRENDERTESTS_HPP
-/*------------------------------------------------------------------------
- * Copyright (c) 2015 The Khronos Group Inc.
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice(s) and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * The Materials are Confidential Information as defined by the
- * Khronos Membership Agreement until designated non-confidential by Khronos,
- * at which point this condition clause shall be removed.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- *
- *//*!
- * \file
- * \brief Vulkan shader render test cases
- *//*--------------------------------------------------------------------*/
-
-#include "tcuDefs.hpp"
-#include "tcuTestCase.hpp"
-
-namespace vkt
-{
-namespace sr
-{
-
-tcu::TestCaseGroup*            createTests                     (tcu::TestContext& testCtx);
-
-} // sr
-} // vkt
-
-#endif // _VKTSHADERRENDERTESTS_HPP
index 00754e3..9cde825 100644 (file)
@@ -53,8 +53,8 @@
 #include "vktSpvAsmTests.hpp"
 #include "vktShaderLibrary.hpp"
 #include "vktRenderPassTests.hpp"
-#include "vktShaderRenderTests.hpp"
 #include "vktMemoryTests.hpp"
+#include "vktShaderRenderDiscardTests.hpp"
 
 #include <vector>
 #include <sstream>
@@ -231,42 +231,41 @@ tcu::TestNode::IterateResult TestCaseExecutor::iterate (tcu::TestCase*)
                return tcu::TestNode::CONTINUE;
 }
 
-// ShaderLibrary-based GLSL tests
+// GLSL shader tests
 
-class GlslGroup : public tcu::TestCaseGroup
+tcu::TestCaseGroup* createGlslTests (tcu::TestContext& testCtx)
 {
-public:
-       GlslGroup (tcu::TestContext& testCtx)
-               : tcu::TestCaseGroup(testCtx, "glsl", "GLSL shader execution tests")
-       {
-       }
+       de::MovePtr<tcu::TestCaseGroup> glslTests       (new tcu::TestCaseGroup(testCtx, "glsl", "GLSL shader execution tests"));
 
-       void init (void)
+       // ShaderLibrary-based tests
+       static const struct
        {
-               static const struct
-               {
-                       const char*             name;
-                       const char*             description;
-               } s_es310Tests[] =
-               {
-                       { "arrays",                                             "Arrays"                                        },
-                       { "conditionals",                               "Conditional statements"        },
-                       { "constant_expressions",               "Constant expressions"          },
-                       { "constants",                                  "Constants"                                     },
-                       { "conversions",                                "Type conversions"                      },
-                       { "functions",                                  "Functions"                                     },
-                       { "linkage",                                    "Linking"                                       },
-                       { "scoping",                                    "Scoping"                                       },
-                       { "swizzles",                                   "Swizzles"                                      },
-               };
-
-               for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(s_es310Tests); ndx++)
-                       addChild(createShaderLibraryGroup(m_testCtx,
-                                                                                         s_es310Tests[ndx].name,
-                                                                                         s_es310Tests[ndx].description,
-                                                                                         std::string("vulkan/glsl/es310/") + s_es310Tests[ndx].name + ".test").release());
-       }
-};
+               const char*             name;
+               const char*             description;
+       } s_es310Tests[] =
+       {
+               { "arrays",                                             "Arrays"                                        },
+               { "conditionals",                               "Conditional statements"        },
+               { "constant_expressions",               "Constant expressions"          },
+               { "constants",                                  "Constants"                                     },
+               { "conversions",                                "Type conversions"                      },
+               { "functions",                                  "Functions"                                     },
+               { "linkage",                                    "Linking"                                       },
+               { "scoping",                                    "Scoping"                                       },
+               { "swizzles",                                   "Swizzles"                                      },
+       };
+
+       for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(s_es310Tests); ndx++)
+               glslTests->addChild(createShaderLibraryGroup(testCtx,
+                                                                                                        s_es310Tests[ndx].name,
+                                                                                                        s_es310Tests[ndx].description,
+                                                                                                        std::string("vulkan/glsl/es310/") + s_es310Tests[ndx].name + ".test").release());
+
+       // ShaderRenderCase-based tests
+       glslTests->addChild(sr::createDiscardTests(testCtx));
+
+       return glslTests.release();
+}
 
 // TestPackage
 
@@ -291,9 +290,8 @@ void TestPackage::init (void)
        addChild(pipeline::createTests          (m_testCtx));
        addChild(BindingModel::createTests      (m_testCtx));
        addChild(SpirVAssembly::createTests     (m_testCtx));
-       addChild(new GlslGroup                          (m_testCtx));
+       addChild(createGlslTests                        (m_testCtx));
        addChild(createRenderPassTests          (m_testCtx));
-       addChild(sr::createTests                        (m_testCtx));
        addChild(memory::createTests            (m_testCtx));
 }