From 13086ecc37fec225c6b7ac7980b86255c862cc81 Mon Sep 17 00:00:00 2001 From: Pyry Haulos Date: Mon, 7 Dec 2015 15:05:28 -0800 Subject: [PATCH] Clean up Vulkan test hierarcy 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 --- .../vulkancts/modules/vulkan/api/CMakeLists.txt | 12 ++-- ...ktApiBuffersTests.cpp => vktApiBufferTests.cpp} | 6 +- ...ktApiBuffersTests.hpp => vktApiBufferTests.hpp} | 7 +-- ...ryTests.cpp => vktApiBufferViewAccessTests.cpp} | 6 +- ...ryTests.hpp => vktApiBufferViewAccessTests.hpp} | 9 ++- ...onTests.cpp => vktApiBufferViewCreateTests.cpp} | 6 +- ...onTests.hpp => vktApiBufferViewCreateTests.hpp} | 9 ++- .../vulkancts/modules/vulkan/api/vktApiTests.cpp | 24 ++++++-- .../modules/vulkan/shaderrender/CMakeLists.txt | 9 +-- .../shaderrender/vktShaderRenderDiscardTests.cpp | 21 ++++++- .../shaderrender/vktShaderRenderDiscardTests.hpp | 16 +---- .../vulkan/shaderrender/vktShaderRenderTests.cpp | 55 ----------------- .../vulkan/shaderrender/vktShaderRenderTests.hpp | 48 --------------- .../vulkancts/modules/vulkan/vktTestPackage.cpp | 68 +++++++++++----------- 14 files changed, 104 insertions(+), 192 deletions(-) rename external/vulkancts/modules/vulkan/api/{vktApiBuffersTests.cpp => vktApiBufferTests.cpp} (98%) rename external/vulkancts/modules/vulkan/api/{vktApiBuffersTests.hpp => vktApiBufferTests.hpp} (94%) rename external/vulkancts/modules/vulkan/api/{vktApiBuffersViewMemoryTests.cpp => vktApiBufferViewAccessTests.cpp} (99%) rename external/vulkancts/modules/vulkan/api/{vktApiBuffersViewMemoryTests.hpp => vktApiBufferViewAccessTests.hpp} (90%) rename external/vulkancts/modules/vulkan/api/{vktApiBuffersViewCreationTests.cpp => vktApiBufferViewCreateTests.cpp} (98%) rename external/vulkancts/modules/vulkan/api/{vktApiBuffersViewCreationTests.hpp => vktApiBufferViewCreateTests.hpp} (89%) delete mode 100644 external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.cpp delete mode 100644 external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.hpp diff --git a/external/vulkancts/modules/vulkan/api/CMakeLists.txt b/external/vulkancts/modules/vulkan/api/CMakeLists.txt index f4ac568..93dcca0 100644 --- a/external/vulkancts/modules/vulkan/api/CMakeLists.txt +++ b/external/vulkancts/modules/vulkan/api/CMakeLists.txt @@ -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 diff --git a/external/vulkancts/modules/vulkan/api/vktApiBuffersTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp similarity index 98% rename from external/vulkancts/modules/vulkan/api/vktApiBuffersTests.cpp rename to external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp index 6a9dc0d..c88d1d4 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBuffersTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp @@ -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 buffersTests (new tcu::TestCaseGroup(testCtx, "buffers", "Buffers Tests")); + de::MovePtr buffersTests (new tcu::TestCaseGroup(testCtx, "buffer", "Buffer Tests")); deUint32 numberOfBufferUsageFlags = DE_LENGTH_OF_ARRAY(bufferUsageModes); deUint32 numberOfBufferCreateFlags = DE_LENGTH_OF_ARRAY(bufferCreateFlags); diff --git a/external/vulkancts/modules/vulkan/api/vktApiBuffersTests.hpp b/external/vulkancts/modules/vulkan/api/vktApiBufferTests.hpp similarity index 94% rename from external/vulkancts/modules/vulkan/api/vktApiBuffersTests.hpp rename to external/vulkancts/modules/vulkan/api/vktApiBufferTests.hpp index 7ba92a8..1fdc071 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBuffersTests.hpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferTests.hpp @@ -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 diff --git a/external/vulkancts/modules/vulkan/api/vktApiBuffersViewMemoryTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.cpp similarity index 99% rename from external/vulkancts/modules/vulkan/api/vktApiBuffersViewMemoryTests.cpp rename to external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.cpp index ae6479a..b70c150 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBuffersViewMemoryTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.cpp @@ -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 bufferViewTests (new tcu::TestCaseGroup(testCtx, "buffersViewMemory", "BufferView Memory Tests")); + de::MovePtr bufferViewTests (new tcu::TestCaseGroup(testCtx, "access", "BufferView Access Tests")); { BufferViewCaseParams info = diff --git a/external/vulkancts/modules/vulkan/api/vktApiBuffersViewMemoryTests.hpp b/external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.hpp similarity index 90% rename from external/vulkancts/modules/vulkan/api/vktApiBuffersViewMemoryTests.hpp rename to external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.hpp index a7fda46..7445d0d 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBuffersViewMemoryTests.hpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.hpp @@ -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 diff --git a/external/vulkancts/modules/vulkan/api/vktApiBuffersViewCreationTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.cpp similarity index 98% rename from external/vulkancts/modules/vulkan/api/vktApiBuffersViewCreationTests.cpp rename to external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.cpp index aec1036..91cbf67 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBuffersViewCreationTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.cpp @@ -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 bufferViewTests (new tcu::TestCaseGroup(testCtx, "buffersView", "BufferView Tests")); + de::MovePtr 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++) diff --git a/external/vulkancts/modules/vulkan/api/vktApiBuffersViewCreationTests.hpp b/external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.hpp similarity index 89% rename from external/vulkancts/modules/vulkan/api/vktApiBuffersViewCreationTests.hpp rename to external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.hpp index 62f90c7..8a46454 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBuffersViewCreationTests.hpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.hpp @@ -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 diff --git a/external/vulkancts/modules/vulkan/api/vktApiTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiTests.cpp index 8046a5f..47ed995 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiTests.cpp @@ -39,15 +39,30 @@ #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 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 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(); } diff --git a/external/vulkancts/modules/vulkan/shaderrender/CMakeLists.txt b/external/vulkancts/modules/vulkan/shaderrender/CMakeLists.txt index 97058ca..83ae801 100644 --- a/external/vulkancts/modules/vulkan/shaderrender/CMakeLists.txt +++ b/external/vulkancts/modules/vulkan/shaderrender/CMakeLists.txt @@ -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}) diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.cpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.cpp index 904eea3..30e382f 100644 --- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.cpp +++ b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.cpp @@ -34,6 +34,7 @@ *//*--------------------------------------------------------------------*/ #include "vktShaderRenderDiscardTests.hpp" +#include "vktShaderRender.hpp" #include "tcuStringTemplate.hpp" #include "gluTexture.hpp" @@ -367,7 +368,18 @@ de::MovePtr makeDiscardCase (tcu::TestContext& testCtx, Disca return de::MovePtr(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 diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.hpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.hpp index 239ac21..1bc4c98 100644 --- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.hpp +++ b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderDiscardTests.hpp @@ -35,25 +35,15 @@ * \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 index 45fe711..0000000 --- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.cpp +++ /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 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 index ef7cb77..0000000 --- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTests.hpp +++ /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 diff --git a/external/vulkancts/modules/vulkan/vktTestPackage.cpp b/external/vulkancts/modules/vulkan/vktTestPackage.cpp index 00754e3..9cde825 100644 --- a/external/vulkancts/modules/vulkan/vktTestPackage.cpp +++ b/external/vulkancts/modules/vulkan/vktTestPackage.cpp @@ -53,8 +53,8 @@ #include "vktSpvAsmTests.hpp" #include "vktShaderLibrary.hpp" #include "vktRenderPassTests.hpp" -#include "vktShaderRenderTests.hpp" #include "vktMemoryTests.hpp" +#include "vktShaderRenderDiscardTests.hpp" #include #include @@ -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 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)); } -- 2.7.4