diff --git a/CMakeLists.txt b/CMakeLists.txt index 520536b..2d9f4aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,11 @@ set_property(TARGET VulkanHppGenerator PROPERTY CXX_STANDARD 11) target_include_directories(VulkanHppGenerator PRIVATE "${CMAKE_SOURCE_DIR}/tinyxml2") option (SAMPLES_BUILD OFF) - if (SAMPLES_BUILD) add_subdirectory(samples) -endif (SAMPLES_BUILD) \ No newline at end of file +endif (SAMPLES_BUILD) + +option (TESTS_BUILD OFF) +if (TESTS_BUILD) + add_subdirectory(tests) +endif (TESTS_BUILD) \ No newline at end of file diff --git a/README.md b/README.md index 6dabff4..20d1242 100644 --- a/README.md +++ b/README.md @@ -191,15 +191,22 @@ vk::StructureChain c = }; ``` -Sometimes the user has to pass a preallocated structure chain to query information. In those cases the corresponding query functions are variadic templates and do accept a structure chain to construct the return value: +Sometimes the user has to pass a preallocated structure chain to query information. For those cases there are two corresponding getter functions. One with a variadic template generating a structure chain of at least two elements to construct the return value: ``` -// Query vk::MemoryRequirements2KHR and vk::MemoryDedicatedRequirementsKHR when calling Device::getBufferMemoryRequirements2KHR: +// Query vk::MemoryRequirements2HR and vk::MemoryDedicatedRequirementsKHR when calling Device::getBufferMemoryRequirements2KHR: auto result = device.getBufferMemoryRequirements2KHR({}); vk::MemoryRequirements2KHR &memReqs = result.get(); vk::MemoryDedicatedRequirementsKHR &dedMemReqs = result.get(); ``` +To get just the base structure, without chaining, the other getter function provided does not need a template argument for the structure to get: + +``` +// Query just vk::MemoryRequirements2KHR +vk::MemoryRequirements2KHR memoryRequirements = device.getBufferMemoryRequirements2KHR({}); +``` + ### Return values, Error Codes & Exceptions By default Vulkan-Hpp has exceptions enabled. This means that Vulkan-Hpp checks the return code of each function call which returns a Vk::Result. If Vk::Result is a failure a std::runtime_error will be thrown. Since there is no need to return the error code anymore the C++ bindings can now return the actual desired return value, i.e. a vulkan handle. In those cases ResultValue ::type is defined as the returned type. diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 2048ffa..9608f52 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -3425,7 +3425,7 @@ std::string VulkanHppGenerator::writeFunctionBodyEnhancedLocalReturnVariable(std { std::string const &pureType = commandData.params[commandData.returnParam].pureType; // For StructureChains use the template parameters - os << "StructureChain structureChain;" << std::endl; + os << "StructureChain structureChain;" << std::endl; returnName = stripPluralS(returnName); os << indentation << " " << pureType << "& " << returnName << " = structureChain.template get<" << pureType << ">()"; returnName = "structureChain"; @@ -3444,7 +3444,7 @@ std::string VulkanHppGenerator::writeFunctionBodyEnhancedLocalReturnVariable(std { std::string const &returnType = commandData.enhancedReturnType; // For StructureChains use the template parameters - os << "StructureChain structureChain;" << std::endl; + os << "StructureChain structureChain;" << std::endl; os << indentation << " " << returnType << "& " << returnName << " = structureChain.template get<" << returnType << ">()"; returnName = "structureChain"; } @@ -3963,7 +3963,7 @@ void VulkanHppGenerator::writeFunctionHeaderReturnType(std::ostream & os, Comman bool returnsVector = !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end()); templateString += returnsVector ? "ResultValueType,Allocator>>::type " : "typename ResultValueType>::type "; - returnType = isStructureChain ? "StructureChain" : commandData.params[commandData.returnParam].pureType; + returnType = isStructureChain ? "StructureChain" : commandData.params[commandData.returnParam].pureType; } else if ((commandData.enhancedReturnType != commandData.returnType) && (commandData.returnType != "void")) { @@ -3974,7 +3974,7 @@ void VulkanHppGenerator::writeFunctionHeaderReturnType(std::ostream & os, Comman // in singular case, we create the ResultValueType from the pure return type, otherwise from the enhanced return type if (isStructureChain) { - returnType = "StructureChain"; + returnType = "StructureChain"; } else { @@ -3986,13 +3986,13 @@ void VulkanHppGenerator::writeFunctionHeaderReturnType(std::ostream & os, Comman // if there is a return parameter at all, and there are multiple success codes, we return a ResultValue<...> with the pure return type assert(commandData.returnType == "Result"); templateString = "ResultValue<${returnType}> "; - returnType = isStructureChain ? "StructureChain" : commandData.params[commandData.returnParam].pureType; + returnType = isStructureChain ? "StructureChain" : commandData.params[commandData.returnParam].pureType; } else { // and in every other case, we just return the enhanced return type. templateString = "${returnType} "; - returnType = isStructureChain ? "StructureChain" : commandData.enhancedReturnType; + returnType = isStructureChain ? "StructureChain" : commandData.enhancedReturnType; } } else @@ -4009,7 +4009,7 @@ void VulkanHppGenerator::writeFunctionHeaderTemplate(std::ostream & os, std::str std::string dispatch = withDefault ? std::string("typename Dispatch = DispatchLoaderStatic") : std::string("typename Dispatch"); if (enhanced && isStructureChain) { - os << indentation << "template " << std::endl; + os << indentation << "template " << std::endl; } else if (enhanced && (commandData.templateParam != ~0) && ((commandData.templateParam != commandData.returnParam) || (commandData.enhancedReturnType == "Result"))) { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..c74563d --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# 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. + +cmake_minimum_required(VERSION 3.2) + +project(Vulkan-Hpp_Tests) + +option (TESTS_BUILD_WITH_LOCAL_VULKAN_HPP OFF) + +if (CMAKE_SYSTEM_NAME MATCHES "Windows") + add_definitions(-DNOMINMAX -DVK_USE_PLATFORM_WIN32_KHR) +else() + error("unhandled platform !") +endif() + +FILE (GLOB linkunits ${CMAKE_CURRENT_SOURCE_DIR}/*) + +if (TESTS_BUILD_WITH_LOCAL_VULKAN_HPP) + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Docs/include") + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..") +else() + include_directories("$ENV{VK_SDK_PATH}/include") +endif() + +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../glm") + +FOREACH( linkunit ${linkunits} ) + if( IS_DIRECTORY ${linkunit} ) + if( EXISTS ${linkunit}/CMakeLists.txt ) + string( REGEX REPLACE "^.*/([^/]*)$" "\\1" LINK_NAME ${linkunit} ) + add_subdirectory( ${LINK_NAME} ) + endif() + endif() +ENDFOREACH( linkunit ${linkunits} ) diff --git a/tests/StructureChain/CMakeLists.txt b/tests/StructureChain/CMakeLists.txt new file mode 100644 index 0000000..46b8fa0 --- /dev/null +++ b/tests/StructureChain/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# 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. + +cmake_minimum_required(VERSION 3.2) + +project(StructureChain) + +set(HEADERS +) + +set(SOURCES + StructureChain.cpp +) + +source_group(headers FILES ${HEADERS}) +source_group(sources FILES ${SOURCES}) + +add_executable(StructureChain + ${HEADERS} + ${SOURCES} +) + +set_target_properties(StructureChain PROPERTIES FOLDER "Tests") +target_link_libraries(StructureChain "$ENV{VK_SDK_PATH}/Lib/vulkan-1.lib") diff --git a/tests/StructureChain/StructureChain.cpp b/tests/StructureChain/StructureChain.cpp new file mode 100644 index 0000000..dcbd32f --- /dev/null +++ b/tests/StructureChain/StructureChain.cpp @@ -0,0 +1,72 @@ +// Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved. +// +// 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. +// +// VulkanHpp Tests : StructureChain +// Compile-test for StructureChains + +#include "vulkan/vulkan.hpp" +#include + +static char const* AppName = "StructureChain"; +static char const* EngineName = "Vulkan.hpp"; + +#if defined(_MSC_VER) +#pragma warning( disable : 4189 ) +#elif defined(__GNUC__) +#pragma GCC diagnostic ignored "-Wunused-variable" +#else +// unknow compiler... just ignore the warnings for yourselves ;) +#endif + +int main(int /*argc*/, char * /*argv[]*/) +{ + try + { + vk::ApplicationInfo appInfo(AppName, 1, EngineName, 1, VK_API_VERSION_1_1); + vk::UniqueInstance instance = vk::createInstanceUnique(vk::InstanceCreateInfo({}, &appInfo)); + std::vector physicalDevices = instance->enumeratePhysicalDevices(); + + vk::PhysicalDevice & pd = physicalDevices[0]; + + // simple call, passing structures in + vk::PhysicalDeviceFeatures2 pdf; + pd.getFeatures2(&pdf); + + vk::StructureChain z; + + // simple calls, getting structure back + vk::PhysicalDeviceFeatures2 a = pd.getFeatures2(); + vk::PhysicalDeviceFeatures2 b = pd.getFeatures2(vk::DispatchLoaderStatic()); + + // complex calls, getting StructureChain back + auto c = pd.getFeatures2(); + vk::PhysicalDeviceFeatures2 & c0 = c.get(); + vk::PhysicalDeviceVariablePointerFeatures & c1 = c.get(); + + auto d = pd.getFeatures2(vk::DispatchLoaderStatic()); + vk::PhysicalDeviceFeatures2 & d0 = d.get(); + vk::PhysicalDeviceVariablePointerFeatures & d1 = d.get(); + } + catch (vk::SystemError err) + { + std::cout << "vk::SystemError: " << err.what() << std::endl; + exit(-1); + } + catch (...) + { + std::cout << "unknown error\n"; + exit(-1); + } + return 0; +} diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 680e0ee..218499c 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -36488,8 +36488,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template MemoryRequirements2 getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; - template - StructureChain getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; + template + StructureChain getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -36497,8 +36497,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template MemoryRequirements2 getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; - template - StructureChain getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; + template + StructureChain getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -36506,8 +36506,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template MemoryRequirements2 getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; - template - StructureChain getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; + template + StructureChain getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -36515,8 +36515,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template MemoryRequirements2 getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; - template - StructureChain getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; + template + StructureChain getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -36627,8 +36627,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const; - template - StructureChain getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const; + template + StructureChain getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -36636,8 +36636,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template DescriptorSetLayoutSupport getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const; - template - StructureChain getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const; + template + StructureChain getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -36685,8 +36685,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ResultValueType::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d = Dispatch() ) const; - template - typename ResultValueType>::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d = Dispatch() ) const; + template + typename ResultValueType>::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/ @@ -39281,10 +39281,10 @@ public: d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } - template - VULKAN_HPP_INLINE StructureChain Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; MemoryRequirements2& memoryRequirements = structureChain.template get(); d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; @@ -39304,10 +39304,10 @@ public: d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } - template - VULKAN_HPP_INLINE StructureChain Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; MemoryRequirements2& memoryRequirements = structureChain.template get(); d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; @@ -39327,10 +39327,10 @@ public: d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } - template - VULKAN_HPP_INLINE StructureChain Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; MemoryRequirements2& memoryRequirements = structureChain.template get(); d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; @@ -39350,10 +39350,10 @@ public: d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } - template - VULKAN_HPP_INLINE StructureChain Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; MemoryRequirements2& memoryRequirements = structureChain.template get(); d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; @@ -39608,10 +39608,10 @@ public: d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return support; } - template - VULKAN_HPP_INLINE StructureChain Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; DescriptorSetLayoutSupport& support = structureChain.template get(); d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return structureChain; @@ -39631,10 +39631,10 @@ public: d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return support; } - template - VULKAN_HPP_INLINE StructureChain Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; DescriptorSetLayoutSupport& support = structureChain.template get(); d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return structureChain; @@ -39751,10 +39751,10 @@ public: Result result = static_cast( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast( &properties ) ) ); return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::Device::getAndroidHardwareBufferPropertiesANDROID" ); } - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; AndroidHardwareBufferPropertiesANDROID& properties = structureChain.template get(); Result result = static_cast( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast( &properties ) ) ); return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::Device::getAndroidHardwareBufferPropertiesANDROID" ); @@ -40033,8 +40033,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template PhysicalDeviceFeatures2 getFeatures2(Dispatch const &d = Dispatch() ) const; - template - StructureChain getFeatures2(Dispatch const &d = Dispatch() ) const; + template + StructureChain getFeatures2(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -40042,8 +40042,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template PhysicalDeviceFeatures2 getFeatures2KHR(Dispatch const &d = Dispatch() ) const; - template - StructureChain getFeatures2KHR(Dispatch const &d = Dispatch() ) const; + template + StructureChain getFeatures2KHR(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -40051,8 +40051,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template PhysicalDeviceProperties2 getProperties2(Dispatch const &d = Dispatch() ) const; - template - StructureChain getProperties2(Dispatch const &d = Dispatch() ) const; + template + StructureChain getProperties2(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -40060,8 +40060,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template PhysicalDeviceProperties2 getProperties2KHR(Dispatch const &d = Dispatch() ) const; - template - StructureChain getProperties2KHR(Dispatch const &d = Dispatch() ) const; + template + StructureChain getProperties2KHR(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -40083,8 +40083,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ResultValueType::type getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const; - template - typename ResultValueType>::type getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const; + template + typename ResultValueType>::type getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -40092,8 +40092,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ResultValueType::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const; - template - typename ResultValueType>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const; + template + typename ResultValueType>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -40232,8 +40232,8 @@ public: #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ResultValueType::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const; - template - typename ResultValueType>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const; + template + typename ResultValueType>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -40826,10 +40826,10 @@ public: d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( &features ) ); return features; } - template - VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2(Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2(Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; PhysicalDeviceFeatures2& features = structureChain.template get(); d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( &features ) ); return structureChain; @@ -40849,10 +40849,10 @@ public: d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); return features; } - template - VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; PhysicalDeviceFeatures2& features = structureChain.template get(); d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); return structureChain; @@ -40872,10 +40872,10 @@ public: d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } - template - VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2(Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2(Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; PhysicalDeviceProperties2& properties = structureChain.template get(); d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( &properties ) ); return structureChain; @@ -40895,10 +40895,10 @@ public: d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } - template - VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2KHR(Dispatch const &d ) const + template + VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2KHR(Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; PhysicalDeviceProperties2& properties = structureChain.template get(); d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); return structureChain; @@ -40948,10 +40948,10 @@ public: Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2" ); } - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; ImageFormatProperties2& imageFormatProperties = structureChain.template get(); Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2" ); @@ -40971,10 +40971,10 @@ public: Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2KHR" ); } - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; ImageFormatProperties2& imageFormatProperties = structureChain.template get(); Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2KHR" ); @@ -41292,10 +41292,10 @@ public: Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2KHR" ); } - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const { - StructureChain structureChain; + StructureChain structureChain; SurfaceCapabilities2KHR& surfaceCapabilities = structureChain.template get(); Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2KHR" );