mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Use new Vulkan-Headers repository. Don't generate createReturnValue function call if the return type is void. (#335)
This commit is contained in:
parent
d2a1056a56
commit
50e0a941e9
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -7,6 +7,6 @@
|
||||
[submodule "tinyxml2"]
|
||||
path = tinyxml2
|
||||
url = https://github.com/leethomason/tinyxml2.git
|
||||
[submodule "Vulkan-Docs"]
|
||||
path = Vulkan-Docs
|
||||
url = https://github.com/KhronosGroup/Vulkan-Docs.git
|
||||
[submodule "Vulkan-Headers"]
|
||||
path = Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
|
@ -33,4 +33,4 @@ script:
|
||||
- echo " vk::Result result = vk::createInstance(&inst_info, nullptr, &inst);" >> /tmp/test.cpp
|
||||
- echo "}" >> /tmp/test.cpp
|
||||
- cat /tmp/test.cpp
|
||||
- ${CXX} -std=c++11 -Ivulkan -IVulkan-Docs/include -c /tmp/test.cpp
|
||||
- ${CXX} -std=c++11 -Ivulkan -IVulkan-Headers/include -c /tmp/test.cpp
|
||||
|
@ -36,11 +36,11 @@ else(MSVC)
|
||||
add_compile_options(-Wall)
|
||||
endif(MSVC)
|
||||
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Docs/xml/vk.xml vk_spec)
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/registry/vk.xml vk_spec)
|
||||
string(REPLACE "\\" "\\\\" vk_spec ${vk_spec})
|
||||
add_definitions(-DVK_SPEC="${vk_spec}")
|
||||
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/vulkan/vulkan.hpp vulkan_hpp)
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include/vulkan.hpp vulkan_hpp)
|
||||
string(REPLACE "\\" "\\\\" vulkan_hpp ${vulkan_hpp})
|
||||
add_definitions(-DVULKAN_HPP_FILE="${vulkan_hpp}")
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 6635a81b5b9dea234faf967d54abf7241db371c9
|
1
Vulkan-Headers
Submodule
1
Vulkan-Headers
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 097a1045098213919fd56442f52c716fc78eeb27
|
@ -2651,6 +2651,7 @@ void VulkanHppGenerator::writeFunctionBodyEnhanced(std::ostream & os, std::strin
|
||||
|
||||
if ((commandData.second.returnType == "VkResult") || !commandData.second.successCodes.empty())
|
||||
{
|
||||
|
||||
writeFunctionBodyEnhancedReturnResultValue(os, indentation, returnName, commandName, commandData, returnParamIndex, twoStep, singular, unique);
|
||||
}
|
||||
else if ((returnParamIndex != INVALID_INDEX) && (stripPrefix(commandData.second.returnType, "Vk") != enhancedReturnType))
|
||||
@ -2795,6 +2796,11 @@ void VulkanHppGenerator::writeFunctionBodyEnhancedReturnResultValue(std::ostream
|
||||
std::string type = (returnParamIndex != INVALID_INDEX) ? commandData.second.params[returnParamIndex].type.type : "";
|
||||
std::string returnVectorName = (returnParamIndex != INVALID_INDEX) ? stripPostfix(stripPrefix(commandData.second.params[returnParamIndex].name, "p"), "s") : "";
|
||||
|
||||
if (commandData.second.returnType == "void") {
|
||||
std::cerr << "warning: skipping writeFunctionBodyEnhancedReturnResultValue for function " << commandName << " because the returnType is void";
|
||||
return;
|
||||
}
|
||||
|
||||
assert(m_commandToHandle.find(commandData.first) != m_commandToHandle.end());
|
||||
std::string const& handle = m_commandToHandle.find(commandData.first)->second;
|
||||
|
||||
|
@ -29,7 +29,7 @@ endif()
|
||||
FILE (GLOB linkunits ${CMAKE_CURRENT_SOURCE_DIR}/*)
|
||||
|
||||
if (SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP)
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Docs/include")
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Headers/include")
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
else()
|
||||
include_directories("${Vulkan_INCLUDE_DIRS}")
|
||||
|
@ -29,7 +29,7 @@ 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}/../Vulkan-Headers/include")
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
else()
|
||||
include_directories("${Vulkan_INCLUDE_DIRS}")
|
||||
|
58349
vulkan/vulkan.hpp
58349
vulkan/vulkan.hpp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user