From 0af9093389232d99f167dc84f5ccb4eab754f170 Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Wed, 19 Feb 2020 18:50:49 +0100 Subject: [PATCH] Extend ConstExpression2DArrayCopy to support const T src[N][M]. --- VulkanHppGenerator.cpp | 18 +++++++++++++++--- vulkan/vulkan.hpp | 18 +++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 2fb0d20..a4a34ca 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -5422,14 +5422,14 @@ static const std::string constExpressionArrayCopy = R"( public: VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N], std::array const& src) VULKAN_HPP_NOEXCEPT { - dst[I-1] = src[I-1]; ConstExpression1DArrayCopy::copy(dst, src); + dst[I-1] = src[I-1]; } VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N], const T src[N]) VULKAN_HPP_NOEXCEPT { - dst[I - 1] = src[I - 1]; ConstExpression1DArrayCopy::copy(dst, src); + dst[I - 1] = src[I - 1]; } }; @@ -5447,8 +5447,14 @@ static const std::string constExpressionArrayCopy = R"( public: VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N][M], std::array, N> const& src) VULKAN_HPP_NOEXCEPT { - dst[I - 1][J - 1] = src[I - 1][J - 1]; ConstExpression2DArrayCopy::copy(dst, src); + dst[I - 1][J - 1] = src[I - 1][J - 1]; + } + + VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N][M], const T src[N][M]) VULKAN_HPP_NOEXCEPT + { + ConstExpression2DArrayCopy::copy(dst, src); + dst[I - 1][J - 1] = src[I - 1][J - 1]; } }; @@ -5460,6 +5466,11 @@ static const std::string constExpressionArrayCopy = R"( { ConstExpression2DArrayCopy::copy(dst, src); } + + VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N][M], const T src[N][M]) VULKAN_HPP_NOEXCEPT + { + ConstExpression2DArrayCopy::copy(dst, src); + } }; template @@ -5467,6 +5478,7 @@ static const std::string constExpressionArrayCopy = R"( { public: VULKAN_HPP_CONSTEXPR_14 static void copy(T /*dst*/[N][M], std::array, N> const& /*src*/) VULKAN_HPP_NOEXCEPT {} + VULKAN_HPP_CONSTEXPR_14 static void copy(T /*dst*/[N][M], const T /*src*/[N][M]) VULKAN_HPP_NOEXCEPT {} }; )"; diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 0fb27f9..5e5c670 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -2865,14 +2865,14 @@ namespace VULKAN_HPP_NAMESPACE public: VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N], std::array const& src) VULKAN_HPP_NOEXCEPT { - dst[I-1] = src[I-1]; ConstExpression1DArrayCopy::copy(dst, src); + dst[I-1] = src[I-1]; } VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N], const T src[N]) VULKAN_HPP_NOEXCEPT { - dst[I - 1] = src[I - 1]; ConstExpression1DArrayCopy::copy(dst, src); + dst[I - 1] = src[I - 1]; } }; @@ -2890,8 +2890,14 @@ namespace VULKAN_HPP_NAMESPACE public: VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N][M], std::array, N> const& src) VULKAN_HPP_NOEXCEPT { - dst[I - 1][J - 1] = src[I - 1][J - 1]; ConstExpression2DArrayCopy::copy(dst, src); + dst[I - 1][J - 1] = src[I - 1][J - 1]; + } + + VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N][M], const T src[N][M]) VULKAN_HPP_NOEXCEPT + { + ConstExpression2DArrayCopy::copy(dst, src); + dst[I - 1][J - 1] = src[I - 1][J - 1]; } }; @@ -2903,6 +2909,11 @@ namespace VULKAN_HPP_NAMESPACE { ConstExpression2DArrayCopy::copy(dst, src); } + + VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N][M], const T src[N][M]) VULKAN_HPP_NOEXCEPT + { + ConstExpression2DArrayCopy::copy(dst, src); + } }; template @@ -2910,6 +2921,7 @@ namespace VULKAN_HPP_NAMESPACE { public: VULKAN_HPP_CONSTEXPR_14 static void copy(T /*dst*/[N][M], std::array, N> const& /*src*/) VULKAN_HPP_NOEXCEPT {} + VULKAN_HPP_CONSTEXPR_14 static void copy(T /*dst*/[N][M], const T /*src*/[N][M]) VULKAN_HPP_NOEXCEPT {} }; using Bool32 = uint32_t;