/*------------------------------------------------------------------------ * Vulkan Conformance Tests * ------------------------ * * Copyright (c) 2015 The Khronos Group Inc. * Copyright (c) 2015 Intel Corporation * Copyright (c) 2023 LunarG, Inc. * Copyright (c) 2023 Nintendo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *//*! * \file * \brief Dynamic State Tests *//*--------------------------------------------------------------------*/ #include "vktDynamicStateTests.hpp" #include "vktDynamicStateVPTests.hpp" #include "vktDynamicStateRSTests.hpp" #include "vktDynamicStateCBTests.hpp" #include "vktDynamicStateDSTests.hpp" #include "vktDynamicStateGeneralTests.hpp" #include "vktDynamicStateComputeTests.hpp" #include "vktDynamicStateInheritanceTests.hpp" #include "vktDynamicStateClearTests.hpp" #include "vktDynamicStateDiscardTests.hpp" #include "vktDynamicStateLineWidthTests.hpp" #include "vktTestGroupUtil.hpp" namespace vkt { namespace DynamicState { namespace { void createChildren (tcu::TestCaseGroup* group, vk::PipelineConstructionType pipelineConstructionType) { tcu::TestContext& testCtx = group->getTestContext(); group->addChild(new DynamicStateVPTests (testCtx, pipelineConstructionType)); group->addChild(new DynamicStateRSTests (testCtx, pipelineConstructionType)); group->addChild(new DynamicStateCBTests (testCtx, pipelineConstructionType)); group->addChild(new DynamicStateDSTests (testCtx, pipelineConstructionType)); group->addChild(new DynamicStateGeneralTests (testCtx, pipelineConstructionType)); group->addChild(new DynamicStateInheritanceTests (testCtx, pipelineConstructionType)); group->addChild(new DynamicStateClearTests (testCtx, pipelineConstructionType)); group->addChild(new DynamicStateDiscardTests (testCtx, pipelineConstructionType)); group->addChild(new DynamicStateLWTests (testCtx, pipelineConstructionType)); if (pipelineConstructionType == vk::PIPELINE_CONSTRUCTION_TYPE_MONOLITHIC || pipelineConstructionType == vk::PIPELINE_CONSTRUCTION_TYPE_SHADER_OBJECT_UNLINKED_SPIRV) group->addChild(createDynamicStateComputeTests (testCtx, pipelineConstructionType)); } void cleanupGroup(tcu::TestCaseGroup*) { // Destroy singleton objects. cleanupDevice(); } void initDynamicStateTestGroup (tcu::TestCaseGroup* mainGroup) { auto& testCtx = mainGroup->getTestContext(); de::MovePtr monolithicGroup (createTestGroup(testCtx, "monolithic", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_MONOLITHIC)); de::MovePtr pipelineLibraryGroup (createTestGroup(testCtx, "pipeline_library", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_LINK_TIME_OPTIMIZED_LIBRARY)); de::MovePtr fastLinkedLibraryGroup (createTestGroup(testCtx, "fast_linked_library", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_FAST_LINKED_LIBRARY)); de::MovePtr shaderObjectUnlinkedSpirvGroup (createTestGroup(testCtx, "shader_object_unlinked_spirv", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_SHADER_OBJECT_UNLINKED_SPIRV)); de::MovePtr shaderObjectUnlinkedBinaryGroup (createTestGroup(testCtx, "shader_object_unlinked_binary", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_SHADER_OBJECT_UNLINKED_BINARY)); de::MovePtr shaderObjectLinkedSpirvGroup (createTestGroup(testCtx, "shader_object_linked_spirv", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_SHADER_OBJECT_LINKED_SPIRV)); de::MovePtr shaderObjectLinkedBinaryGroup (createTestGroup(testCtx, "shader_object_linked_binary", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_SHADER_OBJECT_LINKED_BINARY)); mainGroup->addChild(monolithicGroup.release()); mainGroup->addChild(pipelineLibraryGroup.release()); mainGroup->addChild(fastLinkedLibraryGroup.release()); mainGroup->addChild(shaderObjectUnlinkedSpirvGroup.release()); mainGroup->addChild(shaderObjectUnlinkedBinaryGroup.release()); mainGroup->addChild(shaderObjectLinkedSpirvGroup.release()); mainGroup->addChild(shaderObjectLinkedBinaryGroup.release()); } } // anonymous tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx, const std::string& name) { // Dynamic State Tests return createTestGroup(testCtx, name.c_str(), initDynamicStateTestGroup, cleanupGroup); } } // DynamicState } // vkt