/*------------------------------------------------------------------------ * Vulkan Conformance Tests * ------------------------ * * Copyright (c) 2014 The Android Open Source Project * Copyright (c) 2016 The Khronos Group Inc. * * 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 Tessellation Fractional Spacing Tests *//*--------------------------------------------------------------------*/ #include "vktTessellationFractionalSpacingTests.hpp" #include "vktTestCaseUtil.hpp" #include "vktTessellationUtil.hpp" #include "tcuTestLog.hpp" #include "vkDefs.hpp" #include "vkBarrierUtil.hpp" #include "vkQueryUtil.hpp" #include "vkBuilderUtil.hpp" #include "vkTypeUtil.hpp" #include "vkCmdUtil.hpp" #include "vkObjUtil.hpp" #include "vkBufferWithMemory.hpp" #include "vkImageWithMemory.hpp" #include "deUniquePtr.hpp" #include "deStringUtil.hpp" #include #include namespace vkt { namespace tessellation { using namespace vk; namespace { template std::vector members (const std::vector& objs, MembT T::* membP) { std::vector result(objs.size()); for (int i = 0; i < static_cast(objs.size()); ++i) result[i] = objs[i].*membP; return result; } //! Predicate functor for comparing structs by their members. template class MemberPred { public: MemberPred (MembT T::* membP) : m_membP(membP), m_pred(Pred()) {} bool operator() (const T& a, const T& b) const { return m_pred(a.*m_membP, b.*m_membP); } private: MembT T::* m_membP; Pred m_pred; }; //! Convenience wrapper for MemberPred, because class template arguments aren't deduced based on constructor arguments. template