spec: rewrite header generator to use Khronos repo directly
This commit is contained in:
parent
8f0970be5d
commit
751967619b
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "specs"]
|
||||
path = specs
|
||||
url = https://github.com/KhronosGroup/Vulkan-Docs.git
|
@ -27,13 +27,15 @@ COMMENT
|
||||
COMMAND
|
||||
"${PYTHON_EXECUTABLE}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tools/spec.py"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/vk.xml"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/specs/xml/vk.xml"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/vk.hpp"
|
||||
DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tools/spec.py"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/vk.xml"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/specs/xml/vk.xml"
|
||||
)
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/specs/include/vulkan")
|
||||
|
||||
|
||||
##-----------------------------------------------------------------------------
|
||||
list (APPEND sources
|
||||
|
@ -53,7 +53,9 @@ using cruft::vk::error_code;
|
||||
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR, \
|
||||
VK_ERROR_OUT_OF_POOL_MEMORY_KHR, \
|
||||
VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, \
|
||||
VK_ERROR_INVALID_SHADER_NV)
|
||||
VK_ERROR_INVALID_SHADER_NV, \
|
||||
VK_ERROR_FRAGMENTATION_EXT, \
|
||||
VK_ERROR_NOT_PERMITTED_EXT)
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -87,6 +89,8 @@ to_string (VkResult res)
|
||||
|
||||
// EXT
|
||||
case VK_ERROR_VALIDATION_FAILED_EXT: return "validation failed";
|
||||
case VK_ERROR_FRAGMENTATION_EXT: return "too much fragmentation";
|
||||
case VK_ERROR_NOT_PERMITTED_EXT: return "not permitted";
|
||||
|
||||
// KHR
|
||||
case VK_ERROR_SURFACE_LOST_KHR: return "surface lost";
|
||||
|
48
fwd.hpp
48
fwd.hpp
@ -18,7 +18,7 @@
|
||||
#ifndef CRUFT_VK_FWD_HPP
|
||||
#define CRUFT_VK_FWD_HPP
|
||||
|
||||
#include "./vk.hpp"
|
||||
#include "vk.hpp"
|
||||
|
||||
#include <cruft/util/preprocessor.hpp>
|
||||
|
||||
@ -176,7 +176,6 @@ namespace cruft::vk {
|
||||
VkQueryResultFlagBits, \
|
||||
VkSparseMemoryBindFlagBits, \
|
||||
VkValidationCacheHeaderVersionEXT, \
|
||||
VkDeviceGroupPresentModeFlagBitsKHX, \
|
||||
VkColorSpaceKHR, \
|
||||
VkPresentModeKHR, \
|
||||
VkCommandPoolResetFlagBits, \
|
||||
@ -199,10 +198,8 @@ namespace cruft::vk {
|
||||
VkFenceCreateFlagBits, \
|
||||
VkDisplayEventTypeEXT, \
|
||||
VkDescriptorPoolCreateFlagBits, \
|
||||
VkPeerMemoryFeatureFlagBitsKHX, \
|
||||
VkCoverageModulationModeNV, \
|
||||
VkObjectType, \
|
||||
VkMemoryAllocateFlagBitsKHX, \
|
||||
VkPipelineCacheHeaderVersion, \
|
||||
VkDiscardRectangleModeEXT, \
|
||||
VkDeviceEventTypeEXT, \
|
||||
@ -220,7 +217,6 @@ namespace cruft::vk {
|
||||
VkExtent3D, \
|
||||
VkViewport, \
|
||||
VkRect2D, \
|
||||
VkRect3D, \
|
||||
VkClearRect, \
|
||||
VkComponentMapping, \
|
||||
VkPhysicalDeviceProperties, \
|
||||
@ -329,12 +325,6 @@ namespace cruft::vk {
|
||||
VkDisplaySurfaceCreateInfoKHR, \
|
||||
VkDisplayPresentInfoKHR, \
|
||||
VkSurfaceCapabilitiesKHR, \
|
||||
VkAndroidSurfaceCreateInfoKHR, \
|
||||
VkMirSurfaceCreateInfoKHR, \
|
||||
VkViSurfaceCreateInfoNN, \
|
||||
VkWaylandSurfaceCreateInfoKHR, \
|
||||
VkWin32SurfaceCreateInfoKHR, \
|
||||
VkXlibSurfaceCreateInfoKHR, \
|
||||
VkXcbSurfaceCreateInfoKHR, \
|
||||
VkSurfaceFormatKHR, \
|
||||
VkSwapchainCreateInfoKHR, \
|
||||
@ -351,9 +341,6 @@ namespace cruft::vk {
|
||||
VkExternalImageFormatPropertiesNV, \
|
||||
VkExternalMemoryImageCreateInfoNV, \
|
||||
VkExportMemoryAllocateInfoNV, \
|
||||
VkImportMemoryWin32HandleInfoNV, \
|
||||
VkExportMemoryWin32HandleInfoNV, \
|
||||
VkWin32KeyedMutexAcquireReleaseInfoNV, \
|
||||
VkDeviceGeneratedCommandsFeaturesNVX, \
|
||||
VkDeviceGeneratedCommandsLimitsNVX, \
|
||||
VkIndirectCommandsTokenNVX, \
|
||||
@ -391,55 +378,24 @@ namespace cruft::vk {
|
||||
VkExternalMemoryImageCreateInfoKHR, \
|
||||
VkExternalMemoryBufferCreateInfoKHR, \
|
||||
VkExportMemoryAllocateInfoKHR, \
|
||||
VkImportMemoryWin32HandleInfoKHR, \
|
||||
VkExportMemoryWin32HandleInfoKHR, \
|
||||
VkMemoryWin32HandlePropertiesKHR, \
|
||||
VkMemoryGetWin32HandleInfoKHR, \
|
||||
VkImportMemoryFdInfoKHR, \
|
||||
VkMemoryFdPropertiesKHR, \
|
||||
VkMemoryGetFdInfoKHR, \
|
||||
VkWin32KeyedMutexAcquireReleaseInfoKHR, \
|
||||
VkPhysicalDeviceExternalSemaphoreInfoKHR, \
|
||||
VkExternalSemaphorePropertiesKHR, \
|
||||
VkExportSemaphoreCreateInfoKHR, \
|
||||
VkImportSemaphoreWin32HandleInfoKHR, \
|
||||
VkExportSemaphoreWin32HandleInfoKHR, \
|
||||
VkD3D12FenceSubmitInfoKHR, \
|
||||
VkSemaphoreGetWin32HandleInfoKHR, \
|
||||
VkImportSemaphoreFdInfoKHR, \
|
||||
VkSemaphoreGetFdInfoKHR, \
|
||||
VkPhysicalDeviceExternalFenceInfoKHR, \
|
||||
VkExternalFencePropertiesKHR, \
|
||||
VkExportFenceCreateInfoKHR, \
|
||||
VkImportFenceWin32HandleInfoKHR, \
|
||||
VkExportFenceWin32HandleInfoKHR, \
|
||||
VkFenceGetWin32HandleInfoKHR, \
|
||||
VkImportFenceFdInfoKHR, \
|
||||
VkFenceGetFdInfoKHR, \
|
||||
VkPhysicalDeviceMultiviewFeaturesKHX, \
|
||||
VkPhysicalDeviceMultiviewPropertiesKHX, \
|
||||
VkRenderPassMultiviewCreateInfoKHX, \
|
||||
VkSurfaceCapabilities2EXT, \
|
||||
VkDisplayPowerInfoEXT, \
|
||||
VkDeviceEventInfoEXT, \
|
||||
VkDisplayEventInfoEXT, \
|
||||
VkSwapchainCounterCreateInfoEXT, \
|
||||
VkPhysicalDeviceGroupPropertiesKHX, \
|
||||
VkMemoryAllocateFlagsInfoKHX, \
|
||||
VkBindBufferMemoryInfoKHX, \
|
||||
VkBindImageMemoryInfoKHX, \
|
||||
VkDeviceGroupRenderPassBeginInfoKHX, \
|
||||
VkDeviceGroupCommandBufferBeginInfoKHX, \
|
||||
VkDeviceGroupSubmitInfoKHX, \
|
||||
VkDeviceGroupBindSparseInfoKHX, \
|
||||
VkDeviceGroupPresentCapabilitiesKHX, \
|
||||
VkImageSwapchainCreateInfoKHX, \
|
||||
VkBindImageMemorySwapchainInfoKHX, \
|
||||
VkAcquireNextImageInfoKHX, \
|
||||
VkDeviceGroupPresentInfoKHX, \
|
||||
VkDeviceGroupDeviceCreateInfoKHX, \
|
||||
VkDeviceGroupSwapchainCreateInfoKHX, \
|
||||
VkDescriptorUpdateTemplateEntryKHR, \
|
||||
VkDescriptorUpdateTemplateCreateInfoKHR, \
|
||||
VkXYColorEXT, \
|
||||
VkHdrMetadataEXT, \
|
||||
@ -447,8 +403,6 @@ namespace cruft::vk {
|
||||
VkPastPresentationTimingGOOGLE, \
|
||||
VkPresentTimesInfoGOOGLE, \
|
||||
VkPresentTimeGOOGLE, \
|
||||
VkIOSSurfaceCreateInfoMVK, \
|
||||
VkMacOSSurfaceCreateInfoMVK, \
|
||||
VkViewportWScalingNV, \
|
||||
VkPipelineViewportWScalingStateCreateInfoNV, \
|
||||
VkViewportSwizzleNV, \
|
||||
|
12
ostream.cpp
12
ostream.cpp
@ -15,13 +15,15 @@
|
||||
* 2017, Danny Robson <danny@nerdcruft.net>
|
||||
*/
|
||||
|
||||
#include "./ostream.hpp"
|
||||
#include "ostream.hpp"
|
||||
|
||||
#include "./instance.hpp"
|
||||
#include "./physical_device.hpp"
|
||||
#include "instance.hpp"
|
||||
#include "physical_device.hpp"
|
||||
|
||||
#include <cruft/util/iterator.hpp>
|
||||
|
||||
#include <iomanip>
|
||||
#include <cruft/util/iterator.hpp>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -40,6 +42,7 @@ operator<< (std::ostream &os, VkExtent3D val)
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
//-----------------------------------------------------------------------------
|
||||
std::ostream&
|
||||
operator<< (std::ostream &os, VkQueueFlags val)
|
||||
@ -54,6 +57,7 @@ operator<< (std::ostream &os, VkQueueFlags val)
|
||||
|
||||
return os << "[ " << util::make_infix (util::make_view (names, names + cursor)) << " ]";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
std::ostream& operator<< (std::ostream&, VkQueueFlags);
|
||||
//std::ostream& operator<< (std::ostream&, VkQueueFlags);
|
||||
std::ostream& operator<< (std::ostream&, VkExtent2D);
|
||||
std::ostream& operator<< (std::ostream&, VkExtent3D);
|
||||
std::ostream& operator<< (std::ostream&, VkPhysicalDeviceType);
|
||||
|
1
specs
Submodule
1
specs
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit ee13fc355fae06ffcd36ee09a98f12132d95dfc0
|
929
tools/spec.py
Executable file → Normal file
929
tools/spec.py
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user