Update for Vulkan-Docs 1.1.105
This commit is contained in:
parent
16a43fcfe4
commit
71be0a4302
@ -77,4 +77,10 @@
|
|||||||
#include "vulkan_xlib_xrandr.h"
|
#include "vulkan_xlib_xrandr.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef VK_USE_PLATFORM_GGP
|
||||||
|
#include <ggp_c/vulkan_types.h>
|
||||||
|
#include "vulkan_ggp.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // VULKAN_H_
|
#endif // VULKAN_H_
|
||||||
|
@ -27,14 +27,12 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_android_surface 1
|
#define VK_KHR_android_surface 1
|
||||||
struct ANativeWindow;
|
struct ANativeWindow;
|
||||||
|
|
||||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
||||||
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
||||||
|
|
||||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
||||||
|
|
||||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -42,7 +40,6 @@ typedef struct VkAndroidSurfaceCreateInfoKHR {
|
|||||||
struct ANativeWindow* window;
|
struct ANativeWindow* window;
|
||||||
} VkAndroidSurfaceCreateInfoKHR;
|
} VkAndroidSurfaceCreateInfoKHR;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
#ifndef VK_NO_PROTOTYPES
|
||||||
@ -53,12 +50,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
|||||||
VkSurfaceKHR* pSurface);
|
VkSurfaceKHR* pSurface);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||||
struct AHardwareBuffer;
|
struct AHardwareBuffer;
|
||||||
|
|
||||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
||||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
||||||
|
|
||||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
void* pNext;
|
void* pNext;
|
||||||
@ -103,7 +99,6 @@ typedef struct VkExternalFormatANDROID {
|
|||||||
uint64_t externalFormat;
|
uint64_t externalFormat;
|
||||||
} VkExternalFormatANDROID;
|
} VkExternalFormatANDROID;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -27,12 +27,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_FUCHSIA_imagepipe_surface 1
|
#define VK_FUCHSIA_imagepipe_surface 1
|
||||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
||||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
||||||
|
|
||||||
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
||||||
|
|
||||||
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -40,7 +39,6 @@ typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
|||||||
zx_handle_t imagePipeHandle;
|
zx_handle_t imagePipeHandle;
|
||||||
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
#ifndef VK_NO_PROTOTYPES
|
||||||
|
67
include/vulkan/vulkan_ggp.h
Normal file
67
include/vulkan/vulkan_ggp.h
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#ifndef VULKAN_GGP_H_
|
||||||
|
#define VULKAN_GGP_H_ 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2015-2019 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define VK_GGP_stream_descriptor_surface 1
|
||||||
|
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1
|
||||||
|
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface"
|
||||||
|
typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP;
|
||||||
|
typedef struct VkStreamDescriptorSurfaceCreateInfoGGP {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkStreamDescriptorSurfaceCreateFlagsGGP flags;
|
||||||
|
GgpStreamDescriptor streamDescriptor;
|
||||||
|
} VkStreamDescriptorSurfaceCreateInfoGGP;
|
||||||
|
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
|
|
||||||
|
#ifndef VK_NO_PROTOTYPES
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(
|
||||||
|
VkInstance instance,
|
||||||
|
const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
|
||||||
|
const VkAllocationCallbacks* pAllocator,
|
||||||
|
VkSurfaceKHR* pSurface);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define VK_GGP_frame_token 1
|
||||||
|
#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1
|
||||||
|
#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token"
|
||||||
|
typedef struct VkPresentFrameTokenGGP {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
GgpFrameToken frameToken;
|
||||||
|
} VkPresentFrameTokenGGP;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -27,12 +27,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_MVK_ios_surface 1
|
#define VK_MVK_ios_surface 1
|
||||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
|
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
|
||||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
||||||
|
|
||||||
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
||||||
|
|
||||||
typedef struct VkIOSSurfaceCreateInfoMVK {
|
typedef struct VkIOSSurfaceCreateInfoMVK {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -40,7 +39,6 @@ typedef struct VkIOSSurfaceCreateInfoMVK {
|
|||||||
const void* pView;
|
const void* pView;
|
||||||
} VkIOSSurfaceCreateInfoMVK;
|
} VkIOSSurfaceCreateInfoMVK;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
#ifndef VK_NO_PROTOTYPES
|
||||||
|
@ -27,12 +27,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_MVK_macos_surface 1
|
#define VK_MVK_macos_surface 1
|
||||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
|
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
|
||||||
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
||||||
|
|
||||||
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
|
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
|
||||||
|
|
||||||
typedef struct VkMacOSSurfaceCreateInfoMVK {
|
typedef struct VkMacOSSurfaceCreateInfoMVK {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -40,7 +39,6 @@ typedef struct VkMacOSSurfaceCreateInfoMVK {
|
|||||||
const void* pView;
|
const void* pView;
|
||||||
} VkMacOSSurfaceCreateInfoMVK;
|
} VkMacOSSurfaceCreateInfoMVK;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
#ifndef VK_NO_PROTOTYPES
|
||||||
|
@ -27,6 +27,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_metal_surface 1
|
#define VK_EXT_metal_surface 1
|
||||||
|
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
@ -35,12 +36,9 @@ extern "C" {
|
|||||||
typedef void CAMetalLayer;
|
typedef void CAMetalLayer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_METAL_SURFACE_SPEC_VERSION 1
|
#define VK_EXT_METAL_SURFACE_SPEC_VERSION 1
|
||||||
#define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface"
|
#define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface"
|
||||||
|
|
||||||
typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
|
typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
|
||||||
|
|
||||||
typedef struct VkMetalSurfaceCreateInfoEXT {
|
typedef struct VkMetalSurfaceCreateInfoEXT {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -48,7 +46,6 @@ typedef struct VkMetalSurfaceCreateInfoEXT {
|
|||||||
const CAMetalLayer* pLayer;
|
const CAMetalLayer* pLayer;
|
||||||
} VkMetalSurfaceCreateInfoEXT;
|
} VkMetalSurfaceCreateInfoEXT;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
#ifndef VK_NO_PROTOTYPES
|
||||||
|
@ -27,12 +27,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_NN_vi_surface 1
|
#define VK_NN_vi_surface 1
|
||||||
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
||||||
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
||||||
|
|
||||||
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
||||||
|
|
||||||
typedef struct VkViSurfaceCreateInfoNN {
|
typedef struct VkViSurfaceCreateInfoNN {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -40,7 +39,6 @@ typedef struct VkViSurfaceCreateInfoNN {
|
|||||||
void* window;
|
void* window;
|
||||||
} VkViSurfaceCreateInfoNN;
|
} VkViSurfaceCreateInfoNN;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
#ifndef VK_NO_PROTOTYPES
|
||||||
|
@ -27,12 +27,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_wayland_surface 1
|
#define VK_KHR_wayland_surface 1
|
||||||
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
||||||
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
||||||
|
|
||||||
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
||||||
|
|
||||||
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -41,7 +40,6 @@ typedef struct VkWaylandSurfaceCreateInfoKHR {
|
|||||||
struct wl_surface* surface;
|
struct wl_surface* surface;
|
||||||
} VkWaylandSurfaceCreateInfoKHR;
|
} VkWaylandSurfaceCreateInfoKHR;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
||||||
|
|
||||||
|
@ -27,12 +27,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_win32_surface 1
|
#define VK_KHR_win32_surface 1
|
||||||
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
|
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
|
||||||
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
|
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
|
||||||
|
|
||||||
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
||||||
|
|
||||||
typedef struct VkWin32SurfaceCreateInfoKHR {
|
typedef struct VkWin32SurfaceCreateInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -41,7 +40,6 @@ typedef struct VkWin32SurfaceCreateInfoKHR {
|
|||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
} VkWin32SurfaceCreateInfoKHR;
|
} VkWin32SurfaceCreateInfoKHR;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
||||||
|
|
||||||
@ -57,10 +55,10 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
|||||||
uint32_t queueFamilyIndex);
|
uint32_t queueFamilyIndex);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_external_memory_win32 1
|
#define VK_KHR_external_memory_win32 1
|
||||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
|
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
|
||||||
|
|
||||||
typedef struct VkImportMemoryWin32HandleInfoKHR {
|
typedef struct VkImportMemoryWin32HandleInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -90,7 +88,6 @@ typedef struct VkMemoryGetWin32HandleInfoKHR {
|
|||||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||||
} VkMemoryGetWin32HandleInfoKHR;
|
} VkMemoryGetWin32HandleInfoKHR;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||||
|
|
||||||
@ -107,10 +104,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
|||||||
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_win32_keyed_mutex 1
|
#define VK_KHR_win32_keyed_mutex 1
|
||||||
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||||
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
|
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
|
||||||
|
|
||||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -128,7 +125,6 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
|||||||
#define VK_KHR_external_semaphore_win32 1
|
#define VK_KHR_external_semaphore_win32 1
|
||||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
|
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
|
||||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
|
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
|
||||||
|
|
||||||
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
|
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -163,7 +159,6 @@ typedef struct VkSemaphoreGetWin32HandleInfoKHR {
|
|||||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||||
} VkSemaphoreGetWin32HandleInfoKHR;
|
} VkSemaphoreGetWin32HandleInfoKHR;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||||
|
|
||||||
@ -178,10 +173,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
|||||||
HANDLE* pHandle);
|
HANDLE* pHandle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_external_fence_win32 1
|
#define VK_KHR_external_fence_win32 1
|
||||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
|
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
|
||||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
|
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
|
||||||
|
|
||||||
typedef struct VkImportFenceWin32HandleInfoKHR {
|
typedef struct VkImportFenceWin32HandleInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -207,7 +202,6 @@ typedef struct VkFenceGetWin32HandleInfoKHR {
|
|||||||
VkExternalFenceHandleTypeFlagBits handleType;
|
VkExternalFenceHandleTypeFlagBits handleType;
|
||||||
} VkFenceGetWin32HandleInfoKHR;
|
} VkFenceGetWin32HandleInfoKHR;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||||
|
|
||||||
@ -222,10 +216,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
|||||||
HANDLE* pHandle);
|
HANDLE* pHandle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define VK_NV_external_memory_win32 1
|
#define VK_NV_external_memory_win32 1
|
||||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
|
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
|
||||||
|
|
||||||
typedef struct VkImportMemoryWin32HandleInfoNV {
|
typedef struct VkImportMemoryWin32HandleInfoNV {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -240,7 +234,6 @@ typedef struct VkExportMemoryWin32HandleInfoNV {
|
|||||||
DWORD dwAccess;
|
DWORD dwAccess;
|
||||||
} VkExportMemoryWin32HandleInfoNV;
|
} VkExportMemoryWin32HandleInfoNV;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
#ifndef VK_NO_PROTOTYPES
|
||||||
@ -251,10 +244,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
|||||||
HANDLE* pHandle);
|
HANDLE* pHandle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define VK_NV_win32_keyed_mutex 1
|
#define VK_NV_win32_keyed_mutex 1
|
||||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
||||||
|
|
||||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -269,6 +262,70 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define VK_EXT_full_screen_exclusive 1
|
||||||
|
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 3
|
||||||
|
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
|
||||||
|
|
||||||
|
typedef enum VkFullScreenExclusiveEXT {
|
||||||
|
VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0,
|
||||||
|
VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1,
|
||||||
|
VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2,
|
||||||
|
VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3,
|
||||||
|
VK_FULL_SCREEN_EXCLUSIVE_BEGIN_RANGE_EXT = VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT,
|
||||||
|
VK_FULL_SCREEN_EXCLUSIVE_END_RANGE_EXT = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT,
|
||||||
|
VK_FULL_SCREEN_EXCLUSIVE_RANGE_SIZE_EXT = (VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT - VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT + 1),
|
||||||
|
VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||||
|
} VkFullScreenExclusiveEXT;
|
||||||
|
typedef struct VkSurfaceFullScreenExclusiveInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
void* pNext;
|
||||||
|
VkFullScreenExclusiveEXT fullScreenExclusive;
|
||||||
|
} VkSurfaceFullScreenExclusiveInfoEXT;
|
||||||
|
|
||||||
|
typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
void* pNext;
|
||||||
|
VkBool32 fullScreenExclusiveSupported;
|
||||||
|
} VkSurfaceCapabilitiesFullScreenExclusiveEXT;
|
||||||
|
|
||||||
|
typedef struct VkPhysicalDeviceSurfaceInfo2KHR {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkSurfaceKHR surface;
|
||||||
|
} VkPhysicalDeviceSurfaceInfo2KHR;
|
||||||
|
|
||||||
|
typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
HMONITOR hmonitor;
|
||||||
|
} VkSurfaceFullScreenExclusiveWin32InfoEXT;
|
||||||
|
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes);
|
||||||
|
|
||||||
|
#ifndef VK_NO_PROTOTYPES
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(
|
||||||
|
VkPhysicalDevice physicalDevice,
|
||||||
|
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
||||||
|
uint32_t* pPresentModeCount,
|
||||||
|
VkPresentModeKHR* pPresentModes);
|
||||||
|
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(
|
||||||
|
VkDevice device,
|
||||||
|
VkSwapchainKHR swapchain);
|
||||||
|
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(
|
||||||
|
VkDevice device,
|
||||||
|
VkSwapchainKHR swapchain);
|
||||||
|
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
|
||||||
|
VkDevice device,
|
||||||
|
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
||||||
|
VkDeviceGroupPresentModeFlagsKHR* pModes);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,12 +27,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_xcb_surface 1
|
#define VK_KHR_xcb_surface 1
|
||||||
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
|
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
|
||||||
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
|
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
|
||||||
|
|
||||||
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
|
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
|
||||||
|
|
||||||
typedef struct VkXcbSurfaceCreateInfoKHR {
|
typedef struct VkXcbSurfaceCreateInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -41,7 +40,6 @@ typedef struct VkXcbSurfaceCreateInfoKHR {
|
|||||||
xcb_window_t window;
|
xcb_window_t window;
|
||||||
} VkXcbSurfaceCreateInfoKHR;
|
} VkXcbSurfaceCreateInfoKHR;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
||||||
|
|
||||||
|
@ -27,12 +27,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_xlib_surface 1
|
#define VK_KHR_xlib_surface 1
|
||||||
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
||||||
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
||||||
|
|
||||||
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
||||||
|
|
||||||
typedef struct VkXlibSurfaceCreateInfoKHR {
|
typedef struct VkXlibSurfaceCreateInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
@ -41,7 +40,6 @@ typedef struct VkXlibSurfaceCreateInfoKHR {
|
|||||||
Window window;
|
Window window;
|
||||||
} VkXlibSurfaceCreateInfoKHR;
|
} VkXlibSurfaceCreateInfoKHR;
|
||||||
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
||||||
|
|
||||||
|
@ -27,10 +27,10 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_acquire_xlib_display 1
|
#define VK_EXT_acquire_xlib_display 1
|
||||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
||||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
||||||
|
|
||||||
|
@ -14,8 +14,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import os,re,sys,pdb
|
import os
|
||||||
from generator import *
|
import re
|
||||||
|
import sys
|
||||||
|
from generator import (GeneratorOptions, OutputGenerator, noneStr,
|
||||||
|
regSortFeatures, write)
|
||||||
|
|
||||||
# CGeneratorOptions - subclass of GeneratorOptions.
|
# CGeneratorOptions - subclass of GeneratorOptions.
|
||||||
#
|
#
|
||||||
@ -51,9 +54,16 @@ from generator import *
|
|||||||
# parameter on a separate line
|
# parameter on a separate line
|
||||||
# alignFuncParam - if nonzero and parameters are being put on a
|
# alignFuncParam - if nonzero and parameters are being put on a
|
||||||
# separate line, align parameter names at the specified column
|
# separate line, align parameter names at the specified column
|
||||||
|
# genEnumBeginEndRange - True if BEGIN_RANGE / END_RANGE macros should
|
||||||
|
# be generated for enumerated types
|
||||||
|
# genAliasMacro - True if the OpenXR alias macro should be generated
|
||||||
|
# for aliased types (unclear what other circumstances this is useful)
|
||||||
|
# aliasMacro - alias macro to inject when genAliasMacro is True
|
||||||
class CGeneratorOptions(GeneratorOptions):
|
class CGeneratorOptions(GeneratorOptions):
|
||||||
"""Represents options during C interface generation for headers"""
|
"""Represents options during C interface generation for headers"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
conventions = None,
|
||||||
filename = None,
|
filename = None,
|
||||||
directory = '.',
|
directory = '.',
|
||||||
apiname = None,
|
apiname = None,
|
||||||
@ -76,8 +86,12 @@ class CGeneratorOptions(GeneratorOptions):
|
|||||||
apientryp = '',
|
apientryp = '',
|
||||||
indentFuncProto = True,
|
indentFuncProto = True,
|
||||||
indentFuncPointer = False,
|
indentFuncPointer = False,
|
||||||
alignFuncParam = 0):
|
alignFuncParam = 0,
|
||||||
GeneratorOptions.__init__(self, filename, directory, apiname, profile,
|
genEnumBeginEndRange = False,
|
||||||
|
genAliasMacro = False,
|
||||||
|
aliasMacro = ''
|
||||||
|
):
|
||||||
|
GeneratorOptions.__init__(self, conventions, filename, directory, apiname, profile,
|
||||||
versions, emitversions, defaultExtensions,
|
versions, emitversions, defaultExtensions,
|
||||||
addExtensions, removeExtensions,
|
addExtensions, removeExtensions,
|
||||||
emitExtensions, sortProcedure)
|
emitExtensions, sortProcedure)
|
||||||
@ -93,6 +107,9 @@ class CGeneratorOptions(GeneratorOptions):
|
|||||||
self.indentFuncProto = indentFuncProto
|
self.indentFuncProto = indentFuncProto
|
||||||
self.indentFuncPointer = indentFuncPointer
|
self.indentFuncPointer = indentFuncPointer
|
||||||
self.alignFuncParam = alignFuncParam
|
self.alignFuncParam = alignFuncParam
|
||||||
|
self.genEnumBeginEndRange = genEnumBeginEndRange
|
||||||
|
self.genAliasMacro = genAliasMacro
|
||||||
|
self.aliasMacro = aliasMacro
|
||||||
|
|
||||||
# COutputGenerator - subclass of OutputGenerator.
|
# COutputGenerator - subclass of OutputGenerator.
|
||||||
# Generates C-language API interfaces.
|
# Generates C-language API interfaces.
|
||||||
@ -116,21 +133,25 @@ class COutputGenerator(OutputGenerator):
|
|||||||
TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum',
|
TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum',
|
||||||
'group', 'bitmask', 'funcpointer', 'struct']
|
'group', 'bitmask', 'funcpointer', 'struct']
|
||||||
ALL_SECTIONS = TYPE_SECTIONS + ['commandPointer', 'command']
|
ALL_SECTIONS = TYPE_SECTIONS + ['commandPointer', 'command']
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
errFile = sys.stderr,
|
errFile = sys.stderr,
|
||||||
warnFile = sys.stderr,
|
warnFile = sys.stderr,
|
||||||
diagFile = sys.stdout):
|
diagFile = sys.stdout):
|
||||||
OutputGenerator.__init__(self, errFile, warnFile, diagFile)
|
OutputGenerator.__init__(self, errFile, warnFile, diagFile)
|
||||||
# Internal state - accumulators for different inner block text
|
# Internal state - accumulators for different inner block text
|
||||||
self.sections = dict([(section, []) for section in self.ALL_SECTIONS])
|
self.sections = {section: [] for section in self.ALL_SECTIONS}
|
||||||
#
|
self.feature_not_empty = False
|
||||||
|
self.need_platform_include = False
|
||||||
|
self.may_alias = None
|
||||||
|
|
||||||
def beginFile(self, genOpts):
|
def beginFile(self, genOpts):
|
||||||
OutputGenerator.beginFile(self, genOpts)
|
OutputGenerator.beginFile(self, genOpts)
|
||||||
# C-specific
|
# C-specific
|
||||||
#
|
#
|
||||||
# Multiple inclusion protection & C++ wrappers.
|
# Multiple inclusion protection & C++ wrappers.
|
||||||
if (genOpts.protectFile and self.genOpts.filename):
|
if genOpts.protectFile and self.genOpts.filename:
|
||||||
headerSym = re.sub('\.h', '_h_',
|
headerSym = re.sub(r'\.h', '_h_',
|
||||||
os.path.basename(self.genOpts.filename)).upper()
|
os.path.basename(self.genOpts.filename)).upper()
|
||||||
write('#ifndef', headerSym, file=self.outFile)
|
write('#ifndef', headerSym, file=self.outFile)
|
||||||
write('#define', headerSym, '1', file=self.outFile)
|
write('#define', headerSym, '1', file=self.outFile)
|
||||||
@ -139,26 +160,12 @@ class COutputGenerator(OutputGenerator):
|
|||||||
write('extern "C" {', file=self.outFile)
|
write('extern "C" {', file=self.outFile)
|
||||||
write('#endif', file=self.outFile)
|
write('#endif', file=self.outFile)
|
||||||
self.newline()
|
self.newline()
|
||||||
#
|
|
||||||
# User-supplied prefix text, if any (list of strings)
|
# User-supplied prefix text, if any (list of strings)
|
||||||
if (genOpts.prefixText):
|
if genOpts.prefixText:
|
||||||
for s in genOpts.prefixText:
|
for s in genOpts.prefixText:
|
||||||
write(s, file=self.outFile)
|
write(s, file=self.outFile)
|
||||||
#
|
|
||||||
# Some boilerplate describing what was generated - this
|
|
||||||
# will probably be removed later since the extensions
|
|
||||||
# pattern may be very long.
|
|
||||||
# write('/* Generated C header for:', file=self.outFile)
|
|
||||||
# write(' * API:', genOpts.apiname, file=self.outFile)
|
|
||||||
# if (genOpts.profile):
|
|
||||||
# write(' * Profile:', genOpts.profile, file=self.outFile)
|
|
||||||
# write(' * Versions considered:', genOpts.versions, file=self.outFile)
|
|
||||||
# write(' * Versions emitted:', genOpts.emitversions, file=self.outFile)
|
|
||||||
# write(' * Default extensions included:', genOpts.defaultExtensions, file=self.outFile)
|
|
||||||
# write(' * Additional extensions included:', genOpts.addExtensions, file=self.outFile)
|
|
||||||
# write(' * Extensions removed:', genOpts.removeExtensions, file=self.outFile)
|
|
||||||
# write(' * Extensions emitted:', genOpts.emitExtensions, file=self.outFile)
|
|
||||||
# write(' */', file=self.outFile)
|
|
||||||
def endFile(self):
|
def endFile(self):
|
||||||
# C-specific
|
# C-specific
|
||||||
# Finish C++ wrapper and multiple inclusion protection
|
# Finish C++ wrapper and multiple inclusion protection
|
||||||
@ -166,11 +173,12 @@ class COutputGenerator(OutputGenerator):
|
|||||||
write('#ifdef __cplusplus', file=self.outFile)
|
write('#ifdef __cplusplus', file=self.outFile)
|
||||||
write('}', file=self.outFile)
|
write('}', file=self.outFile)
|
||||||
write('#endif', file=self.outFile)
|
write('#endif', file=self.outFile)
|
||||||
if (self.genOpts.protectFile and self.genOpts.filename):
|
if self.genOpts.protectFile and self.genOpts.filename:
|
||||||
self.newline()
|
self.newline()
|
||||||
write('#endif', file=self.outFile)
|
write('#endif', file=self.outFile)
|
||||||
# Finish processing in superclass
|
# Finish processing in superclass
|
||||||
OutputGenerator.endFile(self)
|
OutputGenerator.endFile(self)
|
||||||
|
|
||||||
def beginFeature(self, interface, emit):
|
def beginFeature(self, interface, emit):
|
||||||
# Start processing in superclass
|
# Start processing in superclass
|
||||||
OutputGenerator.beginFeature(self, interface, emit)
|
OutputGenerator.beginFeature(self, interface, emit)
|
||||||
@ -178,55 +186,68 @@ class COutputGenerator(OutputGenerator):
|
|||||||
# Accumulate includes, defines, types, enums, function pointer typedefs,
|
# Accumulate includes, defines, types, enums, function pointer typedefs,
|
||||||
# end function prototypes separately for this feature. They're only
|
# end function prototypes separately for this feature. They're only
|
||||||
# printed in endFeature().
|
# printed in endFeature().
|
||||||
self.sections = dict([(section, []) for section in self.ALL_SECTIONS])
|
self.sections = {section: [] for section in self.ALL_SECTIONS}
|
||||||
|
self.feature_not_empty = False
|
||||||
|
|
||||||
def endFeature(self):
|
def endFeature(self):
|
||||||
# C-specific
|
# C-specific
|
||||||
# Actually write the interface to the output file.
|
# Actually write the interface to the output file.
|
||||||
if (self.emit):
|
if self.emit:
|
||||||
|
if self.feature_not_empty:
|
||||||
|
if self.genOpts.conventions.writeFeature(self.featureExtraProtect, self.genOpts.filename):
|
||||||
self.newline()
|
self.newline()
|
||||||
if (self.genOpts.protectFeature):
|
if self.genOpts.protectFeature:
|
||||||
write('#ifndef', self.featureName, file=self.outFile)
|
write('#ifndef', self.featureName, file=self.outFile)
|
||||||
# If type declarations are needed by other features based on
|
# If type declarations are needed by other features based on
|
||||||
# this one, it may be necessary to suppress the ExtraProtect,
|
# this one, it may be necessary to suppress the ExtraProtect,
|
||||||
# or move it below the 'for section...' loop.
|
# or move it below the 'for section...' loop.
|
||||||
if (self.featureExtraProtect != None):
|
if self.featureExtraProtect is not None:
|
||||||
write('#ifdef', self.featureExtraProtect, file=self.outFile)
|
write('#ifdef', self.featureExtraProtect, file=self.outFile)
|
||||||
|
self.newline()
|
||||||
write('#define', self.featureName, '1', file=self.outFile)
|
write('#define', self.featureName, '1', file=self.outFile)
|
||||||
for section in self.TYPE_SECTIONS:
|
for section in self.TYPE_SECTIONS:
|
||||||
|
# OpenXR:
|
||||||
|
# If we need the explicit include of the external platform header,
|
||||||
|
# put it right before the function pointer definitions
|
||||||
|
if section == "funcpointer" and self.need_platform_include:
|
||||||
|
write('// Include for OpenXR Platform-Specific Types', file=self.outFile)
|
||||||
|
write('#include "openxr_platform.h"', file=self.outFile)
|
||||||
|
self.newline()
|
||||||
|
self.need_platform_include = False
|
||||||
contents = self.sections[section]
|
contents = self.sections[section]
|
||||||
if contents:
|
if contents:
|
||||||
write('\n'.join(contents), file=self.outFile)
|
write('\n'.join(contents), file=self.outFile)
|
||||||
self.newline()
|
if self.genOpts.genFuncPointers and self.sections['commandPointer']:
|
||||||
if (self.genOpts.genFuncPointers and self.sections['commandPointer']):
|
|
||||||
write('\n'.join(self.sections['commandPointer']), file=self.outFile)
|
write('\n'.join(self.sections['commandPointer']), file=self.outFile)
|
||||||
self.newline()
|
self.newline()
|
||||||
if (self.sections['command']):
|
if self.sections['command']:
|
||||||
if (self.genOpts.protectProto):
|
if self.genOpts.protectProto:
|
||||||
write(self.genOpts.protectProto,
|
write(self.genOpts.protectProto,
|
||||||
self.genOpts.protectProtoStr, file=self.outFile)
|
self.genOpts.protectProtoStr, file=self.outFile)
|
||||||
write('\n'.join(self.sections['command']), end='', file=self.outFile)
|
write('\n'.join(self.sections['command']), end='', file=self.outFile)
|
||||||
if (self.genOpts.protectProto):
|
if self.genOpts.protectProto:
|
||||||
write('#endif', file=self.outFile)
|
write('#endif', file=self.outFile)
|
||||||
else:
|
else:
|
||||||
self.newline()
|
self.newline()
|
||||||
if (self.featureExtraProtect != None):
|
if self.featureExtraProtect is not None:
|
||||||
write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile)
|
write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile)
|
||||||
if (self.genOpts.protectFeature):
|
if self.genOpts.protectFeature:
|
||||||
write('#endif /*', self.featureName, '*/', file=self.outFile)
|
write('#endif /*', self.featureName, '*/', file=self.outFile)
|
||||||
# Finish processing in superclass
|
# Finish processing in superclass
|
||||||
OutputGenerator.endFeature(self)
|
OutputGenerator.endFeature(self)
|
||||||
#
|
|
||||||
# Append a definition to the specified section
|
# Append a definition to the specified section
|
||||||
def appendSection(self, section, text):
|
def appendSection(self, section, text):
|
||||||
# self.sections[section].append('SECTION: ' + section + '\n')
|
# self.sections[section].append('SECTION: ' + section + '\n')
|
||||||
self.sections[section].append(text)
|
self.sections[section].append(text)
|
||||||
# self.logMsg('diag', 'appendSection(section =', section, 'text =', text)
|
self.feature_not_empty = True
|
||||||
#
|
|
||||||
# Type generation
|
# Type generation
|
||||||
def genType(self, typeinfo, name, alias):
|
def genType(self, typeinfo, name, alias):
|
||||||
OutputGenerator.genType(self, typeinfo, name, alias)
|
OutputGenerator.genType(self, typeinfo, name, alias)
|
||||||
typeElem = typeinfo.elem
|
typeElem = typeinfo.elem
|
||||||
|
|
||||||
|
# Vulkan:
|
||||||
# Determine the category of the type, and the type section to add
|
# Determine the category of the type, and the type section to add
|
||||||
# its definition to.
|
# its definition to.
|
||||||
# 'funcpointer' is added to the 'struct' section as a workaround for
|
# 'funcpointer' is added to the 'struct' section as a workaround for
|
||||||
@ -238,11 +259,12 @@ class COutputGenerator(OutputGenerator):
|
|||||||
else:
|
else:
|
||||||
section = category
|
section = category
|
||||||
|
|
||||||
if category == 'struct' or category == 'union':
|
if category in ('struct', 'union'):
|
||||||
# If the type is a struct type, generate it using the
|
# If the type is a struct type, generate it using the
|
||||||
# special-purpose generator.
|
# special-purpose generator.
|
||||||
self.genStruct(typeinfo, name, alias)
|
self.genStruct(typeinfo, name, alias)
|
||||||
else:
|
else:
|
||||||
|
# OpenXR: this section was not under 'else:' previously, just fell through
|
||||||
if alias:
|
if alias:
|
||||||
# If the type is an alias, just emit a typedef declaration
|
# If the type is an alias, just emit a typedef declaration
|
||||||
body = 'typedef ' + alias + ' ' + name + ';\n'
|
body = 'typedef ' + alias + ' ' + name + ';\n'
|
||||||
@ -252,17 +274,65 @@ class COutputGenerator(OutputGenerator):
|
|||||||
# If the resulting text is an empty string, don't emit it.
|
# If the resulting text is an empty string, don't emit it.
|
||||||
body = noneStr(typeElem.text)
|
body = noneStr(typeElem.text)
|
||||||
for elem in typeElem:
|
for elem in typeElem:
|
||||||
if (elem.tag == 'apientry'):
|
if elem.tag == 'apientry':
|
||||||
body += self.genOpts.apientry + noneStr(elem.tail)
|
body += self.genOpts.apientry + noneStr(elem.tail)
|
||||||
else:
|
else:
|
||||||
body += noneStr(elem.text) + noneStr(elem.tail)
|
body += noneStr(elem.text) + noneStr(elem.tail)
|
||||||
|
|
||||||
if body:
|
if body:
|
||||||
# Add extra newline after multi-line entries.
|
# Add extra newline after multi-line entries.
|
||||||
if '\n' in body[0:-1]:
|
if '\n' in body[0:-1]:
|
||||||
body += '\n'
|
body += '\n'
|
||||||
self.appendSection(section, body)
|
self.appendSection(section, body)
|
||||||
#
|
|
||||||
|
# Protection string generation
|
||||||
|
# Protection strings are the strings defining the OS/Platform/Graphics
|
||||||
|
# requirements for a given OpenXR command. When generating the
|
||||||
|
# language header files, we need to make sure the items specific to a
|
||||||
|
# graphics API or OS platform are properly wrapped in #ifs.
|
||||||
|
def genProtectString(self, protect_str):
|
||||||
|
protect_if_str = ''
|
||||||
|
protect_end_str = ''
|
||||||
|
protect_list = []
|
||||||
|
if protect_str:
|
||||||
|
if ',' in protect_str:
|
||||||
|
protect_list.extend(protect_str.split(","))
|
||||||
|
protect_def_str = ''
|
||||||
|
count = 0
|
||||||
|
for protect_define in protect_list:
|
||||||
|
if count > 0:
|
||||||
|
protect_def_str += ' &&'
|
||||||
|
protect_def_str += ' defined(%s)' % protect_define
|
||||||
|
count = count + 1
|
||||||
|
count = count + 1
|
||||||
|
protect_if_str = '#if'
|
||||||
|
protect_if_str += protect_def_str
|
||||||
|
protect_if_str += '\n'
|
||||||
|
protect_end_str = '#endif //'
|
||||||
|
protect_end_str += protect_def_str
|
||||||
|
protect_end_str += '\n'
|
||||||
|
else:
|
||||||
|
protect_if_str += '#ifdef %s\n' % protect_str
|
||||||
|
protect_end_str += '#endif // %s\n' % protect_str
|
||||||
|
return (protect_if_str, protect_end_str)
|
||||||
|
|
||||||
|
def typeMayAlias(self, typeName):
|
||||||
|
if not self.may_alias:
|
||||||
|
# First time we've asked if a type may alias.
|
||||||
|
# So, let's populate the set of all names of types that may.
|
||||||
|
|
||||||
|
# Everyone with an explicit mayalias="true"
|
||||||
|
self.may_alias = set(typeName
|
||||||
|
for typeName, data in self.registry.typedict.items()
|
||||||
|
if data.elem.get('mayalias') == 'true')
|
||||||
|
|
||||||
|
# Every type mentioned in some other type's parentstruct attribute.
|
||||||
|
self.may_alias.update(set(x for x in
|
||||||
|
[otherType.elem.get('parentstruct')
|
||||||
|
for _, otherType in self.registry.typedict.items()]
|
||||||
|
if x is not None
|
||||||
|
))
|
||||||
|
return typeName in self.may_alias
|
||||||
|
|
||||||
# Struct (e.g. C "struct" type) generation.
|
# Struct (e.g. C "struct" type) generation.
|
||||||
# This is a special case of the <type> tag where the contents are
|
# This is a special case of the <type> tag where the contents are
|
||||||
# interpreted as a set of <member> tags instead of freeform C
|
# interpreted as a set of <member> tags instead of freeform C
|
||||||
@ -270,7 +340,7 @@ class COutputGenerator(OutputGenerator):
|
|||||||
# tags - they are a declaration of a struct or union member.
|
# tags - they are a declaration of a struct or union member.
|
||||||
# Only simple member declarations are supported (no nested
|
# Only simple member declarations are supported (no nested
|
||||||
# structs etc.)
|
# structs etc.)
|
||||||
# If alias != None, then this struct aliases another; just
|
# If alias is not None, then this struct aliases another; just
|
||||||
# generate a typedef of that alias.
|
# generate a typedef of that alias.
|
||||||
def genStruct(self, typeinfo, typeName, alias):
|
def genStruct(self, typeinfo, typeName, alias):
|
||||||
OutputGenerator.genStruct(self, typeinfo, typeName, alias)
|
OutputGenerator.genStruct(self, typeinfo, typeName, alias)
|
||||||
@ -280,127 +350,65 @@ class COutputGenerator(OutputGenerator):
|
|||||||
if alias:
|
if alias:
|
||||||
body = 'typedef ' + alias + ' ' + typeName + ';\n'
|
body = 'typedef ' + alias + ' ' + typeName + ';\n'
|
||||||
else:
|
else:
|
||||||
body = 'typedef ' + typeElem.get('category') + ' ' + typeName + ' {\n'
|
body = ''
|
||||||
|
(protect_begin, protect_end) = self.genProtectString(typeElem.get('protect'))
|
||||||
|
if protect_begin:
|
||||||
|
body += protect_begin
|
||||||
|
body += 'typedef ' + typeElem.get('category')
|
||||||
|
|
||||||
targetLen = 0;
|
# This is an OpenXR-specific alternative where aliasing refers
|
||||||
|
# to an inheritance hierarchy of types rather than C-level type
|
||||||
|
# aliases.
|
||||||
|
if self.genOpts.genAliasMacro and self.typeMayAlias(typeName):
|
||||||
|
body += ' ' + self.genOpts.aliasMacro
|
||||||
|
|
||||||
|
body += ' ' + typeName + ' {\n'
|
||||||
|
|
||||||
|
targetLen = 0
|
||||||
for member in typeElem.findall('.//member'):
|
for member in typeElem.findall('.//member'):
|
||||||
targetLen = max(targetLen, self.getCParamTypeLength(member))
|
targetLen = max(targetLen, self.getCParamTypeLength(member))
|
||||||
for member in typeElem.findall('.//member'):
|
for member in typeElem.findall('.//member'):
|
||||||
body += self.makeCParamDecl(member, targetLen + 4)
|
body += self.makeCParamDecl(member, targetLen + 4)
|
||||||
body += ';\n'
|
body += ';\n'
|
||||||
body += '} ' + typeName + ';\n'
|
body += '} ' + typeName + ';\n'
|
||||||
|
if protect_end:
|
||||||
|
body += protect_end
|
||||||
|
|
||||||
self.appendSection('struct', body)
|
self.appendSection('struct', body)
|
||||||
#
|
|
||||||
# Group (e.g. C "enum" type) generation.
|
# Group (e.g. C "enum" type) generation.
|
||||||
# These are concatenated together with other types.
|
# These are concatenated together with other types.
|
||||||
# If alias != None, it is the name of another group type
|
# If alias is not None, it is the name of another group type
|
||||||
# which aliases this type; just generate that alias.
|
# which aliases this type; just generate that alias.
|
||||||
def genGroup(self, groupinfo, groupName, alias = None):
|
def genGroup(self, groupinfo, groupName, alias = None):
|
||||||
OutputGenerator.genGroup(self, groupinfo, groupName, alias)
|
OutputGenerator.genGroup(self, groupinfo, groupName, alias)
|
||||||
groupElem = groupinfo.elem
|
groupElem = groupinfo.elem
|
||||||
|
|
||||||
if alias:
|
|
||||||
# If the group name is aliased, just emit a typedef declaration
|
|
||||||
# for the alias.
|
|
||||||
body = 'typedef ' + alias + ' ' + groupName + ';\n'
|
|
||||||
else:
|
|
||||||
self.logMsg('diag', 'CGenerator.genGroup group =', groupName, 'alias =', alias)
|
|
||||||
|
|
||||||
# Otherwise, emit an actual enumerated type declaration
|
|
||||||
expandName = re.sub(r'([0-9a-z_])([A-Z0-9])',r'\1_\2',groupName).upper()
|
|
||||||
|
|
||||||
expandPrefix = expandName
|
|
||||||
expandSuffix = ''
|
|
||||||
expandSuffixMatch = re.search(r'[A-Z][A-Z]+$',groupName)
|
|
||||||
if expandSuffixMatch:
|
|
||||||
expandSuffix = '_' + expandSuffixMatch.group()
|
|
||||||
# Strip off the suffix from the prefix
|
|
||||||
expandPrefix = expandName.rsplit(expandSuffix, 1)[0]
|
|
||||||
|
|
||||||
# Prefix
|
|
||||||
body = "\ntypedef enum " + groupName + " {\n"
|
|
||||||
|
|
||||||
# @@ Should use the type="bitmask" attribute instead
|
|
||||||
isEnum = ('FLAG_BITS' not in expandPrefix)
|
|
||||||
|
|
||||||
# Get a list of nested 'enum' tags.
|
|
||||||
enums = groupElem.findall('enum')
|
|
||||||
|
|
||||||
# Check for and report duplicates, and return a list with them
|
|
||||||
# removed.
|
|
||||||
enums = self.checkDuplicateEnums(enums)
|
|
||||||
|
|
||||||
# Loop over the nested 'enum' tags. Keep track of the minimum and
|
|
||||||
# maximum numeric values, if they can be determined; but only for
|
|
||||||
# core API enumerants, not extension enumerants. This is inferred
|
|
||||||
# by looking for 'extends' attributes.
|
|
||||||
minName = None
|
|
||||||
|
|
||||||
# Accumulate non-numeric enumerant values separately and append
|
|
||||||
# them following the numeric values, to allow for aliases.
|
|
||||||
# NOTE: this doesn't do a topological sort yet, so aliases of
|
|
||||||
# aliases can still get in the wrong order.
|
|
||||||
aliasText = ""
|
|
||||||
|
|
||||||
for elem in enums:
|
|
||||||
# Convert the value to an integer and use that to track min/max.
|
|
||||||
(numVal,strVal) = self.enumToValue(elem, True)
|
|
||||||
name = elem.get('name')
|
|
||||||
|
|
||||||
# Extension enumerants are only included if they are required
|
|
||||||
if self.isEnumRequired(elem):
|
|
||||||
decl = " " + name + " = " + strVal + ",\n"
|
|
||||||
if numVal != None:
|
|
||||||
body += decl
|
|
||||||
else:
|
|
||||||
aliasText += decl
|
|
||||||
|
|
||||||
# Don't track min/max for non-numbers (numVal == None)
|
|
||||||
if isEnum and numVal != None and elem.get('extends') is None:
|
|
||||||
if minName == None:
|
|
||||||
minName = maxName = name
|
|
||||||
minValue = maxValue = numVal
|
|
||||||
elif numVal < minValue:
|
|
||||||
minName = name
|
|
||||||
minValue = numVal
|
|
||||||
elif numVal > maxValue:
|
|
||||||
maxName = name
|
|
||||||
maxValue = numVal
|
|
||||||
|
|
||||||
# Now append the non-numeric enumerant values
|
|
||||||
body += aliasText
|
|
||||||
|
|
||||||
# Generate min/max value tokens and a range-padding enum. Need some
|
|
||||||
# additional padding to generate correct names...
|
|
||||||
if isEnum:
|
|
||||||
body += " " + expandPrefix + "_BEGIN_RANGE" + expandSuffix + " = " + minName + ",\n"
|
|
||||||
body += " " + expandPrefix + "_END_RANGE" + expandSuffix + " = " + maxName + ",\n"
|
|
||||||
body += " " + expandPrefix + "_RANGE_SIZE" + expandSuffix + " = (" + maxName + " - " + minName + " + 1),\n"
|
|
||||||
|
|
||||||
body += " " + expandPrefix + "_MAX_ENUM" + expandSuffix + " = 0x7FFFFFFF\n"
|
|
||||||
|
|
||||||
# Postfix
|
|
||||||
body += "} " + groupName + ";"
|
|
||||||
|
|
||||||
# After either enumerated type or alias paths, add the declaration
|
# After either enumerated type or alias paths, add the declaration
|
||||||
# to the appropriate section for the group being defined.
|
# to the appropriate section for the group being defined.
|
||||||
if groupElem.get('type') == 'bitmask':
|
if groupElem.get('type') == 'bitmask':
|
||||||
section = 'bitmask'
|
section = 'bitmask'
|
||||||
else:
|
else:
|
||||||
section = 'group'
|
section = 'group'
|
||||||
|
|
||||||
|
if alias:
|
||||||
|
# If the group name is aliased, just emit a typedef declaration
|
||||||
|
# for the alias.
|
||||||
|
body = 'typedef ' + alias + ' ' + groupName + ';\n'
|
||||||
self.appendSection(section, body)
|
self.appendSection(section, body)
|
||||||
|
else:
|
||||||
|
(section, body) = self.buildEnumCDecl(self.genOpts.genEnumBeginEndRange, groupinfo, groupName)
|
||||||
|
self.appendSection(section, "\n" + body)
|
||||||
|
|
||||||
# Enumerant generation
|
# Enumerant generation
|
||||||
# <enum> tags may specify their values in several ways, but are usually
|
# <enum> tags may specify their values in several ways, but are usually
|
||||||
# just integers.
|
# just integers.
|
||||||
def genEnum(self, enuminfo, name, alias):
|
def genEnum(self, enuminfo, name, alias):
|
||||||
OutputGenerator.genEnum(self, enuminfo, name, alias)
|
OutputGenerator.genEnum(self, enuminfo, name, alias)
|
||||||
(numVal,strVal) = self.enumToValue(enuminfo.elem, False)
|
(_, strVal) = self.enumToValue(enuminfo.elem, False)
|
||||||
body = '#define ' + name.ljust(33) + ' ' + strVal
|
body = '#define ' + name.ljust(33) + ' ' + strVal
|
||||||
self.appendSection('enum', body)
|
self.appendSection('enum', body)
|
||||||
|
|
||||||
#
|
|
||||||
# Command generation
|
# Command generation
|
||||||
def genCmd(self, cmdinfo, name, alias):
|
def genCmd(self, cmdinfo, name, alias):
|
||||||
OutputGenerator.genCmd(self, cmdinfo, name, alias)
|
OutputGenerator.genCmd(self, cmdinfo, name, alias)
|
||||||
@ -413,5 +421,5 @@ class COutputGenerator(OutputGenerator):
|
|||||||
prefix = ''
|
prefix = ''
|
||||||
decls = self.makeCDecls(cmdinfo.elem)
|
decls = self.makeCDecls(cmdinfo.elem)
|
||||||
self.appendSection('command', prefix + decls[0] + '\n')
|
self.appendSection('command', prefix + decls[0] + '\n')
|
||||||
if (self.genOpts.genFuncPointers):
|
if self.genOpts.genFuncPointers:
|
||||||
self.appendSection('commandPointer', decls[1])
|
self.appendSection('commandPointer', decls[1])
|
||||||
|
132
registry/conventions.py
Normal file
132
registry/conventions.py
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
#!/usr/bin/python3 -i
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013-2019 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.
|
||||||
|
|
||||||
|
# Base class for working-group-specific style conventions,
|
||||||
|
# used in generation.
|
||||||
|
|
||||||
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
|
|
||||||
|
class ConventionsBase(ABC):
|
||||||
|
"""WG-specific conventions."""
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def formatExtension(self, name):
|
||||||
|
"""Mark up a name as an extension for the spec."""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def null(self):
|
||||||
|
"""Preferred spelling of NULL."""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def makeProseList(self, elements, connective='and'):
|
||||||
|
"""Make a (comma-separated) list for use in prose.
|
||||||
|
|
||||||
|
Adds a connective (by default, 'and')
|
||||||
|
before the last element if there are more than 1.
|
||||||
|
|
||||||
|
Override with a different method or different call to
|
||||||
|
_implMakeProseList if you want to add a comma for two elements,
|
||||||
|
or not use a serial comma.
|
||||||
|
"""
|
||||||
|
return self._implMakeProseList(elements, connective)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def struct_macro(self):
|
||||||
|
"""Get the appropriate format macro for a structure.
|
||||||
|
|
||||||
|
May override.
|
||||||
|
"""
|
||||||
|
return 'sname:'
|
||||||
|
|
||||||
|
def makeStructName(self, name):
|
||||||
|
"""Prepend the appropriate format macro for a structure to a structure type name.
|
||||||
|
|
||||||
|
Uses struct_macro, so just override that if you want to change behavior.
|
||||||
|
"""
|
||||||
|
return self.struct_macro + name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def external_macro(self):
|
||||||
|
"""Get the appropriate format macro for an external type like uint32_t.
|
||||||
|
|
||||||
|
May override.
|
||||||
|
"""
|
||||||
|
return 'basetype:'
|
||||||
|
|
||||||
|
def makeExternalTypeName(self, name):
|
||||||
|
"""Prepend the appropriate format macro for an external type like uint32_t to a type name.
|
||||||
|
|
||||||
|
Uses external_macro, so just override that if you want to change behavior.
|
||||||
|
"""
|
||||||
|
return self.external_macro + name
|
||||||
|
|
||||||
|
def _implMakeProseList(self, elements, connective, comma_for_two_elts=False, serial_comma=True):
|
||||||
|
"""Internal-use implementation to make a (comma-separated) list for use in prose.
|
||||||
|
|
||||||
|
Adds a connective (by default, 'and')
|
||||||
|
before the last element if there are more than 1,
|
||||||
|
and only includes commas if there are more than 2
|
||||||
|
(if comma_for_two_elts is False).
|
||||||
|
|
||||||
|
Don't edit these defaults, override self.makeProseList().
|
||||||
|
"""
|
||||||
|
assert(serial_comma) # didn't implement what we didn't need
|
||||||
|
my_elts = list(elements)
|
||||||
|
if len(my_elts) > 1:
|
||||||
|
my_elts[-1] = '{} {}'.format(connective, my_elts[-1])
|
||||||
|
|
||||||
|
if not comma_for_two_elts and len(my_elts) <= 2:
|
||||||
|
return ' '.join(my_elts)
|
||||||
|
return ', '.join(my_elts)
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def file_suffix(self):
|
||||||
|
"""Return suffix of generated Asciidoctor files"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def api_name(self):
|
||||||
|
"""Return API name"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def api_prefix(self):
|
||||||
|
"""Return API token prefix"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def api_version_prefix(self):
|
||||||
|
"""Return API core version token prefix"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def KHR_prefix(self):
|
||||||
|
"""Return extension name prefix for KHR extensions"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def EXT_prefix(self):
|
||||||
|
"""Return extension name prefix for EXT extensions"""
|
||||||
|
raise NotImplementedError
|
@ -15,36 +15,35 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import io,os,re,sys,pdb
|
|
||||||
|
import io
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import pdb
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
def write( *args, **kwargs ):
|
def write( *args, **kwargs ):
|
||||||
file = kwargs.pop('file',sys.stdout)
|
file = kwargs.pop('file',sys.stdout)
|
||||||
end = kwargs.pop('end','\n')
|
end = kwargs.pop('end','\n')
|
||||||
file.write(' '.join([str(arg) for arg in args]))
|
file.write(' '.join(str(arg) for arg in args))
|
||||||
file.write(end)
|
file.write(end)
|
||||||
|
|
||||||
# noneStr - returns string argument, or "" if argument is None.
|
# noneStr - returns string argument, or "" if argument is None.
|
||||||
# Used in converting etree Elements into text.
|
# Used in converting etree Elements into text.
|
||||||
# str - string to convert
|
# s - string to convert
|
||||||
def noneStr(str):
|
def noneStr(s):
|
||||||
if (str):
|
if s:
|
||||||
return str
|
return s
|
||||||
else:
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
# enquote - returns string argument with surrounding quotes,
|
# enquote - returns string argument with surrounding quotes,
|
||||||
# for serialization into Python code.
|
# for serialization into Python code.
|
||||||
def enquote(str):
|
def enquote(s):
|
||||||
if (str):
|
if s:
|
||||||
return "'" + str + "'"
|
return "'{}'".format(s)
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# apiName - returns True if name is a Vulkan name (vk/Vk/VK prefix, or a
|
|
||||||
# function pointer type), False otherwise.
|
|
||||||
def apiName(str):
|
|
||||||
return str[0:2].lower() == 'vk' or str[0:3] == 'PFN'
|
|
||||||
|
|
||||||
# Primary sort key for regSortFeatures.
|
# Primary sort key for regSortFeatures.
|
||||||
# Sorts by category of the feature name string:
|
# Sorts by category of the feature name string:
|
||||||
# Core API features (those defined with a <feature> tag)
|
# Core API features (those defined with a <feature> tag)
|
||||||
@ -52,13 +51,13 @@ def apiName(str):
|
|||||||
# other (EXT/vendor extensions)
|
# other (EXT/vendor extensions)
|
||||||
# This will need changing for Vulkan!
|
# This will need changing for Vulkan!
|
||||||
def regSortCategoryKey(feature):
|
def regSortCategoryKey(feature):
|
||||||
if (feature.elem.tag == 'feature'):
|
if feature.elem.tag == 'feature':
|
||||||
return 0
|
return 0
|
||||||
elif (feature.category == 'ARB' or
|
if (feature.category == 'ARB' or
|
||||||
feature.category == 'KHR' or
|
feature.category == 'KHR' or
|
||||||
feature.category == 'OES'):
|
feature.category == 'OES'):
|
||||||
return 1
|
return 1
|
||||||
else:
|
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# Secondary sort key for regSortFeatures.
|
# Secondary sort key for regSortFeatures.
|
||||||
@ -90,6 +89,8 @@ def regSortFeatures(featureList):
|
|||||||
# Registry.apiGen() and by base OutputGenerator objects.
|
# Registry.apiGen() and by base OutputGenerator objects.
|
||||||
#
|
#
|
||||||
# Members
|
# Members
|
||||||
|
# conventions - may be mandatory for some generators:
|
||||||
|
# an object that implements ConventionsBase
|
||||||
# filename - basename of file to generate, or None to write to stdout.
|
# filename - basename of file to generate, or None to write to stdout.
|
||||||
# directory - directory in which to generate filename
|
# directory - directory in which to generate filename
|
||||||
# apiname - string matching <api> 'apiname' attribute, e.g. 'gl'.
|
# apiname - string matching <api> 'apiname' attribute, e.g. 'gl'.
|
||||||
@ -119,7 +120,9 @@ def regSortFeatures(featureList):
|
|||||||
# nothing.
|
# nothing.
|
||||||
class GeneratorOptions:
|
class GeneratorOptions:
|
||||||
"""Represents options during header production from an API registry"""
|
"""Represents options during header production from an API registry"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
conventions = None,
|
||||||
filename = None,
|
filename = None,
|
||||||
directory = '.',
|
directory = '.',
|
||||||
apiname = None,
|
apiname = None,
|
||||||
@ -131,6 +134,7 @@ class GeneratorOptions:
|
|||||||
removeExtensions = None,
|
removeExtensions = None,
|
||||||
emitExtensions = None,
|
emitExtensions = None,
|
||||||
sortProcedure = regSortFeatures):
|
sortProcedure = regSortFeatures):
|
||||||
|
self.conventions = conventions
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.directory = directory
|
self.directory = directory
|
||||||
self.apiname = apiname
|
self.apiname = apiname
|
||||||
@ -142,13 +146,13 @@ class GeneratorOptions:
|
|||||||
self.removeExtensions = self.emptyRegex(removeExtensions)
|
self.removeExtensions = self.emptyRegex(removeExtensions)
|
||||||
self.emitExtensions = self.emptyRegex(emitExtensions)
|
self.emitExtensions = self.emptyRegex(emitExtensions)
|
||||||
self.sortProcedure = sortProcedure
|
self.sortProcedure = sortProcedure
|
||||||
#
|
|
||||||
# Substitute a regular expression which matches no version
|
# Substitute a regular expression which matches no version
|
||||||
# or extension names for None or the empty string.
|
# or extension names for None or the empty string.
|
||||||
def emptyRegex(self,pat):
|
def emptyRegex(self, pat):
|
||||||
if (pat == None or pat == ''):
|
if pat is None or pat == '':
|
||||||
return '_nomatch_^'
|
return '_nomatch_^'
|
||||||
else:
|
|
||||||
return pat
|
return pat
|
||||||
|
|
||||||
# OutputGenerator - base class for generating API interfaces.
|
# OutputGenerator - base class for generating API interfaces.
|
||||||
@ -195,7 +199,7 @@ class GeneratorOptions:
|
|||||||
#
|
#
|
||||||
class OutputGenerator:
|
class OutputGenerator:
|
||||||
"""Generate specified API interfaces in a specific style, such as a C header"""
|
"""Generate specified API interfaces in a specific style, such as a C header"""
|
||||||
#
|
|
||||||
# categoryToPath - map XML 'category' to include file directory name
|
# categoryToPath - map XML 'category' to include file directory name
|
||||||
categoryToPath = {
|
categoryToPath = {
|
||||||
'bitmask' : 'flags',
|
'bitmask' : 'flags',
|
||||||
@ -205,7 +209,7 @@ class OutputGenerator:
|
|||||||
'define' : 'defines',
|
'define' : 'defines',
|
||||||
'basetype' : 'basetypes',
|
'basetype' : 'basetypes',
|
||||||
}
|
}
|
||||||
#
|
|
||||||
# Constructor
|
# Constructor
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
errFile = sys.stderr,
|
errFile = sys.stderr,
|
||||||
@ -223,7 +227,7 @@ class OutputGenerator:
|
|||||||
self.extBase = 1000000000
|
self.extBase = 1000000000
|
||||||
self.extBlockSize = 1000
|
self.extBlockSize = 1000
|
||||||
self.madeDirs = {}
|
self.madeDirs = {}
|
||||||
#
|
|
||||||
# logMsg - write a message of different categories to different
|
# logMsg - write a message of different categories to different
|
||||||
# destinations.
|
# destinations.
|
||||||
# level -
|
# level -
|
||||||
@ -233,22 +237,22 @@ class OutputGenerator:
|
|||||||
# *args - print()-style arguments to direct to corresponding log
|
# *args - print()-style arguments to direct to corresponding log
|
||||||
def logMsg(self, level, *args):
|
def logMsg(self, level, *args):
|
||||||
"""Log a message at the given level. Can be ignored or log to a file"""
|
"""Log a message at the given level. Can be ignored or log to a file"""
|
||||||
if (level == 'error'):
|
if level == 'error':
|
||||||
strfile = io.StringIO()
|
strfile = io.StringIO()
|
||||||
write('ERROR:', *args, file=strfile)
|
write('ERROR:', *args, file=strfile)
|
||||||
if (self.errFile != None):
|
if self.errFile is not None:
|
||||||
write(strfile.getvalue(), file=self.errFile)
|
write(strfile.getvalue(), file=self.errFile)
|
||||||
raise UserWarning(strfile.getvalue())
|
raise UserWarning(strfile.getvalue())
|
||||||
elif (level == 'warn'):
|
elif level == 'warn':
|
||||||
if (self.warnFile != None):
|
if self.warnFile is not None:
|
||||||
write('WARNING:', *args, file=self.warnFile)
|
write('WARNING:', *args, file=self.warnFile)
|
||||||
elif (level == 'diag'):
|
elif level == 'diag':
|
||||||
if (self.diagFile != None):
|
if self.diagFile is not None:
|
||||||
write('DIAG:', *args, file=self.diagFile)
|
write('DIAG:', *args, file=self.diagFile)
|
||||||
else:
|
else:
|
||||||
raise UserWarning(
|
raise UserWarning(
|
||||||
'*** FATAL ERROR in Generator.logMsg: unknown level:' + level)
|
'*** FATAL ERROR in Generator.logMsg: unknown level:' + level)
|
||||||
#
|
|
||||||
# enumToValue - parses and converts an <enum> tag into a value.
|
# enumToValue - parses and converts an <enum> tag into a value.
|
||||||
# Returns a list
|
# Returns a list
|
||||||
# first element - integer representation of the value, or None
|
# first element - integer representation of the value, or None
|
||||||
@ -264,39 +268,41 @@ class OutputGenerator:
|
|||||||
# 'extbase' extension name, which is then cast to the
|
# 'extbase' extension name, which is then cast to the
|
||||||
# typename specified by 'extends'. This requires probing
|
# typename specified by 'extends'. This requires probing
|
||||||
# the registry database, and imbeds knowledge of the
|
# the registry database, and imbeds knowledge of the
|
||||||
# Vulkan extension enum scheme in this function.
|
# API extension enum scheme in this function.
|
||||||
# A 'alias' attribute contains the name of another enum
|
# A 'alias' attribute contains the name of another enum
|
||||||
# which this is an alias of. The other enum must be
|
# which this is an alias of. The other enum must be
|
||||||
# declared first when emitting this enum.
|
# declared first when emitting this enum.
|
||||||
def enumToValue(self, elem, needsNum):
|
def enumToValue(self, elem, needsNum):
|
||||||
name = elem.get('name')
|
name = elem.get('name')
|
||||||
numVal = None
|
numVal = None
|
||||||
if ('value' in elem.keys()):
|
if 'value' in elem.keys():
|
||||||
value = elem.get('value')
|
value = elem.get('value')
|
||||||
# print('About to translate value =', value, 'type =', type(value))
|
# print('About to translate value =', value, 'type =', type(value))
|
||||||
if (needsNum):
|
if needsNum:
|
||||||
numVal = int(value, 0)
|
numVal = int(value, 0)
|
||||||
# If there's a non-integer, numeric 'type' attribute (e.g. 'u' or
|
# If there's a non-integer, numeric 'type' attribute (e.g. 'u' or
|
||||||
# 'ull'), append it to the string value.
|
# 'ull'), append it to the string value.
|
||||||
# t = enuminfo.elem.get('type')
|
# t = enuminfo.elem.get('type')
|
||||||
# if (t != None and t != '' and t != 'i' and t != 's'):
|
# if t is not None and t != '' and t != 'i' and t != 's':
|
||||||
# value += enuminfo.type
|
# value += enuminfo.type
|
||||||
self.logMsg('diag', 'Enum', name, '-> value [', numVal, ',', value, ']')
|
self.logMsg('diag', 'Enum', name, '-> value [', numVal, ',', value, ']')
|
||||||
return [numVal, value]
|
return [numVal, value]
|
||||||
if ('bitpos' in elem.keys()):
|
if 'bitpos' in elem.keys():
|
||||||
value = elem.get('bitpos')
|
value = elem.get('bitpos')
|
||||||
numVal = int(value, 0)
|
bitpos = int(value, 0)
|
||||||
numVal = 1 << numVal
|
numVal = 1 << bitpos
|
||||||
value = '0x%08x' % numVal
|
value = '0x%08x' % numVal
|
||||||
|
if( bitpos >= 32 ):
|
||||||
|
value = value + 'ULL'
|
||||||
self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']')
|
self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']')
|
||||||
return [numVal, value]
|
return [numVal, value]
|
||||||
if ('offset' in elem.keys()):
|
if 'offset' in elem.keys():
|
||||||
# Obtain values in the mapping from the attributes
|
# Obtain values in the mapping from the attributes
|
||||||
enumNegative = False
|
enumNegative = False
|
||||||
offset = int(elem.get('offset'),0)
|
offset = int(elem.get('offset'),0)
|
||||||
extnumber = int(elem.get('extnumber'),0)
|
extnumber = int(elem.get('extnumber'),0)
|
||||||
extends = elem.get('extends')
|
extends = elem.get('extends')
|
||||||
if ('dir' in elem.keys()):
|
if 'dir' in elem.keys():
|
||||||
enumNegative = True
|
enumNegative = True
|
||||||
self.logMsg('diag', 'Enum', name, 'offset =', offset,
|
self.logMsg('diag', 'Enum', name, 'offset =', offset,
|
||||||
'extnumber =', extnumber, 'extends =', extends,
|
'extnumber =', extnumber, 'extends =', extends,
|
||||||
@ -304,8 +310,8 @@ class OutputGenerator:
|
|||||||
# Now determine the actual enumerant value, as defined
|
# Now determine the actual enumerant value, as defined
|
||||||
# in the "Layers and Extensions" appendix of the spec.
|
# in the "Layers and Extensions" appendix of the spec.
|
||||||
numVal = self.extBase + (extnumber - 1) * self.extBlockSize + offset
|
numVal = self.extBase + (extnumber - 1) * self.extBlockSize + offset
|
||||||
if (enumNegative):
|
if enumNegative:
|
||||||
numVal = -numVal
|
numVal *= -1
|
||||||
value = '%d' % numVal
|
value = '%d' % numVal
|
||||||
# More logic needed!
|
# More logic needed!
|
||||||
self.logMsg('diag', 'Enum', name, '-> offset [', numVal, ',', value, ']')
|
self.logMsg('diag', 'Enum', name, '-> offset [', numVal, ',', value, ']')
|
||||||
@ -313,7 +319,7 @@ class OutputGenerator:
|
|||||||
if 'alias' in elem.keys():
|
if 'alias' in elem.keys():
|
||||||
return [None, elem.get('alias')]
|
return [None, elem.get('alias')]
|
||||||
return [None, None]
|
return [None, None]
|
||||||
#
|
|
||||||
# checkDuplicateEnums - sanity check for enumerated values
|
# checkDuplicateEnums - sanity check for enumerated values
|
||||||
# enums - list of <enum> Elements
|
# enums - list of <enum> Elements
|
||||||
# returns the list with duplicates stripped
|
# returns the list with duplicates stripped
|
||||||
@ -336,7 +342,7 @@ class OutputGenerator:
|
|||||||
# Duplicate enum values for the same name are benign. This
|
# Duplicate enum values for the same name are benign. This
|
||||||
# happens when defining the same enum conditionally in
|
# happens when defining the same enum conditionally in
|
||||||
# several extension blocks.
|
# several extension blocks.
|
||||||
if (strVal2 == strVal or (numVal != None and
|
if (strVal2 == strVal or (numVal is not None and
|
||||||
numVal == numVal2)):
|
numVal == numVal2)):
|
||||||
True
|
True
|
||||||
# self.logMsg('info', 'checkDuplicateEnums: Duplicate enum (' + name +
|
# self.logMsg('info', 'checkDuplicateEnums: Duplicate enum (' + name +
|
||||||
@ -361,7 +367,7 @@ class OutputGenerator:
|
|||||||
|
|
||||||
# Track this enum to detect followon duplicates
|
# Track this enum to detect followon duplicates
|
||||||
nameMap[name] = [ elem, numVal, strVal ]
|
nameMap[name] = [ elem, numVal, strVal ]
|
||||||
if numVal != None:
|
if numVal is not None:
|
||||||
valueMap[numVal] = [ elem, numVal, strVal ]
|
valueMap[numVal] = [ elem, numVal, strVal ]
|
||||||
|
|
||||||
# Add this enum to the list
|
# Add this enum to the list
|
||||||
@ -369,58 +375,194 @@ class OutputGenerator:
|
|||||||
|
|
||||||
# Return the list
|
# Return the list
|
||||||
return stripped
|
return stripped
|
||||||
#
|
|
||||||
|
# buildEnumCDecl
|
||||||
|
# Generates the C declaration for an enum
|
||||||
|
def buildEnumCDecl(self, expand, groupinfo, groupName):
|
||||||
|
groupElem = groupinfo.elem
|
||||||
|
|
||||||
|
if self.genOpts.conventions.constFlagBits and groupElem.get('type') == 'bitmask':
|
||||||
|
return self.buildEnumCDecl_Bitmask( groupinfo, groupName)
|
||||||
|
else:
|
||||||
|
return self.buildEnumCDecl_Enum(expand, groupinfo, groupName)
|
||||||
|
|
||||||
|
# buildEnumCDecl_Bitmask
|
||||||
|
# Generates the C declaration for an "enum" that is actually a
|
||||||
|
# set of flag bits
|
||||||
|
def buildEnumCDecl_Bitmask(self, groupinfo, groupName):
|
||||||
|
groupElem = groupinfo.elem
|
||||||
|
flagTypeName = groupinfo.flagType.elem.get('name')
|
||||||
|
|
||||||
|
# Prefix
|
||||||
|
body = "// Flag bits for " + flagTypeName + "\n"
|
||||||
|
|
||||||
|
# Loop over the nested 'enum' tags.
|
||||||
|
for elem in groupElem.findall('enum'):
|
||||||
|
# Convert the value to an integer and use that to track min/max.
|
||||||
|
# Values of form -(number) are accepted but nothing more complex.
|
||||||
|
# Should catch exceptions here for more complex constructs. Not yet.
|
||||||
|
(_, strVal) = self.enumToValue(elem, True)
|
||||||
|
name = elem.get('name')
|
||||||
|
body += "static const " + flagTypeName + " " + name + " = " + strVal + ";\n"
|
||||||
|
|
||||||
|
# Postfix
|
||||||
|
|
||||||
|
return ("bitmask", body)
|
||||||
|
|
||||||
|
# Generates the C declaration for an enumerated type
|
||||||
|
def buildEnumCDecl_Enum(self, expand, groupinfo, groupName):
|
||||||
|
groupElem = groupinfo.elem
|
||||||
|
|
||||||
|
# Break the group name into prefix and suffix portions for range
|
||||||
|
# enum generation
|
||||||
|
expandName = re.sub(r'([0-9a-z_])([A-Z0-9])',r'\1_\2',groupName).upper()
|
||||||
|
expandPrefix = expandName
|
||||||
|
expandSuffix = ''
|
||||||
|
expandSuffixMatch = re.search(r'[A-Z][A-Z]+$',groupName)
|
||||||
|
if expandSuffixMatch:
|
||||||
|
expandSuffix = '_' + expandSuffixMatch.group()
|
||||||
|
# Strip off the suffix from the prefix
|
||||||
|
expandPrefix = expandName.rsplit(expandSuffix, 1)[0]
|
||||||
|
|
||||||
|
# Prefix
|
||||||
|
body = "typedef enum " + groupName + " {\n"
|
||||||
|
|
||||||
|
# @@ Should use the type="bitmask" attribute instead
|
||||||
|
isEnum = ('FLAG_BITS' not in expandPrefix)
|
||||||
|
|
||||||
|
# Get a list of nested 'enum' tags.
|
||||||
|
enums = groupElem.findall('enum')
|
||||||
|
|
||||||
|
# Check for and report duplicates, and return a list with them
|
||||||
|
# removed.
|
||||||
|
enums = self.checkDuplicateEnums(enums)
|
||||||
|
|
||||||
|
# Loop over the nested 'enum' tags. Keep track of the minimum and
|
||||||
|
# maximum numeric values, if they can be determined; but only for
|
||||||
|
# core API enumerants, not extension enumerants. This is inferred
|
||||||
|
# by looking for 'extends' attributes.
|
||||||
|
minName = None
|
||||||
|
|
||||||
|
# Accumulate non-numeric enumerant values separately and append
|
||||||
|
# them following the numeric values, to allow for aliases.
|
||||||
|
# NOTE: this doesn't do a topological sort yet, so aliases of
|
||||||
|
# aliases can still get in the wrong order.
|
||||||
|
aliasText = ""
|
||||||
|
|
||||||
|
for elem in enums:
|
||||||
|
# Convert the value to an integer and use that to track min/max.
|
||||||
|
# Values of form -(number) are accepted but nothing more complex.
|
||||||
|
# Should catch exceptions here for more complex constructs. Not yet.
|
||||||
|
(numVal,strVal) = self.enumToValue(elem, True)
|
||||||
|
name = elem.get('name')
|
||||||
|
|
||||||
|
# Extension enumerants are only included if they are required
|
||||||
|
if self.isEnumRequired(elem):
|
||||||
|
decl = " " + name + " = " + strVal + ",\n"
|
||||||
|
if numVal is not None:
|
||||||
|
body += decl
|
||||||
|
else:
|
||||||
|
aliasText += decl
|
||||||
|
|
||||||
|
# Don't track min/max for non-numbers (numVal is None)
|
||||||
|
if isEnum and numVal is not None and elem.get('extends') is None:
|
||||||
|
if minName is None:
|
||||||
|
minName = maxName = name
|
||||||
|
minValue = maxValue = numVal
|
||||||
|
elif numVal < minValue:
|
||||||
|
minName = name
|
||||||
|
minValue = numVal
|
||||||
|
elif numVal > maxValue:
|
||||||
|
maxName = name
|
||||||
|
maxValue = numVal
|
||||||
|
|
||||||
|
# Now append the non-numeric enumerant values
|
||||||
|
body += aliasText
|
||||||
|
|
||||||
|
# Generate min/max value tokens and a range-padding enum. Need some
|
||||||
|
# additional padding to generate correct names...
|
||||||
|
if isEnum and expand:
|
||||||
|
body += " " + expandPrefix + "_BEGIN_RANGE" + expandSuffix + " = " + minName + ",\n"
|
||||||
|
body += " " + expandPrefix + "_END_RANGE" + expandSuffix + " = " + maxName + ",\n"
|
||||||
|
body += " " + expandPrefix + "_RANGE_SIZE" + expandSuffix + " = (" + maxName + " - " + minName + " + 1),\n"
|
||||||
|
|
||||||
|
# Always generate this to make sure the enumerated type is 32 bits
|
||||||
|
body += " " + expandPrefix + "_MAX_ENUM" + expandSuffix + " = 0x7FFFFFFF\n"
|
||||||
|
|
||||||
|
# Postfix
|
||||||
|
body += "} " + groupName + ";"
|
||||||
|
|
||||||
|
# Determine appropriate section for this declaration
|
||||||
|
if groupElem.get('type') == 'bitmask':
|
||||||
|
section = 'bitmask'
|
||||||
|
else:
|
||||||
|
section = 'group'
|
||||||
|
|
||||||
|
return (section, body)
|
||||||
|
|
||||||
def makeDir(self, path):
|
def makeDir(self, path):
|
||||||
self.logMsg('diag', 'OutputGenerator::makeDir(' + path + ')')
|
self.logMsg('diag', 'OutputGenerator::makeDir(' + path + ')')
|
||||||
if not (path in self.madeDirs.keys()):
|
if path not in self.madeDirs:
|
||||||
# This can get race conditions with multiple writers, see
|
# This can get race conditions with multiple writers, see
|
||||||
# https://stackoverflow.com/questions/273192/
|
# https://stackoverflow.com/questions/273192/
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
self.madeDirs[path] = None
|
self.madeDirs[path] = None
|
||||||
#
|
|
||||||
def beginFile(self, genOpts):
|
def beginFile(self, genOpts):
|
||||||
self.genOpts = genOpts
|
self.genOpts = genOpts
|
||||||
#
|
|
||||||
# Open specified output file. Not done in constructor since a
|
# Open specified output file. Not done in constructor since a
|
||||||
# Generator can be used without writing to a file.
|
# Generator can be used without writing to a file.
|
||||||
if (self.genOpts.filename != None):
|
if self.genOpts.filename is not None:
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
directory = Path(self.genOpts.directory)
|
||||||
|
if not os.path.exists(directory):
|
||||||
|
os.makedirs(directory)
|
||||||
|
self.outFile = io.open(directory / self.genOpts.filename, 'w', encoding='utf-8')
|
||||||
|
else:
|
||||||
filename = self.genOpts.directory + '/' + self.genOpts.filename
|
filename = self.genOpts.directory + '/' + self.genOpts.filename
|
||||||
self.outFile = io.open(filename, 'w', encoding='utf-8')
|
self.outFile = io.open(filename, 'w', encoding='utf-8')
|
||||||
else:
|
else:
|
||||||
self.outFile = sys.stdout
|
self.outFile = sys.stdout
|
||||||
|
|
||||||
def endFile(self):
|
def endFile(self):
|
||||||
self.errFile and self.errFile.flush()
|
if self.errFile:
|
||||||
self.warnFile and self.warnFile.flush()
|
self.errFile.flush()
|
||||||
self.diagFile and self.diagFile.flush()
|
if self.warnFile:
|
||||||
|
self.warnFile.flush()
|
||||||
|
if self.diagFile:
|
||||||
|
self.diagFile.flush()
|
||||||
self.outFile.flush()
|
self.outFile.flush()
|
||||||
if (self.outFile != sys.stdout and self.outFile != sys.stderr):
|
if self.outFile != sys.stdout and self.outFile != sys.stderr:
|
||||||
self.outFile.close()
|
self.outFile.close()
|
||||||
self.genOpts = None
|
self.genOpts = None
|
||||||
#
|
|
||||||
def beginFeature(self, interface, emit):
|
def beginFeature(self, interface, emit):
|
||||||
self.emit = emit
|
self.emit = emit
|
||||||
self.featureName = interface.get('name')
|
self.featureName = interface.get('name')
|
||||||
# If there's an additional 'protect' attribute in the feature, save it
|
# If there's an additional 'protect' attribute in the feature, save it
|
||||||
self.featureExtraProtect = interface.get('protect')
|
self.featureExtraProtect = interface.get('protect')
|
||||||
|
|
||||||
def endFeature(self):
|
def endFeature(self):
|
||||||
# Derived classes responsible for emitting feature
|
# Derived classes responsible for emitting feature
|
||||||
self.featureName = None
|
self.featureName = None
|
||||||
self.featureExtraProtect = None
|
self.featureExtraProtect = None
|
||||||
|
|
||||||
# Utility method to validate we're generating something only inside a
|
# Utility method to validate we're generating something only inside a
|
||||||
# <feature> tag
|
# <feature> tag
|
||||||
def validateFeature(self, featureType, featureName):
|
def validateFeature(self, featureType, featureName):
|
||||||
if (self.featureName == None):
|
if self.featureName is None:
|
||||||
raise UserWarning('Attempt to generate', featureType,
|
raise UserWarning('Attempt to generate', featureType,
|
||||||
featureName, 'when not in feature')
|
featureName, 'when not in feature')
|
||||||
#
|
|
||||||
# Type generation
|
# Type generation
|
||||||
def genType(self, typeinfo, name, alias):
|
def genType(self, typeinfo, name, alias):
|
||||||
self.validateFeature('type', name)
|
self.validateFeature('type', name)
|
||||||
#
|
|
||||||
# Struct (e.g. C "struct" type) generation
|
# Struct (e.g. C "struct" type) generation
|
||||||
def genStruct(self, typeinfo, name, alias):
|
def genStruct(self, typeinfo, typeName, alias):
|
||||||
self.validateFeature('struct', name)
|
self.validateFeature('struct', typeName)
|
||||||
|
|
||||||
# The mixed-mode <member> tags may contain no-op <comment> tags.
|
# The mixed-mode <member> tags may contain no-op <comment> tags.
|
||||||
# It is convenient to remove them here where all output generators
|
# It is convenient to remove them here where all output generators
|
||||||
@ -428,28 +570,29 @@ class OutputGenerator:
|
|||||||
for member in typeinfo.elem.findall('.//member'):
|
for member in typeinfo.elem.findall('.//member'):
|
||||||
for comment in member.findall('comment'):
|
for comment in member.findall('comment'):
|
||||||
member.remove(comment)
|
member.remove(comment)
|
||||||
#
|
|
||||||
# Group (e.g. C "enum" type) generation
|
# Group (e.g. C "enum" type) generation
|
||||||
def genGroup(self, groupinfo, name, alias):
|
def genGroup(self, groupinfo, groupName, alias):
|
||||||
self.validateFeature('group', name)
|
self.validateFeature('group', groupName)
|
||||||
#
|
|
||||||
# Enumerant (really, constant) generation
|
# Enumerant (really, constant) generation
|
||||||
def genEnum(self, enuminfo, name, alias):
|
def genEnum(self, enuminfo, typeName, alias):
|
||||||
self.validateFeature('enum', name)
|
self.validateFeature('enum', typeName)
|
||||||
#
|
|
||||||
# Command generation
|
# Command generation
|
||||||
def genCmd(self, cmd, name, alias):
|
def genCmd(self, cmd, cmdinfo, alias):
|
||||||
self.validateFeature('command', name)
|
self.validateFeature('command', cmdinfo)
|
||||||
#
|
|
||||||
# Utility functions - turn a <proto> <name> into C-language prototype
|
# Utility functions - turn a <proto> <name> into C-language prototype
|
||||||
# and typedef declarations for that name.
|
# and typedef declarations for that name.
|
||||||
# name - contents of <name> tag
|
# name - contents of <name> tag
|
||||||
# tail - whatever text follows that tag in the Element
|
# tail - whatever text follows that tag in the Element
|
||||||
def makeProtoName(self, name, tail):
|
def makeProtoName(self, name, tail):
|
||||||
return self.genOpts.apientry + name + tail
|
return self.genOpts.apientry + name + tail
|
||||||
|
|
||||||
def makeTypedefName(self, name, tail):
|
def makeTypedefName(self, name, tail):
|
||||||
return '(' + self.genOpts.apientryp + 'PFN_' + name + tail + ')'
|
return '(' + self.genOpts.apientryp + 'PFN_' + name + tail + ')'
|
||||||
#
|
|
||||||
# makeCParamDecl - return a string which is an indented, formatted
|
# makeCParamDecl - return a string which is an indented, formatted
|
||||||
# declaration for a <param> or <member> block (e.g. function parameter
|
# declaration for a <param> or <member> block (e.g. function parameter
|
||||||
# or structure/union member).
|
# or structure/union member).
|
||||||
@ -461,7 +604,11 @@ class OutputGenerator:
|
|||||||
for elem in param:
|
for elem in param:
|
||||||
text = noneStr(elem.text)
|
text = noneStr(elem.text)
|
||||||
tail = noneStr(elem.tail)
|
tail = noneStr(elem.tail)
|
||||||
if (elem.tag == 'name' and aligncol > 0):
|
|
||||||
|
if self.genOpts.conventions.is_voidpointer_alias(elem.tag, text, tail):
|
||||||
|
# OpenXR-specific macro insertion
|
||||||
|
tail = self.genOpts.conventions.make_voidpointer_alias(tail)
|
||||||
|
if elem.tag == 'name' and aligncol > 0:
|
||||||
self.logMsg('diag', 'Aligning parameter', elem.text, 'to column', self.genOpts.alignFuncParam)
|
self.logMsg('diag', 'Aligning parameter', elem.text, 'to column', self.genOpts.alignFuncParam)
|
||||||
# Align at specified column, if possible
|
# Align at specified column, if possible
|
||||||
paramdecl = paramdecl.rstrip()
|
paramdecl = paramdecl.rstrip()
|
||||||
@ -474,7 +621,7 @@ class OutputGenerator:
|
|||||||
self.logMsg('diag', 'Adjust length of parameter decl from', oldLen, 'to', newLen, ':', paramdecl)
|
self.logMsg('diag', 'Adjust length of parameter decl from', oldLen, 'to', newLen, ':', paramdecl)
|
||||||
paramdecl += text + tail
|
paramdecl += text + tail
|
||||||
return paramdecl
|
return paramdecl
|
||||||
#
|
|
||||||
# getCParamTypeLength - return the length of the type field is an indented, formatted
|
# getCParamTypeLength - return the length of the type field is an indented, formatted
|
||||||
# declaration for a <param> or <member> block (e.g. function parameter
|
# declaration for a <param> or <member> block (e.g. function parameter
|
||||||
# or structure/union member).
|
# or structure/union member).
|
||||||
@ -484,18 +631,23 @@ class OutputGenerator:
|
|||||||
for elem in param:
|
for elem in param:
|
||||||
text = noneStr(elem.text)
|
text = noneStr(elem.text)
|
||||||
tail = noneStr(elem.tail)
|
tail = noneStr(elem.tail)
|
||||||
if (elem.tag == 'name'):
|
|
||||||
|
if self.genOpts.conventions.is_voidpointer_alias(elem.tag, text, tail):
|
||||||
|
# OpenXR-specific macro insertion
|
||||||
|
tail = self.genOpts.conventions.make_voidpointer_alias(tail)
|
||||||
|
if elem.tag == 'name':
|
||||||
# Align at specified column, if possible
|
# Align at specified column, if possible
|
||||||
newLen = len(paramdecl.rstrip())
|
newLen = len(paramdecl.rstrip())
|
||||||
self.logMsg('diag', 'Identifying length of', elem.text, 'as', newLen)
|
self.logMsg('diag', 'Identifying length of', elem.text, 'as', newLen)
|
||||||
paramdecl += text + tail
|
paramdecl += text + tail
|
||||||
|
|
||||||
return newLen
|
return newLen
|
||||||
#
|
|
||||||
# isEnumRequired(elem) - return True if this <enum> element is
|
# isEnumRequired(elem) - return True if this <enum> element is
|
||||||
# required, False otherwise
|
# required, False otherwise
|
||||||
# elem - <enum> element to test
|
# elem - <enum> element to test
|
||||||
def isEnumRequired(self, elem):
|
def isEnumRequired(self, elem):
|
||||||
required = elem.get('required') != None
|
required = elem.get('required') is not None
|
||||||
self.logMsg('diag', 'isEnumRequired:', elem.get('name'),
|
self.logMsg('diag', 'isEnumRequired:', elem.get('name'),
|
||||||
'->', required)
|
'->', required)
|
||||||
return required
|
return required
|
||||||
@ -520,7 +672,6 @@ class OutputGenerator:
|
|||||||
|
|
||||||
return required
|
return required
|
||||||
|
|
||||||
#
|
|
||||||
# makeCDecls - return C prototype and function pointer typedef for a
|
# makeCDecls - return C prototype and function pointer typedef for a
|
||||||
# command, as a two-element list of strings.
|
# command, as a two-element list of strings.
|
||||||
# cmd - Element containing a <command> tag
|
# cmd - Element containing a <command> tag
|
||||||
@ -531,7 +682,7 @@ class OutputGenerator:
|
|||||||
# Begin accumulating prototype and typedef strings
|
# Begin accumulating prototype and typedef strings
|
||||||
pdecl = self.genOpts.apicall
|
pdecl = self.genOpts.apicall
|
||||||
tdecl = 'typedef '
|
tdecl = 'typedef '
|
||||||
#
|
|
||||||
# Insert the function return type/name.
|
# Insert the function return type/name.
|
||||||
# For prototypes, add APIENTRY macro before the name
|
# For prototypes, add APIENTRY macro before the name
|
||||||
# For typedefs, add (APIENTRY *<name>) around the name and
|
# For typedefs, add (APIENTRY *<name>) around the name and
|
||||||
@ -547,7 +698,7 @@ class OutputGenerator:
|
|||||||
for elem in proto:
|
for elem in proto:
|
||||||
text = noneStr(elem.text)
|
text = noneStr(elem.text)
|
||||||
tail = noneStr(elem.tail)
|
tail = noneStr(elem.tail)
|
||||||
if (elem.tag == 'name'):
|
if elem.tag == 'name':
|
||||||
pdecl += self.makeProtoName(text, tail)
|
pdecl += self.makeProtoName(text, tail)
|
||||||
tdecl += self.makeTypedefName(text, tail)
|
tdecl += self.makeTypedefName(text, tail)
|
||||||
else:
|
else:
|
||||||
@ -560,36 +711,28 @@ class OutputGenerator:
|
|||||||
# Uses: self.indentFuncProto
|
# Uses: self.indentFuncProto
|
||||||
# self.indentFuncPointer
|
# self.indentFuncPointer
|
||||||
# self.alignFuncParam
|
# self.alignFuncParam
|
||||||
# Might be able to doubly-nest the joins, e.g.
|
|
||||||
# ','.join(('_'.join([l[i] for i in range(0,len(l))])
|
|
||||||
n = len(params)
|
n = len(params)
|
||||||
# Indented parameters
|
# Indented parameters
|
||||||
if n > 0:
|
if n > 0:
|
||||||
indentdecl = '(\n'
|
indentdecl = '(\n'
|
||||||
for i in range(0,n):
|
indentdecl += ',\n'.join(self.makeCParamDecl(p, self.genOpts.alignFuncParam)
|
||||||
paramdecl = self.makeCParamDecl(params[i], self.genOpts.alignFuncParam)
|
for p in params)
|
||||||
if (i < n - 1):
|
indentdecl += ');'
|
||||||
paramdecl += ',\n'
|
|
||||||
else:
|
|
||||||
paramdecl += ');'
|
|
||||||
indentdecl += paramdecl
|
|
||||||
else:
|
else:
|
||||||
indentdecl = '(void);'
|
indentdecl = '(void);'
|
||||||
# Non-indented parameters
|
# Non-indented parameters
|
||||||
paramdecl = '('
|
paramdecl = '('
|
||||||
if n > 0:
|
if n > 0:
|
||||||
for i in range(0,n):
|
paramnames = (''.join(t for t in p.itertext())
|
||||||
paramdecl += ''.join([t for t in params[i].itertext()])
|
for p in params)
|
||||||
if (i < n - 1):
|
paramdecl += ', '.join(paramnames)
|
||||||
paramdecl += ', '
|
|
||||||
else:
|
else:
|
||||||
paramdecl += 'void'
|
paramdecl += 'void'
|
||||||
paramdecl += ");";
|
paramdecl += ");"
|
||||||
return [ pdecl + indentdecl, tdecl + paramdecl ]
|
return [ pdecl + indentdecl, tdecl + paramdecl ]
|
||||||
#
|
|
||||||
def newline(self):
|
def newline(self):
|
||||||
write('', file=self.outFile)
|
write('', file=self.outFile)
|
||||||
|
|
||||||
def setRegistry(self, registry):
|
def setRegistry(self, registry):
|
||||||
self.registry = registry
|
self.registry = registry
|
||||||
#
|
|
||||||
|
@ -23,7 +23,7 @@ from extensionmetadocgenerator import ExtensionMetaDocGeneratorOptions, Extensio
|
|||||||
from pygenerator import PyOutputGenerator
|
from pygenerator import PyOutputGenerator
|
||||||
from validitygenerator import ValidityOutputGenerator
|
from validitygenerator import ValidityOutputGenerator
|
||||||
from hostsyncgenerator import HostSynchronizationOutputGenerator
|
from hostsyncgenerator import HostSynchronizationOutputGenerator
|
||||||
from extensionStubSource import ExtensionStubSourceOutputGenerator
|
from vkconventions import VulkanConventions
|
||||||
|
|
||||||
# Simple timer functions
|
# Simple timer functions
|
||||||
startTime = None
|
startTime = None
|
||||||
@ -122,6 +122,9 @@ def makeGenOpts(args):
|
|||||||
protectFeature = protect
|
protectFeature = protect
|
||||||
protectProto = protect
|
protectProto = protect
|
||||||
|
|
||||||
|
# An API style conventions object
|
||||||
|
conventions = VulkanConventions()
|
||||||
|
|
||||||
# API include files for spec and ref pages
|
# API include files for spec and ref pages
|
||||||
# Overwrites include subdirectories in spec source tree
|
# Overwrites include subdirectories in spec source tree
|
||||||
# The generated include files do not include the calling convention
|
# The generated include files do not include the calling convention
|
||||||
@ -132,6 +135,7 @@ def makeGenOpts(args):
|
|||||||
genOpts['apiinc'] = [
|
genOpts['apiinc'] = [
|
||||||
DocOutputGenerator,
|
DocOutputGenerator,
|
||||||
DocGeneratorOptions(
|
DocGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = 'timeMarker',
|
filename = 'timeMarker',
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -154,6 +158,7 @@ def makeGenOpts(args):
|
|||||||
genOpts['vkapi.py'] = [
|
genOpts['vkapi.py'] = [
|
||||||
PyOutputGenerator,
|
PyOutputGenerator,
|
||||||
DocGeneratorOptions(
|
DocGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = 'vkapi.py',
|
filename = 'vkapi.py',
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -170,6 +175,7 @@ def makeGenOpts(args):
|
|||||||
genOpts['validinc'] = [
|
genOpts['validinc'] = [
|
||||||
ValidityOutputGenerator,
|
ValidityOutputGenerator,
|
||||||
DocGeneratorOptions(
|
DocGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = 'timeMarker',
|
filename = 'timeMarker',
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -186,6 +192,7 @@ def makeGenOpts(args):
|
|||||||
genOpts['hostsyncinc'] = [
|
genOpts['hostsyncinc'] = [
|
||||||
HostSynchronizationOutputGenerator,
|
HostSynchronizationOutputGenerator,
|
||||||
DocGeneratorOptions(
|
DocGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = 'timeMarker',
|
filename = 'timeMarker',
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -198,30 +205,11 @@ def makeGenOpts(args):
|
|||||||
emitExtensions = emitExtensionsPat)
|
emitExtensions = emitExtensionsPat)
|
||||||
]
|
]
|
||||||
|
|
||||||
# Extension stub source dispatcher
|
|
||||||
# This target is no longer maintained and supported.
|
|
||||||
# See README.adoc for discussion.
|
|
||||||
genOpts['vulkan_ext.c'] = [
|
|
||||||
ExtensionStubSourceOutputGenerator,
|
|
||||||
CGeneratorOptions(
|
|
||||||
filename = 'vulkan_ext.c',
|
|
||||||
directory = directory,
|
|
||||||
apiname = 'vulkan',
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = None,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = '.*',
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
prefixText = prefixStrings + vkPrefixStrings,
|
|
||||||
alignFuncParam = 48)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Extension metainformation for spec extension appendices
|
# Extension metainformation for spec extension appendices
|
||||||
genOpts['extinc'] = [
|
genOpts['extinc'] = [
|
||||||
ExtensionMetaDocOutputGenerator,
|
ExtensionMetaDocOutputGenerator,
|
||||||
ExtensionMetaDocGeneratorOptions(
|
ExtensionMetaDocGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = 'timeMarker',
|
filename = 'timeMarker',
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -256,11 +244,13 @@ def makeGenOpts(args):
|
|||||||
'VK_ANDROID_external_memory_android_hardware_buffer'
|
'VK_ANDROID_external_memory_android_hardware_buffer'
|
||||||
], commonSuppressExtensions ],
|
], commonSuppressExtensions ],
|
||||||
[ 'vulkan_fuchsia.h', [ 'VK_FUCHSIA_imagepipe_surface'], commonSuppressExtensions ],
|
[ 'vulkan_fuchsia.h', [ 'VK_FUCHSIA_imagepipe_surface'], commonSuppressExtensions ],
|
||||||
|
[ 'vulkan_ggp.h', [ 'VK_GGP_stream_descriptor_surface',
|
||||||
|
'VK_GGP_frame_token' ], commonSuppressExtensions ],
|
||||||
[ 'vulkan_ios.h', [ 'VK_MVK_ios_surface' ], commonSuppressExtensions ],
|
[ 'vulkan_ios.h', [ 'VK_MVK_ios_surface' ], commonSuppressExtensions ],
|
||||||
[ 'vulkan_macos.h', [ 'VK_MVK_macos_surface' ], commonSuppressExtensions ],
|
[ 'vulkan_macos.h', [ 'VK_MVK_macos_surface' ], commonSuppressExtensions ],
|
||||||
[ 'vulkan_vi.h', [ 'VK_NN_vi_surface' ], commonSuppressExtensions ],
|
[ 'vulkan_vi.h', [ 'VK_NN_vi_surface' ], commonSuppressExtensions ],
|
||||||
[ 'vulkan_wayland.h', [ 'VK_KHR_wayland_surface' ], commonSuppressExtensions ],
|
[ 'vulkan_wayland.h', [ 'VK_KHR_wayland_surface' ], commonSuppressExtensions ],
|
||||||
[ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)' ], commonSuppressExtensions + [ 'VK_KHR_external_semaphore', 'VK_KHR_external_memory_capabilities', 'VK_KHR_external_fence', 'VK_KHR_external_fence_capabilities', 'VK_NV_external_memory_capabilities' ] ],
|
[ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)', 'VK_EXT_full_screen_exclusive'], commonSuppressExtensions + [ 'VK_KHR_external_semaphore', 'VK_KHR_external_memory_capabilities', 'VK_KHR_external_fence', 'VK_KHR_external_fence_capabilities', 'VK_NV_external_memory_capabilities' ] ],
|
||||||
[ 'vulkan_xcb.h', [ 'VK_KHR_xcb_surface' ], commonSuppressExtensions ],
|
[ 'vulkan_xcb.h', [ 'VK_KHR_xcb_surface' ], commonSuppressExtensions ],
|
||||||
[ 'vulkan_xlib.h', [ 'VK_KHR_xlib_surface' ], commonSuppressExtensions ],
|
[ 'vulkan_xlib.h', [ 'VK_KHR_xlib_surface' ], commonSuppressExtensions ],
|
||||||
[ 'vulkan_xlib_xrandr.h', [ 'VK_EXT_acquire_xlib_display' ], commonSuppressExtensions ],
|
[ 'vulkan_xlib_xrandr.h', [ 'VK_EXT_acquire_xlib_display' ], commonSuppressExtensions ],
|
||||||
@ -276,6 +266,7 @@ def makeGenOpts(args):
|
|||||||
emitPlatformExtensionsRE = makeREstring(platform[1])
|
emitPlatformExtensionsRE = makeREstring(platform[1])
|
||||||
|
|
||||||
opts = CGeneratorOptions(
|
opts = CGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = headername,
|
filename = headername,
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -295,7 +286,8 @@ def makeGenOpts(args):
|
|||||||
apicall = 'VKAPI_ATTR ',
|
apicall = 'VKAPI_ATTR ',
|
||||||
apientry = 'VKAPI_CALL ',
|
apientry = 'VKAPI_CALL ',
|
||||||
apientryp = 'VKAPI_PTR *',
|
apientryp = 'VKAPI_PTR *',
|
||||||
alignFuncParam = 48)
|
alignFuncParam = 48,
|
||||||
|
genEnumBeginEndRange = True)
|
||||||
|
|
||||||
genOpts[headername] = [ COutputGenerator, opts ]
|
genOpts[headername] = [ COutputGenerator, opts ]
|
||||||
|
|
||||||
@ -312,6 +304,7 @@ def makeGenOpts(args):
|
|||||||
genOpts['vulkan_core.h'] = [
|
genOpts['vulkan_core.h'] = [
|
||||||
COutputGenerator,
|
COutputGenerator,
|
||||||
CGeneratorOptions(
|
CGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = 'vulkan_core.h',
|
filename = 'vulkan_core.h',
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -331,7 +324,8 @@ def makeGenOpts(args):
|
|||||||
apicall = 'VKAPI_ATTR ',
|
apicall = 'VKAPI_ATTR ',
|
||||||
apientry = 'VKAPI_CALL ',
|
apientry = 'VKAPI_CALL ',
|
||||||
apientryp = 'VKAPI_PTR *',
|
apientryp = 'VKAPI_PTR *',
|
||||||
alignFuncParam = 48)
|
alignFuncParam = 48,
|
||||||
|
genEnumBeginEndRange = True)
|
||||||
]
|
]
|
||||||
|
|
||||||
# Unused - vulkan10.h target.
|
# Unused - vulkan10.h target.
|
||||||
@ -342,6 +336,7 @@ def makeGenOpts(args):
|
|||||||
genOpts['vulkan10.h'] = [
|
genOpts['vulkan10.h'] = [
|
||||||
COutputGenerator,
|
COutputGenerator,
|
||||||
CGeneratorOptions(
|
CGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = 'vulkan10.h',
|
filename = 'vulkan10.h',
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -367,6 +362,7 @@ def makeGenOpts(args):
|
|||||||
genOpts['alias.h'] = [
|
genOpts['alias.h'] = [
|
||||||
COutputGenerator,
|
COutputGenerator,
|
||||||
CGeneratorOptions(
|
CGeneratorOptions(
|
||||||
|
conventions = conventions,
|
||||||
filename = 'alias.h',
|
filename = 'alias.h',
|
||||||
directory = directory,
|
directory = directory,
|
||||||
apiname = 'vulkan',
|
apiname = 'vulkan',
|
||||||
@ -404,7 +400,7 @@ def genTarget(args):
|
|||||||
# Create generator options with specified parameters
|
# Create generator options with specified parameters
|
||||||
makeGenOpts(args)
|
makeGenOpts(args)
|
||||||
|
|
||||||
if (args.target in genOpts.keys()):
|
if args.target in genOpts.keys():
|
||||||
createGenerator = genOpts[args.target][0]
|
createGenerator = genOpts[args.target][0]
|
||||||
options = genOpts[args.target][1]
|
options = genOpts[args.target][1]
|
||||||
|
|
||||||
@ -504,27 +500,27 @@ if __name__ == '__main__':
|
|||||||
reg.loadElementTree(tree)
|
reg.loadElementTree(tree)
|
||||||
endTimer(args.time, '* Time to parse ElementTree =')
|
endTimer(args.time, '* Time to parse ElementTree =')
|
||||||
|
|
||||||
if (args.validate):
|
if args.validate:
|
||||||
reg.validateGroups()
|
reg.validateGroups()
|
||||||
|
|
||||||
if (args.dump):
|
if args.dump:
|
||||||
write('* Dumping registry to regdump.txt', file=sys.stderr)
|
write('* Dumping registry to regdump.txt', file=sys.stderr)
|
||||||
reg.dumpReg(filehandle = open('regdump.txt', 'w', encoding='utf-8'))
|
reg.dumpReg(filehandle = open('regdump.txt', 'w', encoding='utf-8'))
|
||||||
|
|
||||||
# create error/warning & diagnostic files
|
# create error/warning & diagnostic files
|
||||||
if (args.errfile):
|
if args.errfile:
|
||||||
errWarn = open(args.errfile, 'w', encoding='utf-8')
|
errWarn = open(args.errfile, 'w', encoding='utf-8')
|
||||||
else:
|
else:
|
||||||
errWarn = sys.stderr
|
errWarn = sys.stderr
|
||||||
|
|
||||||
if (args.diagfile):
|
if args.diagfile:
|
||||||
diag = open(args.diagfile, 'w', encoding='utf-8')
|
diag = open(args.diagfile, 'w', encoding='utf-8')
|
||||||
else:
|
else:
|
||||||
diag = None
|
diag = None
|
||||||
|
|
||||||
if (args.debug):
|
if args.debug:
|
||||||
pdb.run('genTarget(args)')
|
pdb.run('genTarget(args)')
|
||||||
elif (args.profile):
|
elif args.profile:
|
||||||
import cProfile, pstats
|
import cProfile, pstats
|
||||||
cProfile.run('genTarget(args)', 'profile.txt')
|
cProfile.run('genTarget(args)', 'profile.txt')
|
||||||
p = pstats.Stats('profile.txt')
|
p = pstats.Stats('profile.txt')
|
||||||
|
386
registry/reg.py
386
registry/reg.py
@ -14,9 +14,12 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import io,os,pdb,re,string,sys,copy
|
import copy
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
import xml.etree.ElementTree as etree
|
import xml.etree.ElementTree as etree
|
||||||
from collections import defaultdict
|
from collections import defaultdict, namedtuple
|
||||||
|
from generator import OutputGenerator, write
|
||||||
|
|
||||||
# matchAPIProfile - returns whether an API and profile
|
# matchAPIProfile - returns whether an API and profile
|
||||||
# being generated matches an element's profile
|
# being generated matches an element's profile
|
||||||
@ -48,20 +51,21 @@ from collections import defaultdict
|
|||||||
# like "gl(core)|gles1(common-lite)".
|
# like "gl(core)|gles1(common-lite)".
|
||||||
def matchAPIProfile(api, profile, elem):
|
def matchAPIProfile(api, profile, elem):
|
||||||
"""Match a requested API & profile name to a api & profile attributes of an Element"""
|
"""Match a requested API & profile name to a api & profile attributes of an Element"""
|
||||||
match = True
|
|
||||||
# Match 'api', if present
|
# Match 'api', if present
|
||||||
if ('api' in elem.attrib):
|
elem_api = elem.get('api')
|
||||||
if (api == None):
|
if elem_api:
|
||||||
|
if api is None:
|
||||||
raise UserWarning("No API requested, but 'api' attribute is present with value '" +
|
raise UserWarning("No API requested, but 'api' attribute is present with value '" +
|
||||||
elem.get('api') + "'")
|
elem_api + "'")
|
||||||
elif (api != elem.get('api')):
|
elif api != elem_api:
|
||||||
# Requested API doesn't match attribute
|
# Requested API doesn't match attribute
|
||||||
return False
|
return False
|
||||||
if ('profile' in elem.attrib):
|
elem_profile = elem.get('profile')
|
||||||
if (profile == None):
|
if elem_profile:
|
||||||
|
if profile is None:
|
||||||
raise UserWarning("No profile requested, but 'profile' attribute is present with value '" +
|
raise UserWarning("No profile requested, but 'profile' attribute is present with value '" +
|
||||||
elem.get('profile') + "'")
|
elem_profile + "'")
|
||||||
elif (profile != elem.get('profile')):
|
elif profile != elem_profile:
|
||||||
# Requested profile doesn't match attribute
|
# Requested profile doesn't match attribute
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@ -134,7 +138,7 @@ class EnumInfo(BaseInfo):
|
|||||||
def __init__(self, elem):
|
def __init__(self, elem):
|
||||||
BaseInfo.__init__(self, elem)
|
BaseInfo.__init__(self, elem)
|
||||||
self.type = elem.get('type')
|
self.type = elem.get('type')
|
||||||
if (self.type == None):
|
if self.type is None:
|
||||||
self.type = ''
|
self.type = ''
|
||||||
|
|
||||||
# CmdInfo - registry information about a command
|
# CmdInfo - registry information about a command
|
||||||
@ -168,7 +172,7 @@ class FeatureInfo(BaseInfo):
|
|||||||
self.name = elem.get('name')
|
self.name = elem.get('name')
|
||||||
# Determine element category (vendor). Only works
|
# Determine element category (vendor). Only works
|
||||||
# for <extension> elements.
|
# for <extension> elements.
|
||||||
if (elem.tag == 'feature'):
|
if elem.tag == 'feature':
|
||||||
self.category = 'VERSION'
|
self.category = 'VERSION'
|
||||||
self.version = elem.get('name')
|
self.version = elem.get('name')
|
||||||
self.versionNumber = elem.get('number')
|
self.versionNumber = elem.get('number')
|
||||||
@ -182,8 +186,6 @@ class FeatureInfo(BaseInfo):
|
|||||||
self.supported = elem.get('supported')
|
self.supported = elem.get('supported')
|
||||||
self.emit = False
|
self.emit = False
|
||||||
|
|
||||||
from generator import write, GeneratorOptions, OutputGenerator
|
|
||||||
|
|
||||||
# Registry - object representing an API registry, loaded from an XML file
|
# Registry - object representing an API registry, loaded from an XML file
|
||||||
# Members
|
# Members
|
||||||
# tree - ElementTree containing the root <registry>
|
# tree - ElementTree containing the root <registry>
|
||||||
@ -229,7 +231,15 @@ class Registry:
|
|||||||
self.apidict = {}
|
self.apidict = {}
|
||||||
self.extensions = []
|
self.extensions = []
|
||||||
self.requiredextensions = [] # Hack - can remove it after validity generator goes away
|
self.requiredextensions = [] # Hack - can remove it after validity generator goes away
|
||||||
|
# ** Global types for automatic source generation **
|
||||||
|
# Length Member data
|
||||||
|
self.commandextensiontuple = namedtuple('commandextensiontuple',
|
||||||
|
['command', # The name of the command being modified
|
||||||
|
'value', # The value to append to the command
|
||||||
|
'extension']) # The name of the extension that added it
|
||||||
self.validextensionstructs = defaultdict(list)
|
self.validextensionstructs = defaultdict(list)
|
||||||
|
self.commandextensionsuccesses = []
|
||||||
|
self.commandextensionerrors = []
|
||||||
self.extdict = {}
|
self.extdict = {}
|
||||||
# A default output generator, so commands prior to apiGen can report
|
# A default output generator, so commands prior to apiGen can report
|
||||||
# errors via the generator object.
|
# errors via the generator object.
|
||||||
@ -238,14 +248,17 @@ class Registry:
|
|||||||
self.emitFeatures = False
|
self.emitFeatures = False
|
||||||
self.breakPat = None
|
self.breakPat = None
|
||||||
# self.breakPat = re.compile('VkFenceImportFlagBits.*')
|
# self.breakPat = re.compile('VkFenceImportFlagBits.*')
|
||||||
|
|
||||||
def loadElementTree(self, tree):
|
def loadElementTree(self, tree):
|
||||||
"""Load ElementTree into a Registry object and parse it"""
|
"""Load ElementTree into a Registry object and parse it"""
|
||||||
self.tree = tree
|
self.tree = tree
|
||||||
self.parseTree()
|
self.parseTree()
|
||||||
|
|
||||||
def loadFile(self, file):
|
def loadFile(self, file):
|
||||||
"""Load an API registry XML file into a Registry object and parse it"""
|
"""Load an API registry XML file into a Registry object and parse it"""
|
||||||
self.tree = etree.parse(file)
|
self.tree = etree.parse(file)
|
||||||
self.parseTree()
|
self.parseTree()
|
||||||
|
|
||||||
def setGenerator(self, gen):
|
def setGenerator(self, gen):
|
||||||
"""Specify output generator object. None restores the default generator"""
|
"""Specify output generator object. None restores the default generator"""
|
||||||
self.gen = gen
|
self.gen = gen
|
||||||
@ -263,9 +276,9 @@ class Registry:
|
|||||||
def addElementInfo(self, elem, info, infoName, dictionary):
|
def addElementInfo(self, elem, info, infoName, dictionary):
|
||||||
# self.gen.logMsg('diag', 'Adding ElementInfo.required =',
|
# self.gen.logMsg('diag', 'Adding ElementInfo.required =',
|
||||||
# info.required, 'name =', elem.get('name'))
|
# info.required, 'name =', elem.get('name'))
|
||||||
|
api = elem.get('api')
|
||||||
if ('api' in elem.attrib):
|
if api:
|
||||||
key = (elem.get('name'),elem.get('api'))
|
key = (elem.get('name'), api)
|
||||||
else:
|
else:
|
||||||
key = elem.get('name')
|
key = elem.get('name')
|
||||||
if key in dictionary:
|
if key in dictionary:
|
||||||
@ -277,28 +290,30 @@ class Registry:
|
|||||||
# 'with identical value')
|
# 'with identical value')
|
||||||
else:
|
else:
|
||||||
dictionary[key] = info
|
dictionary[key] = info
|
||||||
#
|
|
||||||
# lookupElementInfo - find a {Type|Enum|Cmd}Info object by name.
|
# lookupElementInfo - find a {Type|Enum|Cmd}Info object by name.
|
||||||
# If an object qualified by API name exists, use that.
|
# If an object qualified by API name exists, use that.
|
||||||
# fname - name of type / enum / command
|
# fname - name of type / enum / command
|
||||||
# dictionary - self.{type|enum|cmd}dict
|
# dictionary - self.{type|enum|cmd}dict
|
||||||
def lookupElementInfo(self, fname, dictionary):
|
def lookupElementInfo(self, fname, dictionary):
|
||||||
key = (fname, self.genOpts.apiname)
|
key = (fname, self.genOpts.apiname)
|
||||||
if (key in dictionary):
|
if key in dictionary:
|
||||||
# self.gen.logMsg('diag', 'Found API-specific element for feature', fname)
|
# self.gen.logMsg('diag', 'Found API-specific element for feature', fname)
|
||||||
return dictionary[key]
|
return dictionary[key]
|
||||||
elif (fname in dictionary):
|
if fname in dictionary:
|
||||||
# self.gen.logMsg('diag', 'Found generic element for feature', fname)
|
# self.gen.logMsg('diag', 'Found generic element for feature', fname)
|
||||||
return dictionary[fname]
|
return dictionary[fname]
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def breakOnName(self, regexp):
|
def breakOnName(self, regexp):
|
||||||
self.breakPat = re.compile(regexp)
|
self.breakPat = re.compile(regexp)
|
||||||
|
|
||||||
def parseTree(self):
|
def parseTree(self):
|
||||||
"""Parse the registry Element, once created"""
|
"""Parse the registry Element, once created"""
|
||||||
# This must be the Element for the root <registry>
|
# This must be the Element for the root <registry>
|
||||||
self.reg = self.tree.getroot()
|
self.reg = self.tree.getroot()
|
||||||
#
|
|
||||||
# Create dictionary of registry types from toplevel <types> tags
|
# Create dictionary of registry types from toplevel <types> tags
|
||||||
# and add 'name' attribute to each <type> tag (where missing)
|
# and add 'name' attribute to each <type> tag (where missing)
|
||||||
# based on its <name> element.
|
# based on its <name> element.
|
||||||
@ -306,13 +321,13 @@ class Registry:
|
|||||||
# There's usually one <types> block; more are OK
|
# There's usually one <types> block; more are OK
|
||||||
# Required <type> attributes: 'name' or nested <name> tag contents
|
# Required <type> attributes: 'name' or nested <name> tag contents
|
||||||
self.typedict = {}
|
self.typedict = {}
|
||||||
for type in self.reg.findall('types/type'):
|
for type_elem in self.reg.findall('types/type'):
|
||||||
# If the <type> doesn't already have a 'name' attribute, set
|
# If the <type> doesn't already have a 'name' attribute, set
|
||||||
# it from contents of its <name> tag.
|
# it from contents of its <name> tag.
|
||||||
if (type.get('name') == None):
|
if type_elem.get('name') is None:
|
||||||
type.attrib['name'] = type.find('name').text
|
type_elem.set('name', type_elem.find('name').text)
|
||||||
self.addElementInfo(type, TypeInfo(type), 'type', self.typedict)
|
self.addElementInfo(type_elem, TypeInfo(type_elem), 'type', self.typedict)
|
||||||
#
|
|
||||||
# Create dictionary of registry enum groups from <enums> tags.
|
# Create dictionary of registry enum groups from <enums> tags.
|
||||||
#
|
#
|
||||||
# Required <enums> attributes: 'name'. If no name is given, one is
|
# Required <enums> attributes: 'name'. If no name is given, one is
|
||||||
@ -321,7 +336,7 @@ class Registry:
|
|||||||
self.groupdict = {}
|
self.groupdict = {}
|
||||||
for group in self.reg.findall('enums'):
|
for group in self.reg.findall('enums'):
|
||||||
self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict)
|
self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict)
|
||||||
#
|
|
||||||
# Create dictionary of registry enums from <enum> tags
|
# Create dictionary of registry enums from <enum> tags
|
||||||
#
|
#
|
||||||
# <enums> tags usually define different namespaces for the values
|
# <enums> tags usually define different namespaces for the values
|
||||||
@ -333,14 +348,12 @@ class Registry:
|
|||||||
# a better scheme for tagging core and extension enums is created.
|
# a better scheme for tagging core and extension enums is created.
|
||||||
self.enumdict = {}
|
self.enumdict = {}
|
||||||
for enums in self.reg.findall('enums'):
|
for enums in self.reg.findall('enums'):
|
||||||
required = (enums.get('type') != None)
|
required = (enums.get('type') is not None)
|
||||||
for enum in enums.findall('enum'):
|
for enum in enums.findall('enum'):
|
||||||
enumInfo = EnumInfo(enum)
|
enumInfo = EnumInfo(enum)
|
||||||
enumInfo.required = required
|
enumInfo.required = required
|
||||||
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
|
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
|
||||||
# self.gen.logMsg('diag', 'parseTree: marked req =',
|
|
||||||
# required, 'for', enum.get('name'))
|
|
||||||
#
|
|
||||||
# Create dictionary of registry commands from <command> tags
|
# Create dictionary of registry commands from <command> tags
|
||||||
# and add 'name' attribute to each <command> tag (where missing)
|
# and add 'name' attribute to each <command> tag (where missing)
|
||||||
# based on its <proto><name> element.
|
# based on its <proto><name> element.
|
||||||
@ -356,13 +369,14 @@ class Registry:
|
|||||||
# If the <command> doesn't already have a 'name' attribute, set
|
# If the <command> doesn't already have a 'name' attribute, set
|
||||||
# it from contents of its <proto><name> tag.
|
# it from contents of its <proto><name> tag.
|
||||||
name = cmd.get('name')
|
name = cmd.get('name')
|
||||||
if name == None:
|
if name is None:
|
||||||
name = cmd.attrib['name'] = cmd.find('proto/name').text
|
name = cmd.set('name', cmd.find('proto/name').text)
|
||||||
ci = CmdInfo(cmd)
|
ci = CmdInfo(cmd)
|
||||||
self.addElementInfo(cmd, ci, 'command', self.cmddict)
|
self.addElementInfo(cmd, ci, 'command', self.cmddict)
|
||||||
alias = cmd.get('alias')
|
alias = cmd.get('alias')
|
||||||
if alias:
|
if alias:
|
||||||
cmdAlias.append([name, alias, cmd])
|
cmdAlias.append([name, alias, cmd])
|
||||||
|
|
||||||
# Now loop over aliases, injecting a copy of the aliased command's
|
# Now loop over aliases, injecting a copy of the aliased command's
|
||||||
# Element with the aliased prototype name replaced with the command
|
# Element with the aliased prototype name replaced with the command
|
||||||
# name - if it exists.
|
# name - if it exists.
|
||||||
@ -372,8 +386,8 @@ class Registry:
|
|||||||
aliasInfo = self.cmddict[alias]
|
aliasInfo = self.cmddict[alias]
|
||||||
cmdElem = copy.deepcopy(aliasInfo.elem)
|
cmdElem = copy.deepcopy(aliasInfo.elem)
|
||||||
cmdElem.find('proto/name').text = name
|
cmdElem.find('proto/name').text = name
|
||||||
cmdElem.attrib['name'] = name
|
cmdElem.set('name', name)
|
||||||
cmdElem.attrib['alias'] = alias
|
cmdElem.set('alias', alias)
|
||||||
ci = CmdInfo(cmdElem)
|
ci = CmdInfo(cmdElem)
|
||||||
# Replace the dictionary entry for the CmdInfo element
|
# Replace the dictionary entry for the CmdInfo element
|
||||||
self.cmddict[name] = ci
|
self.cmddict[name] = ci
|
||||||
@ -384,10 +398,8 @@ class Registry:
|
|||||||
self.gen.logMsg('warn', 'No matching <command> found for command',
|
self.gen.logMsg('warn', 'No matching <command> found for command',
|
||||||
cmd.get('name'), 'alias', alias)
|
cmd.get('name'), 'alias', alias)
|
||||||
|
|
||||||
#
|
|
||||||
# Create dictionaries of API and extension interfaces
|
# Create dictionaries of API and extension interfaces
|
||||||
# from toplevel <api> and <extension> tags.
|
# from toplevel <api> and <extension> tags.
|
||||||
#
|
|
||||||
self.apidict = {}
|
self.apidict = {}
|
||||||
for feature in self.reg.findall('feature'):
|
for feature in self.reg.findall('feature'):
|
||||||
featureInfo = FeatureInfo(feature)
|
featureInfo = FeatureInfo(feature)
|
||||||
@ -418,18 +430,17 @@ class Registry:
|
|||||||
# add an EnumInfo record to the dictionary. That works because
|
# add an EnumInfo record to the dictionary. That works because
|
||||||
# output generation of constants is purely dependency-based, and
|
# output generation of constants is purely dependency-based, and
|
||||||
# doesn't need to iterate through the XML tags.
|
# doesn't need to iterate through the XML tags.
|
||||||
#
|
|
||||||
for elem in feature.findall('require'):
|
for elem in feature.findall('require'):
|
||||||
for enum in elem.findall('enum'):
|
for enum in elem.findall('enum'):
|
||||||
addEnumInfo = False
|
addEnumInfo = False
|
||||||
groupName = enum.get('extends')
|
groupName = enum.get('extends')
|
||||||
if (groupName != None):
|
if groupName is not None:
|
||||||
# self.gen.logMsg('diag', 'Found extension enum',
|
# self.gen.logMsg('diag', 'Found extension enum',
|
||||||
# enum.get('name'))
|
# enum.get('name'))
|
||||||
# Add version number attribute to the <enum> element
|
# Add version number attribute to the <enum> element
|
||||||
enum.attrib['version'] = featureInfo.version
|
enum.set('version', featureInfo.version)
|
||||||
# Look up the GroupInfo with matching groupName
|
# Look up the GroupInfo with matching groupName
|
||||||
if (groupName in self.groupdict.keys()):
|
if groupName in self.groupdict:
|
||||||
# self.gen.logMsg('diag', 'Matching group',
|
# self.gen.logMsg('diag', 'Matching group',
|
||||||
# groupName, 'found, adding element...')
|
# groupName, 'found, adding element...')
|
||||||
gi = self.groupdict[groupName]
|
gi = self.groupdict[groupName]
|
||||||
@ -441,11 +452,11 @@ class Registry:
|
|||||||
self.gen.logMsg('warn', 'NO matching group',
|
self.gen.logMsg('warn', 'NO matching group',
|
||||||
groupName, 'for enum', enum.get('name'), 'found.')
|
groupName, 'for enum', enum.get('name'), 'found.')
|
||||||
addEnumInfo = True
|
addEnumInfo = True
|
||||||
elif (enum.get('value') or enum.get('bitpos') or enum.get('alias')):
|
elif enum.get('value') or enum.get('bitpos') or enum.get('alias'):
|
||||||
# self.gen.logMsg('diag', 'Adding extension constant "enum"',
|
# self.gen.logMsg('diag', 'Adding extension constant "enum"',
|
||||||
# enum.get('name'))
|
# enum.get('name'))
|
||||||
addEnumInfo = True
|
addEnumInfo = True
|
||||||
if (addEnumInfo):
|
if addEnumInfo:
|
||||||
enumInfo = EnumInfo(enum)
|
enumInfo = EnumInfo(enum)
|
||||||
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
|
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
|
||||||
|
|
||||||
@ -461,12 +472,11 @@ class Registry:
|
|||||||
#
|
#
|
||||||
# This code also adds a 'extnumber' attribute containing the
|
# This code also adds a 'extnumber' attribute containing the
|
||||||
# extension number, used for enumerant value calculation.
|
# extension number, used for enumerant value calculation.
|
||||||
#
|
|
||||||
for elem in feature.findall('require'):
|
for elem in feature.findall('require'):
|
||||||
for enum in elem.findall('enum'):
|
for enum in elem.findall('enum'):
|
||||||
addEnumInfo = False
|
addEnumInfo = False
|
||||||
groupName = enum.get('extends')
|
groupName = enum.get('extends')
|
||||||
if (groupName != None):
|
if groupName is not None:
|
||||||
# self.gen.logMsg('diag', 'Found extension enum',
|
# self.gen.logMsg('diag', 'Found extension enum',
|
||||||
# enum.get('name'))
|
# enum.get('name'))
|
||||||
|
|
||||||
@ -475,12 +485,12 @@ class Registry:
|
|||||||
# as when redefining an enum in another extension.
|
# as when redefining an enum in another extension.
|
||||||
extnumber = enum.get('extnumber')
|
extnumber = enum.get('extnumber')
|
||||||
if not extnumber:
|
if not extnumber:
|
||||||
enum.attrib['extnumber'] = featureInfo.number
|
enum.set('extnumber', featureInfo.number)
|
||||||
|
|
||||||
enum.attrib['extname'] = featureInfo.name
|
enum.set('extname', featureInfo.name)
|
||||||
enum.attrib['supported'] = featureInfo.supported
|
enum.set('supported', featureInfo.supported)
|
||||||
# Look up the GroupInfo with matching groupName
|
# Look up the GroupInfo with matching groupName
|
||||||
if (groupName in self.groupdict.keys()):
|
if groupName in self.groupdict:
|
||||||
# self.gen.logMsg('diag', 'Matching group',
|
# self.gen.logMsg('diag', 'Matching group',
|
||||||
# groupName, 'found, adding element...')
|
# groupName, 'found, adding element...')
|
||||||
gi = self.groupdict[groupName]
|
gi = self.groupdict[groupName]
|
||||||
@ -492,11 +502,11 @@ class Registry:
|
|||||||
self.gen.logMsg('warn', 'NO matching group',
|
self.gen.logMsg('warn', 'NO matching group',
|
||||||
groupName, 'for enum', enum.get('name'), 'found.')
|
groupName, 'for enum', enum.get('name'), 'found.')
|
||||||
addEnumInfo = True
|
addEnumInfo = True
|
||||||
elif (enum.get('value') or enum.get('bitpos') or enum.get('alias')):
|
elif enum.get('value') or enum.get('bitpos') or enum.get('alias'):
|
||||||
# self.gen.logMsg('diag', 'Adding extension constant "enum"',
|
# self.gen.logMsg('diag', 'Adding extension constant "enum"',
|
||||||
# enum.get('name'))
|
# enum.get('name'))
|
||||||
addEnumInfo = True
|
addEnumInfo = True
|
||||||
if (addEnumInfo):
|
if addEnumInfo:
|
||||||
enumInfo = EnumInfo(enum)
|
enumInfo = EnumInfo(enum)
|
||||||
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
|
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
|
||||||
|
|
||||||
@ -504,15 +514,15 @@ class Registry:
|
|||||||
# based on "structextends" tags in child structures
|
# based on "structextends" tags in child structures
|
||||||
disabled_types = []
|
disabled_types = []
|
||||||
for disabled_ext in self.reg.findall('extensions/extension[@supported="disabled"]'):
|
for disabled_ext in self.reg.findall('extensions/extension[@supported="disabled"]'):
|
||||||
for type in disabled_ext.findall("*/type"):
|
for type_elem in disabled_ext.findall("*/type"):
|
||||||
disabled_types.append(type.get('name'))
|
disabled_types.append(type_elem.get('name'))
|
||||||
for type in self.reg.findall('types/type'):
|
for type_elem in self.reg.findall('types/type'):
|
||||||
if type.get('name') not in disabled_types:
|
if type_elem.get('name') not in disabled_types:
|
||||||
parentStructs = type.get('structextends')
|
parentStructs = type_elem.get('structextends')
|
||||||
if (parentStructs != None):
|
if parentStructs is not None:
|
||||||
for parent in parentStructs.split(','):
|
for parent in parentStructs.split(','):
|
||||||
# self.gen.logMsg('diag', type.get('name'), 'extends', parent)
|
# self.gen.logMsg('diag', type.get('name'), 'extends', parent)
|
||||||
self.validextensionstructs[parent].append(type.get('name'))
|
self.validextensionstructs[parent].append(type_elem.get('name'))
|
||||||
# Sort the lists so they don't depend on the XML order
|
# Sort the lists so they don't depend on the XML order
|
||||||
for parent in self.validextensionstructs:
|
for parent in self.validextensionstructs:
|
||||||
self.validextensionstructs[parent].sort()
|
self.validextensionstructs[parent].sort()
|
||||||
@ -550,26 +560,26 @@ class Registry:
|
|||||||
# write(' ** Dumping XML ElementTree **', file=filehandle)
|
# write(' ** Dumping XML ElementTree **', file=filehandle)
|
||||||
# write('***************************************', file=filehandle)
|
# write('***************************************', file=filehandle)
|
||||||
# write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle)
|
# write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle)
|
||||||
#
|
|
||||||
# typename - name of type
|
# typename - name of type
|
||||||
# required - boolean (to tag features as required or not)
|
# required - boolean (to tag features as required or not)
|
||||||
def markTypeRequired(self, typename, required):
|
def markTypeRequired(self, typename, required):
|
||||||
"""Require (along with its dependencies) or remove (but not its dependencies) a type"""
|
"""Require (along with its dependencies) or remove (but not its dependencies) a type"""
|
||||||
self.gen.logMsg('diag', 'tagging type:', typename, '-> required =', required)
|
self.gen.logMsg('diag', 'tagging type:', typename, '-> required =', required)
|
||||||
# Get TypeInfo object for <type> tag corresponding to typename
|
# Get TypeInfo object for <type> tag corresponding to typename
|
||||||
type = self.lookupElementInfo(typename, self.typedict)
|
typeinfo = self.lookupElementInfo(typename, self.typedict)
|
||||||
if (type != None):
|
if typeinfo is not None:
|
||||||
if (required):
|
if required:
|
||||||
# Tag type dependencies in 'alias' and 'required' attributes as
|
# Tag type dependencies in 'alias' and 'required' attributes as
|
||||||
# required. This DOES NOT un-tag dependencies in a <remove>
|
# required. This DOES NOT un-tag dependencies in a <remove>
|
||||||
# tag. See comments in markRequired() below for the reason.
|
# tag. See comments in markRequired() below for the reason.
|
||||||
for attrib in [ 'requires', 'alias' ]:
|
for attrib_name in [ 'requires', 'alias' ]:
|
||||||
depname = type.elem.get(attrib)
|
depname = typeinfo.elem.get(attrib_name)
|
||||||
if depname:
|
if depname:
|
||||||
self.gen.logMsg('diag', 'Generating dependent type',
|
self.gen.logMsg('diag', 'Generating dependent type',
|
||||||
depname, 'for', attrib, 'type', typename)
|
depname, 'for', attrib_name, 'type', typename)
|
||||||
# Don't recurse on self-referential structures.
|
# Don't recurse on self-referential structures.
|
||||||
if (typename != depname):
|
if typename != depname:
|
||||||
self.markTypeRequired(depname, required)
|
self.markTypeRequired(depname, required)
|
||||||
else:
|
else:
|
||||||
self.gen.logMsg('diag', 'type', typename, 'is self-referential')
|
self.gen.logMsg('diag', 'type', typename, 'is self-referential')
|
||||||
@ -577,27 +587,39 @@ class Registry:
|
|||||||
# <type> tags)
|
# <type> tags)
|
||||||
# Look for <type> in entire <command> tree,
|
# Look for <type> in entire <command> tree,
|
||||||
# not just immediate children
|
# not just immediate children
|
||||||
for subtype in type.elem.findall('.//type'):
|
for subtype in typeinfo.elem.findall('.//type'):
|
||||||
self.gen.logMsg('diag', 'markRequired: type requires dependent <type>', subtype.text)
|
self.gen.logMsg('diag', 'markRequired: type requires dependent <type>', subtype.text)
|
||||||
if (typename != subtype.text):
|
if typename != subtype.text:
|
||||||
self.markTypeRequired(subtype.text, required)
|
self.markTypeRequired(subtype.text, required)
|
||||||
else:
|
else:
|
||||||
self.gen.logMsg('diag', 'type', typename, 'is self-referential')
|
self.gen.logMsg('diag', 'type', typename, 'is self-referential')
|
||||||
# Tag enums used in defining this type, for example in
|
# Tag enums used in defining this type, for example in
|
||||||
# <member><name>member</name>[<enum>MEMBER_SIZE</enum>]</member>
|
# <member><name>member</name>[<enum>MEMBER_SIZE</enum>]</member>
|
||||||
for subenum in type.elem.findall('.//enum'):
|
for subenum in typeinfo.elem.findall('.//enum'):
|
||||||
self.gen.logMsg('diag', 'markRequired: type requires dependent <enum>', subenum.text)
|
self.gen.logMsg('diag', 'markRequired: type requires dependent <enum>', subenum.text)
|
||||||
self.markEnumRequired(subenum.text, required)
|
self.markEnumRequired(subenum.text, required)
|
||||||
type.required = required
|
# Tag type dependency in 'bitvalues' attributes as
|
||||||
else:
|
# required. This ensures that the bit values for a flag
|
||||||
|
# are emitted
|
||||||
|
depType = typeinfo.elem.get('bitvalues')
|
||||||
|
if depType:
|
||||||
|
self.gen.logMsg('diag', 'Generating bitflag type',
|
||||||
|
depType, 'for type', typename)
|
||||||
|
self.markTypeRequired(depType, required)
|
||||||
|
group = self.lookupElementInfo(depType, self.groupdict)
|
||||||
|
if group is not None:
|
||||||
|
group.flagType = typeinfo
|
||||||
|
|
||||||
|
typeinfo.required = required
|
||||||
|
elif '.h' not in typename:
|
||||||
self.gen.logMsg('warn', 'type:', typename , 'IS NOT DEFINED')
|
self.gen.logMsg('warn', 'type:', typename , 'IS NOT DEFINED')
|
||||||
#
|
|
||||||
# enumname - name of enum
|
# enumname - name of enum
|
||||||
# required - boolean (to tag features as required or not)
|
# required - boolean (to tag features as required or not)
|
||||||
def markEnumRequired(self, enumname, required):
|
def markEnumRequired(self, enumname, required):
|
||||||
self.gen.logMsg('diag', 'tagging enum:', enumname, '-> required =', required)
|
self.gen.logMsg('diag', 'tagging enum:', enumname, '-> required =', required)
|
||||||
enum = self.lookupElementInfo(enumname, self.enumdict)
|
enum = self.lookupElementInfo(enumname, self.enumdict)
|
||||||
if (enum != None):
|
if enum is not None:
|
||||||
enum.required = required
|
enum.required = required
|
||||||
# Tag enum dependencies in 'alias' attribute as required
|
# Tag enum dependencies in 'alias' attribute as required
|
||||||
depname = enum.elem.get('alias')
|
depname = enum.elem.get('alias')
|
||||||
@ -607,13 +629,13 @@ class Registry:
|
|||||||
self.markEnumRequired(depname, required)
|
self.markEnumRequired(depname, required)
|
||||||
else:
|
else:
|
||||||
self.gen.logMsg('warn', 'enum:', enumname , 'IS NOT DEFINED')
|
self.gen.logMsg('warn', 'enum:', enumname , 'IS NOT DEFINED')
|
||||||
#
|
|
||||||
# cmdname - name of command
|
# cmdname - name of command
|
||||||
# required - boolean (to tag features as required or not)
|
# required - boolean (to tag features as required or not)
|
||||||
def markCmdRequired(self, cmdname, required):
|
def markCmdRequired(self, cmdname, required):
|
||||||
self.gen.logMsg('diag', 'tagging command:', cmdname, '-> required =', required)
|
self.gen.logMsg('diag', 'tagging command:', cmdname, '-> required =', required)
|
||||||
cmd = self.lookupElementInfo(cmdname, self.cmddict)
|
cmd = self.lookupElementInfo(cmdname, self.cmddict)
|
||||||
if (cmd != None):
|
if cmd is not None:
|
||||||
cmd.required = required
|
cmd.required = required
|
||||||
# Tag command dependencies in 'alias' attribute as required
|
# Tag command dependencies in 'alias' attribute as required
|
||||||
depname = cmd.elem.get('alias')
|
depname = cmd.elem.get('alias')
|
||||||
@ -626,67 +648,88 @@ class Registry:
|
|||||||
# tag, because many other commands may use the same type.
|
# tag, because many other commands may use the same type.
|
||||||
# We could be more clever and reference count types,
|
# We could be more clever and reference count types,
|
||||||
# instead of using a boolean.
|
# instead of using a boolean.
|
||||||
if (required):
|
if required:
|
||||||
# Look for <type> in entire <command> tree,
|
# Look for <type> in entire <command> tree,
|
||||||
# not just immediate children
|
# not just immediate children
|
||||||
for type in cmd.elem.findall('.//type'):
|
for type_elem in cmd.elem.findall('.//type'):
|
||||||
self.gen.logMsg('diag', 'markRequired: command implicitly requires dependent type', type.text)
|
self.gen.logMsg('diag', 'markRequired: command implicitly requires dependent type', type_elem.text)
|
||||||
self.markTypeRequired(type.text, required)
|
self.markTypeRequired(type_elem.text, required)
|
||||||
else:
|
else:
|
||||||
self.gen.logMsg('warn', 'command:', name, 'IS NOT DEFINED')
|
self.gen.logMsg('warn', 'command:', name, 'IS NOT DEFINED')
|
||||||
#
|
|
||||||
# features - Element for <require> or <remove> tag
|
# featurename - name of the feature
|
||||||
|
# feature - Element for <require> or <remove> tag
|
||||||
# required - boolean (to tag features as required or not)
|
# required - boolean (to tag features as required or not)
|
||||||
def markRequired(self, features, required):
|
def markRequired(self, featurename, feature, required):
|
||||||
"""Require or remove features specified in the Element"""
|
"""Require or remove features specified in the Element"""
|
||||||
self.gen.logMsg('diag', 'markRequired (features = <too long to print>, required =', required, ')')
|
self.gen.logMsg('diag', 'markRequired (feature = <too long to print>, required =', required, ')')
|
||||||
|
|
||||||
# Loop over types, enums, and commands in the tag
|
# Loop over types, enums, and commands in the tag
|
||||||
# @@ It would be possible to respect 'api' and 'profile' attributes
|
# @@ It would be possible to respect 'api' and 'profile' attributes
|
||||||
# in individual features, but that's not done yet.
|
# in individual features, but that's not done yet.
|
||||||
for typeElem in features.findall('type'):
|
for typeElem in feature.findall('type'):
|
||||||
self.markTypeRequired(typeElem.get('name'), required)
|
self.markTypeRequired(typeElem.get('name'), required)
|
||||||
for enumElem in features.findall('enum'):
|
for enumElem in feature.findall('enum'):
|
||||||
self.markEnumRequired(enumElem.get('name'), required)
|
self.markEnumRequired(enumElem.get('name'), required)
|
||||||
for cmdElem in features.findall('command'):
|
for cmdElem in feature.findall('command'):
|
||||||
self.markCmdRequired(cmdElem.get('name'), required)
|
self.markCmdRequired(cmdElem.get('name'), required)
|
||||||
#
|
|
||||||
|
# Extensions may need to extend existing commands or other items in the future.
|
||||||
|
# So, look for extend tags.
|
||||||
|
for extendElem in feature.findall('extend'):
|
||||||
|
extendType = extendElem.get('type')
|
||||||
|
if extendType == 'command':
|
||||||
|
commandName = extendElem.get('name')
|
||||||
|
successExtends = extendElem.get('successcodes')
|
||||||
|
if successExtends is not None:
|
||||||
|
for success in successExtends.split(','):
|
||||||
|
self.commandextensionsuccesses.append(self.commandextensiontuple(command=commandName,
|
||||||
|
value=success,
|
||||||
|
extension=featurename))
|
||||||
|
errorExtends = extendElem.get('errorcodes')
|
||||||
|
if errorExtends is not None:
|
||||||
|
for error in errorExtends.split(','):
|
||||||
|
self.commandextensionerrors.append(self.commandextensiontuple(command=commandName,
|
||||||
|
value=error,
|
||||||
|
extension=featurename))
|
||||||
|
else:
|
||||||
|
self.gen.logMsg('warn', 'extend type:', extendType, 'IS NOT SUPPORTED')
|
||||||
|
|
||||||
# interface - Element for <version> or <extension>, containing
|
# interface - Element for <version> or <extension>, containing
|
||||||
# <require> and <remove> tags
|
# <require> and <remove> tags
|
||||||
|
# featurename - name of the feature
|
||||||
# api - string specifying API name being generated
|
# api - string specifying API name being generated
|
||||||
# profile - string specifying API profile being generated
|
# profile - string specifying API profile being generated
|
||||||
def requireAndRemoveFeatures(self, interface, api, profile):
|
def requireAndRemoveFeatures(self, interface, featurename, api, profile):
|
||||||
"""Process <recquire> and <remove> tags for a <version> or <extension>"""
|
"""Process <require> and <remove> tags for a <version> or <extension>"""
|
||||||
# <require> marks things that are required by this version/profile
|
# <require> marks things that are required by this version/profile
|
||||||
for feature in interface.findall('require'):
|
for feature in interface.findall('require'):
|
||||||
if (matchAPIProfile(api, profile, feature)):
|
if matchAPIProfile(api, profile, feature):
|
||||||
self.markRequired(feature,True)
|
self.markRequired(featurename, feature, True)
|
||||||
# <remove> marks things that are removed by this version/profile
|
# <remove> marks things that are removed by this version/profile
|
||||||
for feature in interface.findall('remove'):
|
for feature in interface.findall('remove'):
|
||||||
if (matchAPIProfile(api, profile, feature)):
|
if matchAPIProfile(api, profile, feature):
|
||||||
self.markRequired(feature,False)
|
self.markRequired(featurename, feature, False)
|
||||||
|
|
||||||
def assignAdditionalValidity(self, interface, api, profile):
|
def assignAdditionalValidity(self, interface, api, profile):
|
||||||
#
|
|
||||||
# Loop over all usage inside all <require> tags.
|
# Loop over all usage inside all <require> tags.
|
||||||
for feature in interface.findall('require'):
|
for feature in interface.findall('require'):
|
||||||
if (matchAPIProfile(api, profile, feature)):
|
if matchAPIProfile(api, profile, feature):
|
||||||
for v in feature.findall('usage'):
|
for v in feature.findall('usage'):
|
||||||
if v.get('command'):
|
if v.get('command'):
|
||||||
self.cmddict[v.get('command')].additionalValidity.append(copy.deepcopy(v))
|
self.cmddict[v.get('command')].additionalValidity.append(copy.deepcopy(v))
|
||||||
if v.get('struct'):
|
if v.get('struct'):
|
||||||
self.typedict[v.get('struct')].additionalValidity.append(copy.deepcopy(v))
|
self.typedict[v.get('struct')].additionalValidity.append(copy.deepcopy(v))
|
||||||
|
|
||||||
#
|
|
||||||
# Loop over all usage inside all <remove> tags.
|
# Loop over all usage inside all <remove> tags.
|
||||||
for feature in interface.findall('remove'):
|
for feature in interface.findall('remove'):
|
||||||
if (matchAPIProfile(api, profile, feature)):
|
if matchAPIProfile(api, profile, feature):
|
||||||
for v in feature.findall('usage'):
|
for v in feature.findall('usage'):
|
||||||
if v.get('command'):
|
if v.get('command'):
|
||||||
self.cmddict[v.get('command')].removedValidity.append(copy.deepcopy(v))
|
self.cmddict[v.get('command')].removedValidity.append(copy.deepcopy(v))
|
||||||
if v.get('struct'):
|
if v.get('struct'):
|
||||||
self.typedict[v.get('struct')].removedValidity.append(copy.deepcopy(v))
|
self.typedict[v.get('struct')].removedValidity.append(copy.deepcopy(v))
|
||||||
|
|
||||||
#
|
|
||||||
# generateFeature - generate a single type / enum group / enum / command,
|
# generateFeature - generate a single type / enum group / enum / command,
|
||||||
# and all its dependencies as needed.
|
# and all its dependencies as needed.
|
||||||
# fname - name of feature (<type>/<enum>/<command>)
|
# fname - name of feature (<type>/<enum>/<command>)
|
||||||
@ -699,17 +742,17 @@ class Registry:
|
|||||||
|
|
||||||
self.gen.logMsg('diag', 'generateFeature: generating', ftype, fname)
|
self.gen.logMsg('diag', 'generateFeature: generating', ftype, fname)
|
||||||
f = self.lookupElementInfo(fname, dictionary)
|
f = self.lookupElementInfo(fname, dictionary)
|
||||||
if (f == None):
|
if f is None:
|
||||||
# No such feature. This is an error, but reported earlier
|
# No such feature. This is an error, but reported earlier
|
||||||
self.gen.logMsg('diag', 'No entry found for feature', fname,
|
self.gen.logMsg('diag', 'No entry found for feature', fname,
|
||||||
'returning!')
|
'returning!')
|
||||||
return
|
return
|
||||||
#
|
|
||||||
# If feature isn't required, or has already been declared, return
|
# If feature isn't required, or has already been declared, return
|
||||||
if (not f.required):
|
if not f.required:
|
||||||
self.gen.logMsg('diag', 'Skipping', ftype, fname, '(not required)')
|
self.gen.logMsg('diag', 'Skipping', ftype, fname, '(not required)')
|
||||||
return
|
return
|
||||||
if (f.declared):
|
if f.declared:
|
||||||
self.gen.logMsg('diag', 'Skipping', ftype, fname, '(already declared)')
|
self.gen.logMsg('diag', 'Skipping', ftype, fname, '(already declared)')
|
||||||
return
|
return
|
||||||
# Always mark feature declared, as though actually emitted
|
# Always mark feature declared, as though actually emitted
|
||||||
@ -720,23 +763,25 @@ class Registry:
|
|||||||
if alias:
|
if alias:
|
||||||
self.gen.logMsg('diag', fname, 'is an alias of', alias)
|
self.gen.logMsg('diag', fname, 'is an alias of', alias)
|
||||||
|
|
||||||
#
|
|
||||||
# Pull in dependent declaration(s) of the feature.
|
# Pull in dependent declaration(s) of the feature.
|
||||||
# For types, there may be one type in the 'required' attribute of
|
# For types, there may be one type in the 'requires' attribute of
|
||||||
# the element, one in the 'alias' attribute, and many in
|
# the element, one in the 'alias' attribute, and many in
|
||||||
# imbedded <type> and <enum> tags within the element.
|
# embedded <type> and <enum> tags within the element.
|
||||||
# For commands, there may be many in <type> tags within the element.
|
# For commands, there may be many in <type> tags within the element.
|
||||||
# For enums, no dependencies are allowed (though perhaps if you
|
# For enums, no dependencies are allowed (though perhaps if you
|
||||||
# have a uint64 enum, it should require that type).
|
# have a uint64 enum, it should require that type).
|
||||||
genProc = None
|
genProc = None
|
||||||
if (ftype == 'type'):
|
followupFeature = None
|
||||||
|
if ftype == 'type':
|
||||||
genProc = self.gen.genType
|
genProc = self.gen.genType
|
||||||
|
|
||||||
# Generate type dependencies in 'alias' and 'required' attributes
|
# Generate type dependencies in 'alias' and 'requires' attributes
|
||||||
if alias:
|
if alias:
|
||||||
self.generateFeature(alias, 'type', self.typedict)
|
self.generateFeature(alias, 'type', self.typedict)
|
||||||
requires = f.elem.get('requires')
|
requires = f.elem.get('requires')
|
||||||
if requires:
|
if requires:
|
||||||
|
self.gen.logMsg('diag', 'Generating required dependent type',
|
||||||
|
requires)
|
||||||
self.generateFeature(requires, 'type', self.typedict)
|
self.generateFeature(requires, 'type', self.typedict)
|
||||||
|
|
||||||
# Generate types used in defining this type (e.g. in nested
|
# Generate types used in defining this type (e.g. in nested
|
||||||
@ -757,10 +802,10 @@ class Registry:
|
|||||||
|
|
||||||
# If the type is an enum group, look up the corresponding
|
# If the type is an enum group, look up the corresponding
|
||||||
# group in the group dictionary and generate that instead.
|
# group in the group dictionary and generate that instead.
|
||||||
if (f.elem.get('category') == 'enum'):
|
if f.elem.get('category') == 'enum':
|
||||||
self.gen.logMsg('diag', 'Type', fname, 'is an enum group, so generate that instead')
|
self.gen.logMsg('diag', 'Type', fname, 'is an enum group, so generate that instead')
|
||||||
group = self.lookupElementInfo(fname, self.groupdict)
|
group = self.lookupElementInfo(fname, self.groupdict)
|
||||||
if alias != None:
|
if alias is not None:
|
||||||
# An alias of another group name.
|
# An alias of another group name.
|
||||||
# Pass to genGroup with 'alias' parameter = aliased name
|
# Pass to genGroup with 'alias' parameter = aliased name
|
||||||
self.gen.logMsg('diag', 'Generating alias', fname,
|
self.gen.logMsg('diag', 'Generating alias', fname,
|
||||||
@ -769,7 +814,7 @@ class Registry:
|
|||||||
# with an additional parameter which is the alias name.
|
# with an additional parameter which is the alias name.
|
||||||
genProc = self.gen.genGroup
|
genProc = self.gen.genGroup
|
||||||
f = self.lookupElementInfo(alias, self.groupdict)
|
f = self.lookupElementInfo(alias, self.groupdict)
|
||||||
elif group == None:
|
elif group is None:
|
||||||
self.gen.logMsg('warn', 'Skipping enum type', fname,
|
self.gen.logMsg('warn', 'Skipping enum type', fname,
|
||||||
': No matching enumerant group')
|
': No matching enumerant group')
|
||||||
return
|
return
|
||||||
@ -817,7 +862,7 @@ class Registry:
|
|||||||
self.gen.logMsg('diag', '* required =', required, 'for', name)
|
self.gen.logMsg('diag', '* required =', required, 'for', name)
|
||||||
if required:
|
if required:
|
||||||
# Mark this element as required (in the element, not the EnumInfo)
|
# Mark this element as required (in the element, not the EnumInfo)
|
||||||
elem.attrib['required'] = 'true'
|
elem.set('required', 'true')
|
||||||
# If it's an alias, track that for later use
|
# If it's an alias, track that for later use
|
||||||
enumAlias = elem.get('alias')
|
enumAlias = elem.get('alias')
|
||||||
if enumAlias:
|
if enumAlias:
|
||||||
@ -825,20 +870,22 @@ class Registry:
|
|||||||
for elem in enums:
|
for elem in enums:
|
||||||
name = elem.get('name')
|
name = elem.get('name')
|
||||||
if name in enumAliases:
|
if name in enumAliases:
|
||||||
elem.attrib['required'] = 'true'
|
elem.set('required', 'true')
|
||||||
self.gen.logMsg('diag', '* also need to require alias', name)
|
self.gen.logMsg('diag', '* also need to require alias', name)
|
||||||
elif (ftype == 'command'):
|
if f.elem.get('category') == 'bitmask':
|
||||||
|
followupFeature = f.elem.get( 'bitvalues' )
|
||||||
|
elif ftype == 'command':
|
||||||
# Generate command dependencies in 'alias' attribute
|
# Generate command dependencies in 'alias' attribute
|
||||||
if alias:
|
if alias:
|
||||||
self.generateFeature(alias, 'command', self.cmddict)
|
self.generateFeature(alias, 'command', self.cmddict)
|
||||||
|
|
||||||
genProc = self.gen.genCmd
|
genProc = self.gen.genCmd
|
||||||
for type in f.elem.findall('.//type'):
|
for type_elem in f.elem.findall('.//type'):
|
||||||
depname = type.text
|
depname = type_elem.text
|
||||||
self.gen.logMsg('diag', 'Generating required parameter type',
|
self.gen.logMsg('diag', 'Generating required parameter type',
|
||||||
depname)
|
depname)
|
||||||
self.generateFeature(depname, 'type', self.typedict)
|
self.generateFeature(depname, 'type', self.typedict)
|
||||||
elif (ftype == 'enum'):
|
elif ftype == 'enum':
|
||||||
# Generate enum dependencies in 'alias' attribute
|
# Generate enum dependencies in 'alias' attribute
|
||||||
if alias:
|
if alias:
|
||||||
self.generateFeature(alias, 'enum', self.enumdict)
|
self.generateFeature(alias, 'enum', self.enumdict)
|
||||||
@ -846,19 +893,23 @@ class Registry:
|
|||||||
|
|
||||||
# Actually generate the type only if emitting declarations
|
# Actually generate the type only if emitting declarations
|
||||||
if self.emitFeatures:
|
if self.emitFeatures:
|
||||||
self.gen.logMsg('diag', 'Emitting', ftype, fname, 'declaration')
|
self.gen.logMsg('diag', 'Emitting', ftype, 'decl for', fname)
|
||||||
genProc(f, fname, alias)
|
genProc(f, fname, alias)
|
||||||
else:
|
else:
|
||||||
self.gen.logMsg('diag', 'Skipping', ftype, fname,
|
self.gen.logMsg('diag', 'Skipping', ftype, fname,
|
||||||
'(should not be emitted)')
|
'(should not be emitted)')
|
||||||
#
|
|
||||||
|
if followupFeature :
|
||||||
|
self.gen.logMsg('diag', 'Generating required bitvalues <enum>',
|
||||||
|
followupFeature)
|
||||||
|
self.generateFeature(followupFeature, "type", self.typedict)
|
||||||
|
|
||||||
# generateRequiredInterface - generate all interfaces required
|
# generateRequiredInterface - generate all interfaces required
|
||||||
# by an API version or extension
|
# by an API version or extension
|
||||||
# interface - Element for <version> or <extension>
|
# interface - Element for <version> or <extension>
|
||||||
def generateRequiredInterface(self, interface):
|
def generateRequiredInterface(self, interface):
|
||||||
"""Generate required C interface for specified API version/extension"""
|
"""Generate required C interface for specified API version/extension"""
|
||||||
|
|
||||||
#
|
|
||||||
# Loop over all features inside all <require> tags.
|
# Loop over all features inside all <require> tags.
|
||||||
for features in interface.findall('require'):
|
for features in interface.findall('require'):
|
||||||
for t in features.findall('type'):
|
for t in features.findall('type'):
|
||||||
@ -868,30 +919,29 @@ class Registry:
|
|||||||
for c in features.findall('command'):
|
for c in features.findall('command'):
|
||||||
self.generateFeature(c.get('name'), 'command', self.cmddict)
|
self.generateFeature(c.get('name'), 'command', self.cmddict)
|
||||||
|
|
||||||
#
|
|
||||||
# apiGen(genOpts) - generate interface for specified versions
|
# apiGen(genOpts) - generate interface for specified versions
|
||||||
# genOpts - GeneratorOptions object with parameters used
|
# genOpts - GeneratorOptions object with parameters used
|
||||||
# by the Generator object.
|
# by the Generator object.
|
||||||
def apiGen(self, genOpts):
|
def apiGen(self, genOpts):
|
||||||
"""Generate interfaces for the specified API type and range of versions"""
|
"""Generate interfaces for the specified API type and range of versions"""
|
||||||
#
|
|
||||||
self.gen.logMsg('diag', '*******************************************')
|
self.gen.logMsg('diag', '*******************************************')
|
||||||
self.gen.logMsg('diag', ' Registry.apiGen file:', genOpts.filename,
|
self.gen.logMsg('diag', ' Registry.apiGen file:', genOpts.filename,
|
||||||
'api:', genOpts.apiname,
|
'api:', genOpts.apiname,
|
||||||
'profile:', genOpts.profile)
|
'profile:', genOpts.profile)
|
||||||
self.gen.logMsg('diag', '*******************************************')
|
self.gen.logMsg('diag', '*******************************************')
|
||||||
#
|
|
||||||
self.genOpts = genOpts
|
self.genOpts = genOpts
|
||||||
# Reset required/declared flags for all features
|
# Reset required/declared flags for all features
|
||||||
self.apiReset()
|
self.apiReset()
|
||||||
#
|
|
||||||
# Compile regexps used to select versions & extensions
|
# Compile regexps used to select versions & extensions
|
||||||
regVersions = re.compile(self.genOpts.versions)
|
regVersions = re.compile(self.genOpts.versions)
|
||||||
regEmitVersions = re.compile(self.genOpts.emitversions)
|
regEmitVersions = re.compile(self.genOpts.emitversions)
|
||||||
regAddExtensions = re.compile(self.genOpts.addExtensions)
|
regAddExtensions = re.compile(self.genOpts.addExtensions)
|
||||||
regRemoveExtensions = re.compile(self.genOpts.removeExtensions)
|
regRemoveExtensions = re.compile(self.genOpts.removeExtensions)
|
||||||
regEmitExtensions = re.compile(self.genOpts.emitExtensions)
|
regEmitExtensions = re.compile(self.genOpts.emitExtensions)
|
||||||
#
|
|
||||||
# Get all matching API feature names & add to list of FeatureInfo
|
# Get all matching API feature names & add to list of FeatureInfo
|
||||||
# Note we used to select on feature version attributes, not names.
|
# Note we used to select on feature version attributes, not names.
|
||||||
features = []
|
features = []
|
||||||
@ -899,15 +949,15 @@ class Registry:
|
|||||||
for key in self.apidict:
|
for key in self.apidict:
|
||||||
fi = self.apidict[key]
|
fi = self.apidict[key]
|
||||||
api = fi.elem.get('api')
|
api = fi.elem.get('api')
|
||||||
if (api == self.genOpts.apiname):
|
if api == self.genOpts.apiname:
|
||||||
apiMatch = True
|
apiMatch = True
|
||||||
if (regVersions.match(fi.name)):
|
if regVersions.match(fi.name):
|
||||||
# Matches API & version #s being generated. Mark for
|
# Matches API & version #s being generated. Mark for
|
||||||
# emission and add to the features[] list .
|
# emission and add to the features[] list .
|
||||||
# @@ Could use 'declared' instead of 'emit'?
|
# @@ Could use 'declared' instead of 'emit'?
|
||||||
fi.emit = (regEmitVersions.match(fi.name) != None)
|
fi.emit = (regEmitVersions.match(fi.name) is not None)
|
||||||
features.append(fi)
|
features.append(fi)
|
||||||
if (not fi.emit):
|
if not fi.emit:
|
||||||
self.gen.logMsg('diag', 'NOT tagging feature api =', api,
|
self.gen.logMsg('diag', 'NOT tagging feature api =', api,
|
||||||
'name =', fi.name, 'version =', fi.version,
|
'name =', fi.name, 'version =', fi.version,
|
||||||
'for emission (does not match emitversions pattern)')
|
'for emission (does not match emitversions pattern)')
|
||||||
@ -923,9 +973,9 @@ class Registry:
|
|||||||
self.gen.logMsg('diag', 'NOT including feature api =', api,
|
self.gen.logMsg('diag', 'NOT including feature api =', api,
|
||||||
'name =', fi.name,
|
'name =', fi.name,
|
||||||
'(does not match requested API)')
|
'(does not match requested API)')
|
||||||
if (not apiMatch):
|
if not apiMatch:
|
||||||
self.gen.logMsg('warn', 'No matching API versions found!')
|
self.gen.logMsg('warn', 'No matching API versions found!')
|
||||||
#
|
|
||||||
# Get all matching extensions, in order by their extension number,
|
# Get all matching extensions, in order by their extension number,
|
||||||
# and add to the list of features.
|
# and add to the list of features.
|
||||||
# Start with extensions tagged with 'api' pattern matching the API
|
# Start with extensions tagged with 'api' pattern matching the API
|
||||||
@ -935,7 +985,7 @@ class Registry:
|
|||||||
for (extName,ei) in sorted(self.extdict.items(),key = lambda x : x[1].number):
|
for (extName,ei) in sorted(self.extdict.items(),key = lambda x : x[1].number):
|
||||||
extName = ei.name
|
extName = ei.name
|
||||||
include = False
|
include = False
|
||||||
#
|
|
||||||
# Include extension if defaultExtensions is not None and if the
|
# Include extension if defaultExtensions is not None and if the
|
||||||
# 'supported' attribute matches defaultExtensions. The regexp in
|
# 'supported' attribute matches defaultExtensions. The regexp in
|
||||||
# 'supported' must exactly match defaultExtensions, so bracket
|
# 'supported' must exactly match defaultExtensions, so bracket
|
||||||
@ -946,12 +996,12 @@ class Registry:
|
|||||||
self.gen.logMsg('diag', 'Including extension',
|
self.gen.logMsg('diag', 'Including extension',
|
||||||
extName, "(defaultExtensions matches the 'supported' attribute)")
|
extName, "(defaultExtensions matches the 'supported' attribute)")
|
||||||
include = True
|
include = True
|
||||||
#
|
|
||||||
# Include additional extensions if the extension name matches
|
# Include additional extensions if the extension name matches
|
||||||
# the regexp specified in the generator options. This allows
|
# the regexp specified in the generator options. This allows
|
||||||
# forcing extensions into an interface even if they're not
|
# forcing extensions into an interface even if they're not
|
||||||
# tagged appropriately in the registry.
|
# tagged appropriately in the registry.
|
||||||
if (regAddExtensions.match(extName) != None):
|
if regAddExtensions.match(extName) is not None:
|
||||||
self.gen.logMsg('diag', 'Including extension',
|
self.gen.logMsg('diag', 'Including extension',
|
||||||
extName, '(matches explicitly requested extensions to add)')
|
extName, '(matches explicitly requested extensions to add)')
|
||||||
include = True
|
include = True
|
||||||
@ -959,20 +1009,21 @@ class Registry:
|
|||||||
# in generator options. This allows forcing removal of
|
# in generator options. This allows forcing removal of
|
||||||
# extensions from an interface even if they're tagged that
|
# extensions from an interface even if they're tagged that
|
||||||
# way in the registry.
|
# way in the registry.
|
||||||
if (regRemoveExtensions.match(extName) != None):
|
if regRemoveExtensions.match(extName) is not None:
|
||||||
self.gen.logMsg('diag', 'Removing extension',
|
self.gen.logMsg('diag', 'Removing extension',
|
||||||
extName, '(matches explicitly requested extensions to remove)')
|
extName, '(matches explicitly requested extensions to remove)')
|
||||||
include = False
|
include = False
|
||||||
#
|
|
||||||
# If the extension is to be included, add it to the
|
# If the extension is to be included, add it to the
|
||||||
# extension features list.
|
# extension features list.
|
||||||
if (include):
|
if include:
|
||||||
ei.emit = (regEmitExtensions.match(extName) != None)
|
ei.emit = (regEmitExtensions.match(extName) is not None)
|
||||||
features.append(ei)
|
features.append(ei)
|
||||||
if (not ei.emit):
|
if not ei.emit:
|
||||||
self.gen.logMsg('diag', 'NOT tagging extension',
|
self.gen.logMsg('diag', 'NOT tagging extension',
|
||||||
extName,
|
extName,
|
||||||
'for emission (does not match emitextensions pattern)')
|
'for emission (does not match emitextensions pattern)')
|
||||||
|
|
||||||
# Hack - can be removed when validity generator goes away
|
# Hack - can be removed when validity generator goes away
|
||||||
# (Jon) I'm not sure what this does, or if it should respect
|
# (Jon) I'm not sure what this does, or if it should respect
|
||||||
# the ei.emit flag above.
|
# the ei.emit flag above.
|
||||||
@ -980,11 +1031,11 @@ class Registry:
|
|||||||
else:
|
else:
|
||||||
self.gen.logMsg('diag', 'NOT including extension',
|
self.gen.logMsg('diag', 'NOT including extension',
|
||||||
extName, '(does not match api attribute or explicitly requested extensions)')
|
extName, '(does not match api attribute or explicitly requested extensions)')
|
||||||
#
|
|
||||||
# Sort the extension features list, if a sort procedure is defined
|
# Sort the extension features list, if a sort procedure is defined
|
||||||
if (self.genOpts.sortProcedure):
|
if self.genOpts.sortProcedure:
|
||||||
self.genOpts.sortProcedure(features)
|
self.genOpts.sortProcedure(features)
|
||||||
#
|
|
||||||
# Pass 1: loop over requested API versions and extensions tagging
|
# Pass 1: loop over requested API versions and extensions tagging
|
||||||
# types/commands/features as required (in an <require> block) or no
|
# types/commands/features as required (in an <require> block) or no
|
||||||
# longer required (in an <remove> block). It is possible to remove
|
# longer required (in an <remove> block). It is possible to remove
|
||||||
@ -993,23 +1044,23 @@ class Registry:
|
|||||||
# If a profile other than 'None' is being generated, it must
|
# If a profile other than 'None' is being generated, it must
|
||||||
# match the profile attribute (if any) of the <require> and
|
# match the profile attribute (if any) of the <require> and
|
||||||
# <remove> tags.
|
# <remove> tags.
|
||||||
self.gen.logMsg('diag', '*******PASS 1: TAG FEATURES **********')
|
self.gen.logMsg('diag', 'PASS 1: TAG FEATURES')
|
||||||
for f in features:
|
for f in features:
|
||||||
self.gen.logMsg('diag', 'PASS 1: Tagging required and removed features for',
|
self.gen.logMsg('diag', 'PASS 1: Tagging required and removed features for',
|
||||||
f.name)
|
f.name)
|
||||||
self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile)
|
self.requireAndRemoveFeatures(f.elem, f.name, self.genOpts.apiname, self.genOpts.profile)
|
||||||
self.assignAdditionalValidity(f.elem, self.genOpts.apiname, self.genOpts.profile)
|
self.assignAdditionalValidity(f.elem, self.genOpts.apiname, self.genOpts.profile)
|
||||||
#
|
|
||||||
# Pass 2: loop over specified API versions and extensions printing
|
# Pass 2: loop over specified API versions and extensions printing
|
||||||
# declarations for required things which haven't already been
|
# declarations for required things which haven't already been
|
||||||
# generated.
|
# generated.
|
||||||
self.gen.logMsg('diag', '*******PASS 2: GENERATE INTERFACES FOR FEATURES **********')
|
self.gen.logMsg('diag', 'PASS 2: GENERATE INTERFACES FOR FEATURES')
|
||||||
self.gen.beginFile(self.genOpts)
|
self.gen.beginFile(self.genOpts)
|
||||||
for f in features:
|
for f in features:
|
||||||
self.gen.logMsg('diag', 'PASS 2: Generating interface for',
|
self.gen.logMsg('diag', 'PASS 2: Generating interface for',
|
||||||
f.name)
|
f.name)
|
||||||
emit = self.emitFeatures = f.emit
|
emit = self.emitFeatures = f.emit
|
||||||
if (not emit):
|
if not emit:
|
||||||
self.gen.logMsg('diag', 'PASS 2: NOT declaring feature',
|
self.gen.logMsg('diag', 'PASS 2: NOT declaring feature',
|
||||||
f.elem.get('name'), 'because it is not tagged for emission')
|
f.elem.get('name'), 'because it is not tagged for emission')
|
||||||
# Generate the interface (or just tag its elements as having been
|
# Generate the interface (or just tag its elements as having been
|
||||||
@ -1018,54 +1069,51 @@ class Registry:
|
|||||||
self.generateRequiredInterface(f.elem)
|
self.generateRequiredInterface(f.elem)
|
||||||
self.gen.endFeature()
|
self.gen.endFeature()
|
||||||
self.gen.endFile()
|
self.gen.endFile()
|
||||||
#
|
|
||||||
# apiReset - use between apiGen() calls to reset internal state
|
# apiReset - use between apiGen() calls to reset internal state
|
||||||
#
|
|
||||||
def apiReset(self):
|
def apiReset(self):
|
||||||
"""Reset type/enum/command dictionaries before generating another API"""
|
"""Reset type/enum/command dictionaries before generating another API"""
|
||||||
for type in self.typedict:
|
for datatype in self.typedict:
|
||||||
self.typedict[type].resetState()
|
self.typedict[datatype].resetState()
|
||||||
for enum in self.enumdict:
|
for enum in self.enumdict:
|
||||||
self.enumdict[enum].resetState()
|
self.enumdict[enum].resetState()
|
||||||
for cmd in self.cmddict:
|
for cmd in self.cmddict:
|
||||||
self.cmddict[cmd].resetState()
|
self.cmddict[cmd].resetState()
|
||||||
for cmd in self.apidict:
|
for cmd in self.apidict:
|
||||||
self.apidict[cmd].resetState()
|
self.apidict[cmd].resetState()
|
||||||
#
|
|
||||||
# validateGroups - check that group= attributes match actual groups
|
# validateGroups - check that group= attributes match actual groups
|
||||||
#
|
|
||||||
def validateGroups(self):
|
def validateGroups(self):
|
||||||
"""Validate group= attributes on <param> and <proto> tags"""
|
"""Validate group= attributes on <param> and <proto> tags"""
|
||||||
# Keep track of group names not in <group> tags
|
# Keep track of group names not in <group> tags
|
||||||
badGroup = {}
|
badGroup = {}
|
||||||
self.gen.logMsg('diag', 'VALIDATING GROUP ATTRIBUTES ***')
|
self.gen.logMsg('diag', 'VALIDATING GROUP ATTRIBUTES')
|
||||||
for cmd in self.reg.findall('commands/command'):
|
for cmd in self.reg.findall('commands/command'):
|
||||||
proto = cmd.find('proto')
|
proto = cmd.find('proto')
|
||||||
funcname = cmd.find('proto/name').text
|
# funcname = cmd.find('proto/name').text
|
||||||
if ('group' in proto.attrib.keys()):
|
|
||||||
group = proto.get('group')
|
group = proto.get('group')
|
||||||
# self.gen.logMsg('diag', 'Command ', funcname, ' has return group ', group)
|
if group is not None and group not in self.groupdict:
|
||||||
if (group not in self.groupdict.keys()):
|
# self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group)
|
||||||
# self.gen.logMsg('diag', 'Command ', funcname, ' has UNKNOWN return group ', group)
|
if group not in badGroup:
|
||||||
if (group not in badGroup.keys()):
|
|
||||||
badGroup[group] = 1
|
badGroup[group] = 1
|
||||||
else:
|
else:
|
||||||
badGroup[group] = badGroup[group] + 1
|
badGroup[group] = badGroup[group] + 1
|
||||||
|
|
||||||
for param in cmd.findall('param'):
|
for param in cmd.findall('param'):
|
||||||
pname = param.find('name')
|
pname = param.find('name')
|
||||||
if (pname != None):
|
if pname is not None:
|
||||||
pname = pname.text
|
pname = pname.text
|
||||||
else:
|
else:
|
||||||
pname = type.get('name')
|
pname = param.get('name')
|
||||||
if ('group' in param.attrib.keys()):
|
|
||||||
group = param.get('group')
|
group = param.get('group')
|
||||||
if (group not in self.groupdict.keys()):
|
if group is not None and group not in self.groupdict:
|
||||||
# self.gen.logMsg('diag', 'Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group)
|
# self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group)
|
||||||
if (group not in badGroup.keys()):
|
if group not in badGroup:
|
||||||
badGroup[group] = 1
|
badGroup[group] = 1
|
||||||
else:
|
else:
|
||||||
badGroup[group] = badGroup[group] + 1
|
badGroup[group] = badGroup[group] + 1
|
||||||
if (len(badGroup.keys()) > 0):
|
|
||||||
self.gen.logMsg('diag', 'SUMMARY OF UNRECOGNIZED GROUPS ***')
|
if badGroup:
|
||||||
|
self.gen.logMsg('diag', 'SUMMARY OF UNRECOGNIZED GROUPS')
|
||||||
for key in sorted(badGroup.keys()):
|
for key in sorted(badGroup.keys()):
|
||||||
self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times')
|
self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times')
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"version info": {
|
"version info": {
|
||||||
"schema version": 2,
|
"schema version": 2,
|
||||||
"api version": "1.1.103",
|
"api version": "1.1.105",
|
||||||
"comment": "from git branch: github-master commit: 4ad4fd17161efd9bfd1125c0c9d17db6fb276216",
|
"comment": "from git branch: github-master commit: 1f1a557801f170971868735dcbf8484a684abba7",
|
||||||
"date": "2019-03-11 09:10:44Z"
|
"date": "2019-03-19 09:15:00Z"
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
"vkGetInstanceProcAddr": {
|
"vkGetInstanceProcAddr": {
|
||||||
@ -362,7 +362,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkDeviceCreateInfo-pNext-pNext",
|
"vuid": "VUID-VkDeviceCreateInfo-pNext-pNext",
|
||||||
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupDeviceCreateInfo\">VkDeviceGroupDeviceCreateInfo</a>, <a href=\"#VkDeviceMemoryOverallocationCreateInfoAMD\">VkDeviceMemoryOverallocationCreateInfoAMD</a>, <a href=\"#VkPhysicalDevice16BitStorageFeatures\">VkPhysicalDevice16BitStorageFeatures</a>, <a href=\"#VkPhysicalDevice8BitStorageFeaturesKHR\">VkPhysicalDevice8BitStorageFeaturesKHR</a>, <a href=\"#VkPhysicalDeviceASTCDecodeFeaturesEXT\">VkPhysicalDeviceASTCDecodeFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT\">VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceBufferAddressFeaturesEXT\">VkPhysicalDeviceBufferAddressFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceComputeShaderDerivativesFeaturesNV\">VkPhysicalDeviceComputeShaderDerivativesFeaturesNV</a>, <a href=\"#VkPhysicalDeviceConditionalRenderingFeaturesEXT\">VkPhysicalDeviceConditionalRenderingFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceCooperativeMatrixFeaturesNV\">VkPhysicalDeviceCooperativeMatrixFeaturesNV</a>, <a href=\"#VkPhysicalDeviceCornerSampledImageFeaturesNV\">VkPhysicalDeviceCornerSampledImageFeaturesNV</a>, <a href=\"#VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV\">VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV</a>, <a href=\"#VkPhysicalDeviceDepthClipEnableFeaturesEXT\">VkPhysicalDeviceDepthClipEnableFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceDescriptorIndexingFeaturesEXT\">VkPhysicalDeviceDescriptorIndexingFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceExclusiveScissorFeaturesNV\">VkPhysicalDeviceExclusiveScissorFeaturesNV</a>, <a href=\"#VkPhysicalDeviceFeatures2\">VkPhysicalDeviceFeatures2</a>, <a href=\"#VkPhysicalDeviceFloat16Int8FeaturesKHR\">VkPhysicalDeviceFloat16Int8FeaturesKHR</a>, <a href=\"#VkPhysicalDeviceFragmentDensityMapFeaturesEXT\">VkPhysicalDeviceFragmentDensityMapFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV\">VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV</a>, <a href=\"#VkPhysicalDeviceInlineUniformBlockFeaturesEXT\">VkPhysicalDeviceInlineUniformBlockFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceMemoryPriorityFeaturesEXT\">VkPhysicalDeviceMemoryPriorityFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceMeshShaderFeaturesNV\">VkPhysicalDeviceMeshShaderFeaturesNV</a>, <a href=\"#VkPhysicalDeviceMultiviewFeatures\">VkPhysicalDeviceMultiviewFeatures</a>, <a href=\"#VkPhysicalDeviceProtectedMemoryFeatures\">VkPhysicalDeviceProtectedMemoryFeatures</a>, <a href=\"#VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV\">VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV</a>, <a href=\"#VkPhysicalDeviceSamplerYcbcrConversionFeatures\">VkPhysicalDeviceSamplerYcbcrConversionFeatures</a>, <a href=\"#VkPhysicalDeviceScalarBlockLayoutFeaturesEXT\">VkPhysicalDeviceScalarBlockLayoutFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceShaderAtomicInt64FeaturesKHR\">VkPhysicalDeviceShaderAtomicInt64FeaturesKHR</a>, <a href=\"#VkPhysicalDeviceShaderDrawParameterFeatures\">VkPhysicalDeviceShaderDrawParameterFeatures</a>, <a href=\"#VkPhysicalDeviceShaderImageFootprintFeaturesNV\">VkPhysicalDeviceShaderImageFootprintFeaturesNV</a>, <a href=\"#VkPhysicalDeviceShadingRateImageFeaturesNV\">VkPhysicalDeviceShadingRateImageFeaturesNV</a>, <a href=\"#VkPhysicalDeviceTransformFeedbackFeaturesEXT\">VkPhysicalDeviceTransformFeedbackFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceVariablePointerFeatures\">VkPhysicalDeviceVariablePointerFeatures</a>, <a href=\"#VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT\">VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceVulkanMemoryModelFeaturesKHR\">VkPhysicalDeviceVulkanMemoryModelFeaturesKHR</a>, or <a href=\"#VkPhysicalDeviceYcbcrImageArraysFeaturesEXT\">VkPhysicalDeviceYcbcrImageArraysFeaturesEXT</a>"
|
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupDeviceCreateInfo\">VkDeviceGroupDeviceCreateInfo</a>, <a href=\"#VkDeviceMemoryOverallocationCreateInfoAMD\">VkDeviceMemoryOverallocationCreateInfoAMD</a>, <a href=\"#VkPhysicalDevice16BitStorageFeatures\">VkPhysicalDevice16BitStorageFeatures</a>, <a href=\"#VkPhysicalDevice8BitStorageFeaturesKHR\">VkPhysicalDevice8BitStorageFeaturesKHR</a>, <a href=\"#VkPhysicalDeviceASTCDecodeFeaturesEXT\">VkPhysicalDeviceASTCDecodeFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT\">VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceBufferAddressFeaturesEXT\">VkPhysicalDeviceBufferAddressFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceComputeShaderDerivativesFeaturesNV\">VkPhysicalDeviceComputeShaderDerivativesFeaturesNV</a>, <a href=\"#VkPhysicalDeviceConditionalRenderingFeaturesEXT\">VkPhysicalDeviceConditionalRenderingFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceCooperativeMatrixFeaturesNV\">VkPhysicalDeviceCooperativeMatrixFeaturesNV</a>, <a href=\"#VkPhysicalDeviceCornerSampledImageFeaturesNV\">VkPhysicalDeviceCornerSampledImageFeaturesNV</a>, <a href=\"#VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV\">VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV</a>, <a href=\"#VkPhysicalDeviceDepthClipEnableFeaturesEXT\">VkPhysicalDeviceDepthClipEnableFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceDescriptorIndexingFeaturesEXT\">VkPhysicalDeviceDescriptorIndexingFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceExclusiveScissorFeaturesNV\">VkPhysicalDeviceExclusiveScissorFeaturesNV</a>, <a href=\"#VkPhysicalDeviceFeatures2\">VkPhysicalDeviceFeatures2</a>, <a href=\"#VkPhysicalDeviceFloat16Int8FeaturesKHR\">VkPhysicalDeviceFloat16Int8FeaturesKHR</a>, <a href=\"#VkPhysicalDeviceFragmentDensityMapFeaturesEXT\">VkPhysicalDeviceFragmentDensityMapFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV\">VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV</a>, <a href=\"#VkPhysicalDeviceHostQueryResetFeaturesEXT\">VkPhysicalDeviceHostQueryResetFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceInlineUniformBlockFeaturesEXT\">VkPhysicalDeviceInlineUniformBlockFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceMemoryPriorityFeaturesEXT\">VkPhysicalDeviceMemoryPriorityFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceMeshShaderFeaturesNV\">VkPhysicalDeviceMeshShaderFeaturesNV</a>, <a href=\"#VkPhysicalDeviceMultiviewFeatures\">VkPhysicalDeviceMultiviewFeatures</a>, <a href=\"#VkPhysicalDeviceProtectedMemoryFeatures\">VkPhysicalDeviceProtectedMemoryFeatures</a>, <a href=\"#VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV\">VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV</a>, <a href=\"#VkPhysicalDeviceSamplerYcbcrConversionFeatures\">VkPhysicalDeviceSamplerYcbcrConversionFeatures</a>, <a href=\"#VkPhysicalDeviceScalarBlockLayoutFeaturesEXT\">VkPhysicalDeviceScalarBlockLayoutFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceShaderAtomicInt64FeaturesKHR\">VkPhysicalDeviceShaderAtomicInt64FeaturesKHR</a>, <a href=\"#VkPhysicalDeviceShaderDrawParameterFeatures\">VkPhysicalDeviceShaderDrawParameterFeatures</a>, <a href=\"#VkPhysicalDeviceShaderImageFootprintFeaturesNV\">VkPhysicalDeviceShaderImageFootprintFeaturesNV</a>, <a href=\"#VkPhysicalDeviceShadingRateImageFeaturesNV\">VkPhysicalDeviceShadingRateImageFeaturesNV</a>, <a href=\"#VkPhysicalDeviceTransformFeedbackFeaturesEXT\">VkPhysicalDeviceTransformFeedbackFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceVariablePointerFeatures\">VkPhysicalDeviceVariablePointerFeatures</a>, <a href=\"#VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT\">VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceVulkanMemoryModelFeaturesKHR\">VkPhysicalDeviceVulkanMemoryModelFeaturesKHR</a>, or <a href=\"#VkPhysicalDeviceYcbcrImageArraysFeaturesEXT\">VkPhysicalDeviceYcbcrImageArraysFeaturesEXT</a>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkDeviceCreateInfo-sType-unique",
|
"vuid": "VUID-VkDeviceCreateInfo-sType-unique",
|
||||||
@ -982,7 +982,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkQueueSubmit-pSubmits-02207",
|
"vuid": "VUID-vkQueueSubmit-pSubmits-02207",
|
||||||
"text": " If any element of <code>pSubmits</code>→<code>pCommandBuffers</code> includes a <a href=\"#synchronization-queue-transfers-acquire\">Queue Family Transfer Acquire Operation</a>, there <strong class=\"purple\">must</strong> exist a previously submitted <a href=\"#synchronization-queue-transfers-release\">Queue Family Transfer Release Operation</a> on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such <a href=\"#synchronization-queue-transfers-acquire\">acquire operations</a>, and which happens before the acquire operation."
|
"text": " If any element of <code>pSubmits</code>-><code>pCommandBuffers</code> includes a <a href=\"#synchronization-queue-transfers-acquire\">Queue Family Transfer Acquire Operation</a>, there <strong class=\"purple\">must</strong> exist a previously submitted <a href=\"#synchronization-queue-transfers-release\">Queue Family Transfer Release Operation</a> on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such <a href=\"#synchronization-queue-transfers-acquire\">acquire operations</a>, and which happens before the acquire operation."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkQueueSubmit-queue-parameter",
|
"vuid": "VUID-vkQueueSubmit-queue-parameter",
|
||||||
@ -3122,7 +3122,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkRenderPassCreateInfo-pNext-02512",
|
"vuid": "VUID-VkRenderPassCreateInfo-pNext-02512",
|
||||||
"text": " If the <code>pNext</code> chain includes an instance of <a href=\"#VkRenderPassMultiviewCreateInfo\">VkRenderPassMultiviewCreateInfo</a>, for any element of <code>pDependencies</code> with a <code>dependencyFlags</code> member that doesn’t include <code>VK_DEPENDENCY_VIEW_LOCAL_BIT</code>, the corresponding element of the <code>pViewOffsets</code> member of that <a href=\"#VkRenderPassMultiviewCreateInfo\">VkRenderPassMultiviewCreateInfo</a> instance <strong class=\"purple\">must</strong> be <code>0</code>"
|
"text": " If the <code>pNext</code> chain includes an instance of <a href=\"#VkRenderPassMultiviewCreateInfo\">VkRenderPassMultiviewCreateInfo</a>, for any element of <code>pDependencies</code> with a <code>dependencyFlags</code> member that does not include <code>VK_DEPENDENCY_VIEW_LOCAL_BIT</code>, the corresponding element of the <code>pViewOffsets</code> member of that <a href=\"#VkRenderPassMultiviewCreateInfo\">VkRenderPassMultiviewCreateInfo</a> instance <strong class=\"purple\">must</strong> be <code>0</code>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkRenderPassCreateInfo-pNext-02513",
|
"vuid": "VUID-VkRenderPassCreateInfo-pNext-02513",
|
||||||
@ -3276,7 +3276,7 @@
|
|||||||
"(VK_VERSION_1_1,VK_KHR_maintenance2)+(VK_EXT_image_drm_format_modifier)": [
|
"(VK_VERSION_1_1,VK_KHR_maintenance2)+(VK_EXT_image_drm_format_modifier)": [
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkInputAttachmentAspectReference-aspectMask-02250",
|
"vuid": "VUID-VkInputAttachmentAspectReference-aspectMask-02250",
|
||||||
"text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT for any index <em>i</em>."
|
"text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> for any index <code>i</code>."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -5040,7 +5040,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkComputePipelineCreateInfo-pNext-pNext",
|
"vuid": "VUID-VkComputePipelineCreateInfo-pNext-pNext",
|
||||||
"text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code>"
|
"text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkPipelineCreationFeedbackCreateInfoEXT\">VkPipelineCreationFeedbackCreateInfoEXT</a>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkComputePipelineCreateInfo-flags-parameter",
|
"vuid": "VUID-VkComputePipelineCreateInfo-flags-parameter",
|
||||||
@ -5376,7 +5376,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkGraphicsPipelineCreateInfo-pNext-pNext",
|
"vuid": "VUID-VkGraphicsPipelineCreateInfo-pNext-pNext",
|
||||||
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkPipelineDiscardRectangleStateCreateInfoEXT\">VkPipelineDiscardRectangleStateCreateInfoEXT</a> or <a href=\"#VkPipelineRepresentativeFragmentTestStateCreateInfoNV\">VkPipelineRepresentativeFragmentTestStateCreateInfoNV</a>"
|
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkPipelineCreationFeedbackCreateInfoEXT\">VkPipelineCreationFeedbackCreateInfoEXT</a>, <a href=\"#VkPipelineDiscardRectangleStateCreateInfoEXT\">VkPipelineDiscardRectangleStateCreateInfoEXT</a>, or <a href=\"#VkPipelineRepresentativeFragmentTestStateCreateInfoNV\">VkPipelineRepresentativeFragmentTestStateCreateInfoNV</a>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkGraphicsPipelineCreateInfo-sType-unique",
|
"vuid": "VUID-VkGraphicsPipelineCreateInfo-sType-unique",
|
||||||
@ -5962,7 +5962,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkRayTracingPipelineCreateInfoNV-pNext-pNext",
|
"vuid": "VUID-VkRayTracingPipelineCreateInfoNV-pNext-pNext",
|
||||||
"text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code>"
|
"text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkPipelineCreationFeedbackCreateInfoEXT\">VkPipelineCreationFeedbackCreateInfoEXT</a>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkRayTracingPipelineCreateInfoNV-flags-parameter",
|
"vuid": "VUID-VkRayTracingPipelineCreateInfoNV-flags-parameter",
|
||||||
@ -6090,6 +6090,40 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"VkPipelineCreationFeedbackCreateInfoEXT": {
|
||||||
|
"(VK_EXT_pipeline_creation_feedback)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02668",
|
||||||
|
"text": " When chained to <a href=\"#VkGraphicsPipelineCreateInfo\">VkGraphicsPipelineCreateInfo</a>, <a href=\"#VkPipelineCreationFeedbackEXT\">VkPipelineCreationFeedbackEXT</a>::<code>pipelineStageCreationFeedbackCount</code> <strong class=\"purple\">must</strong> equal <a href=\"#VkGraphicsPipelineCreateInfo\">VkGraphicsPipelineCreateInfo</a>::<code>stageCount</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02669",
|
||||||
|
"text": " When chained to <a href=\"#VkComputePipelineCreateInfo\">VkComputePipelineCreateInfo</a>, <a href=\"#VkPipelineCreationFeedbackEXT\">VkPipelineCreationFeedbackEXT</a>::<code>pipelineStageCreationFeedbackCount</code> <strong class=\"purple\">must</strong> equal 1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pPipelineCreationFeedback-parameter",
|
||||||
|
"text": " <code>pPipelineCreationFeedback</code> <strong class=\"purple\">must</strong> be a valid pointer to a <code>VkPipelineCreationFeedbackEXT</code> structure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pPipelineStageCreationFeedbacks-parameter",
|
||||||
|
"text": " <code>pPipelineStageCreationFeedbacks</code> <strong class=\"purple\">must</strong> be a valid pointer to an array of <code>pipelineStageCreationFeedbackCount</code> <code>VkPipelineCreationFeedbackEXT</code> structures"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-arraylength",
|
||||||
|
"text": " <code>pipelineStageCreationFeedbackCount</code> <strong class=\"purple\">must</strong> be greater than <code>0</code>"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"(VK_EXT_pipeline_creation_feedback)+(VK_NV_ray_tracing)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02670",
|
||||||
|
"text": " When chained to <a href=\"#VkRayTracingPipelineCreateInfoNV\">VkRayTracingPipelineCreateInfoNV</a>, <a href=\"#VkPipelineCreationFeedbackEXT\">VkPipelineCreationFeedbackEXT</a>::<code>pipelineStageCreationFeedbackCount</code> <strong class=\"purple\">must</strong> equal <a href=\"#VkRayTracingPipelineCreateInfoNV\">VkRayTracingPipelineCreateInfoNV</a>::<code>stageCount</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"VkAllocationCallbacks": {
|
"VkAllocationCallbacks": {
|
||||||
"core": [
|
"core": [
|
||||||
{
|
{
|
||||||
@ -8180,7 +8214,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkGetImageSubresourceLayout-tiling-02271",
|
"vuid": "VUID-vkGetImageSubresourceLayout-tiling-02271",
|
||||||
"text": " If the <code>tiling</code> of the <code>image</code> is <code>VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT</code>, then the <code>aspectMask</code> member of <code>pSubresource</code> <strong class=\"purple\">must</strong> be <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT and the index <em>i</em> <strong class=\"purple\">must</strong> be less than the <a href=\"#VkDrmFormatModifierPropertiesEXT\"><code>drmFormatModifierPlaneCount</code></a> associated with the image’s <a href=\"#VkImageCreateInfo\"><code>format</code></a> and <a href=\"#VkImageDrmFormatModifierPropertiesEXT\"><code>drmFormatModifier</code></a>."
|
"text": " If the <code>tiling</code> of the <code>image</code> is <code>VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT</code>, then the <code>aspectMask</code> member of <code>pSubresource</code> <strong class=\"purple\">must</strong> be <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> and the index <code>i</code> <strong class=\"purple\">must</strong> be less than the <a href=\"#VkDrmFormatModifierPropertiesEXT\"><code>drmFormatModifierPlaneCount</code></a> associated with the image’s <a href=\"#VkImageCreateInfo\"><code>format</code></a> and <a href=\"#VkImageDrmFormatModifierPropertiesEXT\"><code>drmFormatModifier</code></a>."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"core": [
|
"core": [
|
||||||
@ -8638,7 +8672,7 @@
|
|||||||
"(VK_EXT_image_drm_format_modifier)": [
|
"(VK_EXT_image_drm_format_modifier)": [
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkImageSubresourceRange-aspectMask-02278",
|
"vuid": "VUID-VkImageSubresourceRange-aspectMask-02278",
|
||||||
"text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT for any index <em>i</em>."
|
"text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> for any index <code>i</code>."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -12008,6 +12042,34 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"vkResetQueryPoolEXT": {
|
||||||
|
"(VK_EXT_host_query_reset)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkResetQueryPoolEXT-None-02665",
|
||||||
|
"text": " The <a href=\"#features-hostQueryReset\">hostQueryReset</a> feature <strong class=\"purple\">must</strong> be enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkResetQueryPoolEXT-firstQuery-02666",
|
||||||
|
"text": " <code>firstQuery</code> <strong class=\"purple\">must</strong> be less than the number of queries in <code>queryPool</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkResetQueryPoolEXT-firstQuery-02667",
|
||||||
|
"text": " The sum of <code>firstQuery</code> and <code>queryCount</code> <strong class=\"purple\">must</strong> be less than or equal to the number of queries in <code>queryPool</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkResetQueryPoolEXT-device-parameter",
|
||||||
|
"text": " <code>device</code> <strong class=\"purple\">must</strong> be a valid <code>VkDevice</code> handle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkResetQueryPoolEXT-queryPool-parameter",
|
||||||
|
"text": " <code>queryPool</code> <strong class=\"purple\">must</strong> be a valid <code>VkQueryPool</code> handle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkResetQueryPoolEXT-queryPool-parent",
|
||||||
|
"text": " <code>queryPool</code> <strong class=\"purple\">must</strong> have been created, allocated, or retrieved from <code>device</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"vkCmdBeginQuery": {
|
"vkCmdBeginQuery": {
|
||||||
"core": [
|
"core": [
|
||||||
{
|
{
|
||||||
@ -12776,7 +12838,7 @@
|
|||||||
"(VK_EXT_image_drm_format_modifier)": [
|
"(VK_EXT_image_drm_format_modifier)": [
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkClearAttachment-aspectMask-02246",
|
"vuid": "VUID-VkClearAttachment-aspectMask-02246",
|
||||||
"text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT for any index <em>i</em>."
|
"text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> for any index <code>i</code>."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -13458,7 +13520,7 @@
|
|||||||
"(VK_EXT_image_drm_format_modifier)": [
|
"(VK_EXT_image_drm_format_modifier)": [
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkImageSubresourceLayers-aspectMask-02247",
|
"vuid": "VUID-VkImageSubresourceLayers-aspectMask-02247",
|
||||||
"text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT for any index <em>i</em>."
|
"text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> for any index <code>i</code>."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -14576,7 +14638,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDraw-filterCubicMinmax-02614",
|
"vuid": "VUID-vkCmdDraw-filterCubicMinmax-02614",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_VERSION_1_1,VK_KHR_multiview)": [
|
"(VK_VERSION_1_1,VK_KHR_multiview)": [
|
||||||
@ -14722,7 +14784,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDrawIndexed-filterCubicMinmax-02616",
|
"vuid": "VUID-vkCmdDrawIndexed-filterCubicMinmax-02616",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_VERSION_1_1,VK_KHR_multiview)": [
|
"(VK_VERSION_1_1,VK_KHR_multiview)": [
|
||||||
@ -14904,7 +14966,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDrawIndirect-filterCubicMinmax-02618",
|
"vuid": "VUID-vkCmdDrawIndirect-filterCubicMinmax-02618",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_VERSION_1_1,VK_KHR_multiview)": [
|
"(VK_VERSION_1_1,VK_KHR_multiview)": [
|
||||||
@ -15110,7 +15172,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDrawIndirectCountKHR-filterCubicMinmax-02620",
|
"vuid": "VUID-vkCmdDrawIndirectCountKHR-filterCubicMinmax-02620",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_KHR_draw_indirect_count)+(VK_VERSION_1_1,VK_KHR_multiview)": [
|
"(VK_KHR_draw_indirect_count)+(VK_VERSION_1_1,VK_KHR_multiview)": [
|
||||||
@ -15460,7 +15522,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02622",
|
"vuid": "VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02622",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_VERSION_1_1,VK_KHR_multiview)": [
|
"(VK_VERSION_1_1,VK_KHR_multiview)": [
|
||||||
@ -15670,7 +15732,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDrawIndexedIndirectCountKHR-filterCubicMinmax-02624",
|
"vuid": "VUID-vkCmdDrawIndexedIndirectCountKHR-filterCubicMinmax-02624",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_KHR_draw_indirect_count)+(VK_VERSION_1_1,VK_KHR_multiview)": [
|
"(VK_KHR_draw_indirect_count)+(VK_VERSION_1_1,VK_KHR_multiview)": [
|
||||||
@ -15996,7 +16058,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDrawIndirectByteCountEXT-filterCubicMinmax-02626",
|
"vuid": "VUID-vkCmdDrawIndirectByteCountEXT-filterCubicMinmax-02626",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_EXT_transform_feedback)+(VK_VERSION_1_1,VK_KHR_multiview)": [
|
"(VK_EXT_transform_feedback)+(VK_VERSION_1_1,VK_KHR_multiview)": [
|
||||||
@ -18442,7 +18504,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDispatch-filterCubicMinmax-02610",
|
"vuid": "VUID-vkCmdDispatch-filterCubicMinmax-02610",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_VERSION_1_1)": [
|
"(VK_VERSION_1_1)": [
|
||||||
@ -18568,7 +18630,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkCmdDispatchIndirect-filterCubicMinmax-02612",
|
"vuid": "VUID-vkCmdDispatchIndirect-filterCubicMinmax-02612",
|
||||||
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
"text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"(VK_VERSION_1_1)": [
|
"(VK_VERSION_1_1)": [
|
||||||
@ -20052,6 +20114,46 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"vkCreateStreamDescriptorSurfaceGGP": {
|
||||||
|
"(VK_KHR_surface)+(VK_GGP_stream_descriptor_surface)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-instance-parameter",
|
||||||
|
"text": " <code>instance</code> <strong class=\"purple\">must</strong> be a valid <code>VkInstance</code> handle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pCreateInfo-parameter",
|
||||||
|
"text": " <code>pCreateInfo</code> <strong class=\"purple\">must</strong> be a valid pointer to a valid <code>VkStreamDescriptorSurfaceCreateInfoGGP</code> structure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pAllocator-parameter",
|
||||||
|
"text": " If <code>pAllocator</code> is not <code>NULL</code>, <code>pAllocator</code> <strong class=\"purple\">must</strong> be a valid pointer to a valid <code>VkAllocationCallbacks</code> structure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pSurface-parameter",
|
||||||
|
"text": " <code>pSurface</code> <strong class=\"purple\">must</strong> be a valid pointer to a <code>VkSurfaceKHR</code> handle"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"VkStreamDescriptorSurfaceCreateInfoGGP": {
|
||||||
|
"(VK_KHR_surface)+(VK_GGP_stream_descriptor_surface)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-streamDescriptor-02681",
|
||||||
|
"text": " <code>streamDescriptor</code> <strong class=\"purple\">must</strong> be a valid <code>GgpStreamDescriptor</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-pNext-pNext",
|
||||||
|
"text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-flags-zerobitmask",
|
||||||
|
"text": " <code>flags</code> <strong class=\"purple\">must</strong> be <code>0</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"vkCreateIOSSurfaceMVK": {
|
"vkCreateIOSSurfaceMVK": {
|
||||||
"(VK_KHR_surface)+(VK_MVK_ios_surface)": [
|
"(VK_KHR_surface)+(VK_MVK_ios_surface)": [
|
||||||
{
|
{
|
||||||
@ -20769,6 +20871,12 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"vkGetPhysicalDeviceSurfaceCapabilities2KHR": {
|
"vkGetPhysicalDeviceSurfaceCapabilities2KHR": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive,VK_KHR_win32_surface)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-02671",
|
||||||
|
"text": " If an instance of <a href=\"#VkSurfaceCapabilitiesFullScreenExclusiveEXT\">VkSurfaceCapabilitiesFullScreenExclusiveEXT</a> is included in the <code>pNext</code> chain of <code>pSurfaceCapabilities</code>, an instance of <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a> <strong class=\"purple\">must</strong> be included in the <code>pNext</code> chain of <code>pSurfaceInfo</code>."
|
||||||
|
}
|
||||||
|
],
|
||||||
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
|
||||||
{
|
{
|
||||||
"vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter",
|
"vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter",
|
||||||
@ -20785,6 +20893,12 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"VkPhysicalDeviceSurfaceInfo2KHR": {
|
"VkPhysicalDeviceSurfaceInfo2KHR": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_KHR_win32_surface,VK_EXT_full_screen_exclusive)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-02672",
|
||||||
|
"text": " If the <code>pNext</code> chain includes an instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a> with its <code>fullScreenExclusive</code> member set to <code>VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT</code>, and <code>surface</code> was created using <a href=\"#vkCreateWin32SurfaceKHR\">vkCreateWin32SurfaceKHR</a>, an instance of <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a> <strong class=\"purple\">must</strong> be present in the <code>pNext</code> chain"
|
||||||
|
}
|
||||||
|
],
|
||||||
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-sType",
|
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-sType",
|
||||||
@ -20792,7 +20906,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-pNext",
|
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-pNext",
|
||||||
"text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code>"
|
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a> or <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-unique",
|
||||||
|
"text": " Each <code>sType</code> member in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be unique"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter",
|
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter",
|
||||||
@ -20800,6 +20918,30 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"VkSurfaceFullScreenExclusiveInfoEXT": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSurfaceFullScreenExclusiveInfoEXT-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSurfaceFullScreenExclusiveInfoEXT-fullScreenExclusive-parameter",
|
||||||
|
"text": " <code>fullScreenExclusive</code> <strong class=\"purple\">must</strong> be a valid <a href=\"#VkFullScreenExclusiveEXT\">VkFullScreenExclusiveEXT</a> value"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"VkSurfaceFullScreenExclusiveWin32InfoEXT": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)+(VK_KHR_win32_surface)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-hmonitor-02673",
|
||||||
|
"text": " <code>hmonitor</code> <strong class=\"purple\">must</strong> be a valid <code>HMONITOR</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"VkSurfaceCapabilities2KHR": {
|
"VkSurfaceCapabilities2KHR": {
|
||||||
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
|
||||||
{
|
{
|
||||||
@ -20808,7 +20950,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkSurfaceCapabilities2KHR-pNext-pNext",
|
"vuid": "VUID-VkSurfaceCapabilities2KHR-pNext-pNext",
|
||||||
"text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkSharedPresentSurfaceCapabilitiesKHR\">VkSharedPresentSurfaceCapabilitiesKHR</a>"
|
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDisplayNativeHdrSurfaceCapabilitiesAMD\">VkDisplayNativeHdrSurfaceCapabilitiesAMD</a>, <a href=\"#VkSharedPresentSurfaceCapabilitiesKHR\">VkSharedPresentSurfaceCapabilitiesKHR</a>, <a href=\"#VkSurfaceCapabilitiesFullScreenExclusiveEXT\">VkSurfaceCapabilitiesFullScreenExclusiveEXT</a>, or <a href=\"#VkSurfaceProtectedCapabilitiesKHR\">VkSurfaceProtectedCapabilitiesKHR</a>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSurfaceCapabilities2KHR-sType-unique",
|
||||||
|
"text": " Each <code>sType</code> member in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be unique"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"VkSurfaceProtectedCapabilitiesKHR": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_KHR_surface_protected_capabilities)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSurfaceProtectedCapabilitiesKHR-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR</code>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -20820,6 +20974,22 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"VkDisplayNativeHdrSurfaceCapabilitiesAMD": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_AMD_display_native_hdr)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkDisplayNativeHdrSurfaceCapabilitiesAMD-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"VkSurfaceCapabilitiesFullScreenExclusiveEXT": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSurfaceCapabilitiesFullScreenExclusiveEXT-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"vkGetPhysicalDeviceSurfaceCapabilities2EXT": {
|
"vkGetPhysicalDeviceSurfaceCapabilities2EXT": {
|
||||||
"(VK_KHR_surface)+(VK_EXT_display_surface_counter)": [
|
"(VK_KHR_surface)+(VK_EXT_display_surface_counter)": [
|
||||||
{
|
{
|
||||||
@ -20936,6 +21106,66 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"vkGetPhysicalDeviceSurfacePresentModes2EXT": {
|
||||||
|
"(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-physicalDevice-parameter",
|
||||||
|
"text": " <code>physicalDevice</code> <strong class=\"purple\">must</strong> be a valid <code>VkPhysicalDevice</code> handle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pSurfaceInfo-parameter",
|
||||||
|
"text": " <code>pSurfaceInfo</code> <strong class=\"purple\">must</strong> be a valid pointer to a valid <code>VkPhysicalDeviceSurfaceInfo2KHR</code> structure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pPresentModeCount-parameter",
|
||||||
|
"text": " <code>pPresentModeCount</code> <strong class=\"purple\">must</strong> be a valid pointer to a <code>uint32_t</code> value"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pPresentModes-parameter",
|
||||||
|
"text": " If the value referenced by <code>pPresentModeCount</code> is not <code>0</code>, and <code>pPresentModes</code> is not <code>NULL</code>, <code>pPresentModes</code> <strong class=\"purple\">must</strong> be a valid pointer to an array of <code>pPresentModeCount</code> <a href=\"#VkPresentModeKHR\">VkPresentModeKHR</a> values"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"vkAcquireFullScreenExclusiveModeEXT": {
|
||||||
|
"(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02674",
|
||||||
|
"text": " <code>swapchain</code> <strong class=\"purple\">must</strong> not be in the retired state"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02675",
|
||||||
|
"text": " <code>swapchain</code> <strong class=\"purple\">must</strong> be a swapchain created with an instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a>, with <code>fullScreenExclusive</code> set to <code>VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02676",
|
||||||
|
"text": " <code>swapchain</code> <strong class=\"purple\">must</strong> not currently have exclusive full-screen access"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-device-parameter",
|
||||||
|
"text": " <code>device</code> <strong class=\"purple\">must</strong> be a valid <code>VkDevice</code> handle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-parameter",
|
||||||
|
"text": " <code>swapchain</code> <strong class=\"purple\">must</strong> be a valid <code>VkSwapchainKHR</code> handle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-commonparent",
|
||||||
|
"text": " Both of <code>device</code>, and <code>swapchain</code> <strong class=\"purple\">must</strong> have been created, allocated, or retrieved from the same <code>VkInstance</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"vkReleaseFullScreenExclusiveModeEXT": {
|
||||||
|
"(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-02677",
|
||||||
|
"text": " <code>swapchain</code> <strong class=\"purple\">must</strong> not be in the retired state"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-02678",
|
||||||
|
"text": " <code>swapchain</code> <strong class=\"purple\">must</strong> be a swapchain created with an instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a>, with <code>fullScreenExclusive</code> set to <code>VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"vkGetDeviceGroupPresentCapabilitiesKHR": {
|
"vkGetDeviceGroupPresentCapabilitiesKHR": {
|
||||||
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)": [
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)": [
|
||||||
{
|
{
|
||||||
@ -20980,6 +21210,22 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"vkGetDeviceGroupSurfacePresentModes2EXT": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)+(VK_EXT_full_screen_exclusive)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-device-parameter",
|
||||||
|
"text": " <code>device</code> <strong class=\"purple\">must</strong> be a valid <code>VkDevice</code> handle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pSurfaceInfo-parameter",
|
||||||
|
"text": " <code>pSurfaceInfo</code> <strong class=\"purple\">must</strong> be a valid pointer to a valid <code>VkPhysicalDeviceSurfaceInfo2KHR</code> structure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pModes-parameter",
|
||||||
|
"text": " <code>pModes</code> <strong class=\"purple\">must</strong> be a valid pointer to a <a href=\"#VkDeviceGroupPresentModeFlagsKHR\">VkDeviceGroupPresentModeFlagsKHR</a> value"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"vkGetPhysicalDevicePresentRectanglesKHR": {
|
"vkGetPhysicalDevicePresentRectanglesKHR": {
|
||||||
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)": [
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)": [
|
||||||
{
|
{
|
||||||
@ -21088,11 +21334,11 @@
|
|||||||
"(VK_KHR_surface)+(VK_KHR_swapchain)": [
|
"(VK_KHR_surface)+(VK_KHR_swapchain)": [
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkSwapchainCreateInfoKHR-surface-01270",
|
"vuid": "VUID-VkSwapchainCreateInfoKHR-surface-01270",
|
||||||
"text": " <code>surface</code> <strong class=\"purple\">must</strong> be a surface that is supported by the device as determined using <code>vkGetPhysicalDeviceSurfaceSupportKHR</code>"
|
"text": " <code>surface</code> <strong class=\"purple\">must</strong> be a surface that is supported by the device as determined using <a href=\"#vkGetPhysicalDeviceSurfaceSupportKHR\">vkGetPhysicalDeviceSurfaceSupportKHR</a>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01271",
|
"vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01271",
|
||||||
"text": " <code>minImageCount</code> <strong class=\"purple\">must</strong> be greater than or equal to the value returned in the <code>minImageCount</code> member of the <code>VkSurfaceCapabilitiesKHR</code> structure returned by <code>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</code> for the surface"
|
"text": " <code>minImageCount</code> <strong class=\"purple\">must</strong> be greater than or equal to the value returned in the <code>minImageCount</code> member of the <code>VkSurfaceCapabilitiesKHR</code> structure returned by <a href=\"#vkGetPhysicalDeviceSurfaceCapabilitiesKHR\">vkGetPhysicalDeviceSurfaceCapabilitiesKHR</a> for the surface"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01272",
|
"vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01272",
|
||||||
@ -21148,7 +21394,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkSwapchainCreateInfoKHR-pNext-pNext",
|
"vuid": "VUID-VkSwapchainCreateInfoKHR-pNext-pNext",
|
||||||
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupSwapchainCreateInfoKHR\">VkDeviceGroupSwapchainCreateInfoKHR</a>, <a href=\"#VkImageFormatListCreateInfoKHR\">VkImageFormatListCreateInfoKHR</a>, or <a href=\"#VkSwapchainCounterCreateInfoEXT\">VkSwapchainCounterCreateInfoEXT</a>"
|
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupSwapchainCreateInfoKHR\">VkDeviceGroupSwapchainCreateInfoKHR</a>, <a href=\"#VkImageFormatListCreateInfoKHR\">VkImageFormatListCreateInfoKHR</a>, <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a>, <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a>, <a href=\"#VkSwapchainCounterCreateInfoEXT\">VkSwapchainCounterCreateInfoEXT</a>, or <a href=\"#VkSwapchainDisplayNativeHdrCreateInfoAMD\">VkSwapchainDisplayNativeHdrCreateInfoAMD</a>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkSwapchainCreateInfoKHR-sType-unique",
|
"vuid": "VUID-VkSwapchainCreateInfoKHR-sType-unique",
|
||||||
@ -21250,6 +21496,18 @@
|
|||||||
"vuid": "VUID-VkSwapchainCreateInfoKHR-flags-03168",
|
"vuid": "VUID-VkSwapchainCreateInfoKHR-flags-03168",
|
||||||
"text": " If <code>flags</code> contains <code>VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR</code> then the <code>pNext</code> chain <strong class=\"purple\">must</strong> contain an instance of <a href=\"#VkImageFormatListCreateInfoKHR\">VkImageFormatListCreateInfoKHR</a> with a <code>viewFormatCount</code> greater than zero and <code>pViewFormats</code> <strong class=\"purple\">must</strong> have an element equal to <code>imageFormat</code>"
|
"text": " If <code>flags</code> contains <code>VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR</code> then the <code>pNext</code> chain <strong class=\"purple\">must</strong> contain an instance of <a href=\"#VkImageFormatListCreateInfoKHR\">VkImageFormatListCreateInfoKHR</a> with a <code>viewFormatCount</code> greater than zero and <code>pViewFormats</code> <strong class=\"purple\">must</strong> have an element equal to <code>imageFormat</code>"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_surface_protected_capabilities)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSwapchainCreateInfoKHR-flags-03187",
|
||||||
|
"text": " If <code>flags</code> contains <code>VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR</code>, then <code>VkSurfaceProtectedCapabilitiesKHR</code>::<code>supportsProtected</code> <strong class=\"purple\">must</strong> be <code>VK_TRUE</code> in the <a href=\"#VkSurfaceProtectedCapabilitiesKHR\">VkSurfaceProtectedCapabilitiesKHR</a> structure returned by <a href=\"#vkGetPhysicalDeviceSurfaceCapabilities2KHR\">vkGetPhysicalDeviceSurfaceCapabilities2KHR</a> for <code>surface</code>"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_full_screen_exclusive,VK_KHR_win32_surface)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSwapchainCreateInfoKHR-pNext-02679",
|
||||||
|
"text": " If the <code>pNext</code> chain includes an instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a> with its <code>fullScreenExclusive</code> member set to <code>VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT</code>, and <code>surface</code> was created using <a href=\"#vkCreateWin32SurfaceKHR\">vkCreateWin32SurfaceKHR</a>, an instance of <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a> <strong class=\"purple\">must</strong> be present in the <code>pNext</code> chain"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"VkDeviceGroupSwapchainCreateInfoKHR": {
|
"VkDeviceGroupSwapchainCreateInfoKHR": {
|
||||||
@ -21268,6 +21526,30 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"VkSwapchainDisplayNativeHdrCreateInfoAMD": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_AMD_display_native_hdr)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-localDimmingEnable-XXXXX",
|
||||||
|
"text": " It is only valid to set <code>localDimmingEnable</code> to <code>VK_TRUE</code> if <a href=\"#VkDisplayNativeHdrSurfaceCapabilitiesAMD\">VkDisplayNativeHdrSurfaceCapabilitiesAMD</a>::<code>localDimmingSupport</code> is supported."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"vkSetLocalDimmingAMD": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_AMD_display_native_hdr)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkSetLocalDimmingAMD-swapChain-parameter",
|
||||||
|
"text": " <code>swapChain</code> <strong class=\"purple\">must</strong> be a valid <code>VkSwapchainKHR</code> handle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-vkSetLocalDimmingAMD-XXXXX",
|
||||||
|
"text": " It is only valid to call <a href=\"#vkSetLocalDimmingAMD\">vkSetLocalDimmingAMD</a> if <a href=\"#VkDisplayNativeHdrSurfaceCapabilitiesAMD\">VkDisplayNativeHdrSurfaceCapabilitiesAMD</a>::<code>localDimmingSupport</code> is supported."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"VkSwapchainCounterCreateInfoEXT": {
|
"VkSwapchainCounterCreateInfoEXT": {
|
||||||
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_display_control)": [
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_display_control)": [
|
||||||
{
|
{
|
||||||
@ -21578,7 +21860,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkPresentInfoKHR-pNext-pNext",
|
"vuid": "VUID-VkPresentInfoKHR-pNext-pNext",
|
||||||
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupPresentInfoKHR\">VkDeviceGroupPresentInfoKHR</a>, <a href=\"#VkDisplayPresentInfoKHR\">VkDisplayPresentInfoKHR</a>, <a href=\"#VkPresentRegionsKHR\">VkPresentRegionsKHR</a>, or <a href=\"#VkPresentTimesInfoGOOGLE\">VkPresentTimesInfoGOOGLE</a>"
|
"text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupPresentInfoKHR\">VkDeviceGroupPresentInfoKHR</a>, <a href=\"#VkDisplayPresentInfoKHR\">VkDisplayPresentInfoKHR</a>, <a href=\"#VkPresentFrameTokenGGP\">VkPresentFrameTokenGGP</a>, <a href=\"#VkPresentRegionsKHR\">VkPresentRegionsKHR</a>, or <a href=\"#VkPresentTimesInfoGOOGLE\">VkPresentTimesInfoGOOGLE</a>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vuid": "VUID-VkPresentInfoKHR-sType-unique",
|
"vuid": "VUID-VkPresentInfoKHR-sType-unique",
|
||||||
@ -21734,6 +22016,18 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"VkPresentFrameTokenGGP": {
|
||||||
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_GGP_frame_token)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPresentFrameTokenGGP-frameToken-02680",
|
||||||
|
"text": " <code>frameToken</code> <strong class=\"purple\">must</strong> be a valid <code>GgpFrameToken</code>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPresentFrameTokenGGP-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"vkSetHdrMetadataEXT": {
|
"vkSetHdrMetadataEXT": {
|
||||||
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_hdr_metadata)": [
|
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_hdr_metadata)": [
|
||||||
{
|
{
|
||||||
@ -22472,6 +22766,14 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"VkPhysicalDeviceHostQueryResetFeaturesEXT": {
|
||||||
|
"(VK_EXT_host_query_reset)": [
|
||||||
|
{
|
||||||
|
"vuid": "VUID-VkPhysicalDeviceHostQueryResetFeaturesEXT-sType-sType",
|
||||||
|
"text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT</code>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"VkPhysicalDevicePushDescriptorPropertiesKHR": {
|
"VkPhysicalDevicePushDescriptorPropertiesKHR": {
|
||||||
"(VK_KHR_push_descriptor)": [
|
"(VK_KHR_push_descriptor)": [
|
||||||
{
|
{
|
||||||
|
219
registry/vk.xml
219
registry/vk.xml
@ -56,6 +56,7 @@ server.
|
|||||||
<platform name="macos" protect="VK_USE_PLATFORM_MACOS_MVK" comment="Apple MacOS"/>
|
<platform name="macos" protect="VK_USE_PLATFORM_MACOS_MVK" comment="Apple MacOS"/>
|
||||||
<platform name="metal" protect="VK_USE_PLATFORM_METAL_EXT" comment="Metal on CoreAnimation on Apple platforms"/>
|
<platform name="metal" protect="VK_USE_PLATFORM_METAL_EXT" comment="Metal on CoreAnimation on Apple platforms"/>
|
||||||
<platform name="fuchsia" protect="VK_USE_PLATFORM_FUCHSIA" comment="Fuchsia"/>
|
<platform name="fuchsia" protect="VK_USE_PLATFORM_FUCHSIA" comment="Fuchsia"/>
|
||||||
|
<platform name="ggp" protect="VK_USE_PLATFORM_GGP" comment="Google Games Platform"/>
|
||||||
</platforms>
|
</platforms>
|
||||||
|
|
||||||
<tags comment="Vulkan vendor/author tags for extensions and layers">
|
<tags comment="Vulkan vendor/author tags for extensions and layers">
|
||||||
@ -74,6 +75,7 @@ server.
|
|||||||
<tag name="ANDROID" author="Google LLC" contact="Jesse Hall @critsec"/>
|
<tag name="ANDROID" author="Google LLC" contact="Jesse Hall @critsec"/>
|
||||||
<tag name="CHROMIUM" author="Google LLC" contact="Jesse Hall @critsec"/>
|
<tag name="CHROMIUM" author="Google LLC" contact="Jesse Hall @critsec"/>
|
||||||
<tag name="FUCHSIA" author="Google LLC" contact="Craig Stout @cdotstout, Jesse Hall @critsec"/>
|
<tag name="FUCHSIA" author="Google LLC" contact="Craig Stout @cdotstout, Jesse Hall @critsec"/>
|
||||||
|
<tag name="GGP" author="Google, LLC" contact="Jean-Francois Roy @jfroy, Hai Nguyen @chaoticbob, Jesse Hall @critsec"/>
|
||||||
<tag name="GOOGLE" author="Google LLC" contact="Jesse Hall @critsec"/>
|
<tag name="GOOGLE" author="Google LLC" contact="Jesse Hall @critsec"/>
|
||||||
<tag name="QCOM" author="Qualcomm Technologies, Inc." contact="Maurice Ribble @mribble"/>
|
<tag name="QCOM" author="Qualcomm Technologies, Inc." contact="Maurice Ribble @mribble"/>
|
||||||
<tag name="LUNARG" author="LunarG, Inc." contact="Karen Ghavam @karenghavam-lunarg"/>
|
<tag name="LUNARG" author="LunarG, Inc." contact="Karen Ghavam @karenghavam-lunarg"/>
|
||||||
@ -100,6 +102,7 @@ server.
|
|||||||
<type category="include" name="windows.h"/>
|
<type category="include" name="windows.h"/>
|
||||||
<type category="include" name="xcb/xcb.h"/>
|
<type category="include" name="xcb/xcb.h"/>
|
||||||
<type category="include" name="zircon/types.h"/>
|
<type category="include" name="zircon/types.h"/>
|
||||||
|
<type category="include" name="ggp_c/vulkan_types.h"/>
|
||||||
<comment>
|
<comment>
|
||||||
In the current header structure, each platform's interfaces
|
In the current header structure, each platform's interfaces
|
||||||
are confined to a platform-specific header (vulkan_xlib.h,
|
are confined to a platform-specific header (vulkan_xlib.h,
|
||||||
@ -125,6 +128,7 @@ server.
|
|||||||
<type requires="wayland-client.h" name="wl_surface"/>
|
<type requires="wayland-client.h" name="wl_surface"/>
|
||||||
<type requires="windows.h" name="HINSTANCE"/>
|
<type requires="windows.h" name="HINSTANCE"/>
|
||||||
<type requires="windows.h" name="HWND"/>
|
<type requires="windows.h" name="HWND"/>
|
||||||
|
<type requires="windows.h" name="HMONITOR"/>
|
||||||
<type requires="windows.h" name="HANDLE"/>
|
<type requires="windows.h" name="HANDLE"/>
|
||||||
<type requires="windows.h" name="SECURITY_ATTRIBUTES"/>
|
<type requires="windows.h" name="SECURITY_ATTRIBUTES"/>
|
||||||
<type requires="windows.h" name="DWORD"/>
|
<type requires="windows.h" name="DWORD"/>
|
||||||
@ -133,6 +137,8 @@ server.
|
|||||||
<type requires="xcb/xcb.h" name="xcb_visualid_t"/>
|
<type requires="xcb/xcb.h" name="xcb_visualid_t"/>
|
||||||
<type requires="xcb/xcb.h" name="xcb_window_t"/>
|
<type requires="xcb/xcb.h" name="xcb_window_t"/>
|
||||||
<type requires="zircon/types.h" name="zx_handle_t"/>
|
<type requires="zircon/types.h" name="zx_handle_t"/>
|
||||||
|
<type requires="ggp_c/vulkan_types.h" name="GgpStreamDescriptor"/>
|
||||||
|
<type requires="ggp_c/vulkan_types.h" name="GgpFrameToken"/>
|
||||||
|
|
||||||
<type category="define">#define <name>VK_MAKE_VERSION</name>(major, minor, patch) \
|
<type category="define">#define <name>VK_MAKE_VERSION</name>(major, minor, patch) \
|
||||||
(((major) << 22) | ((minor) << 12) | (patch))</type>
|
(((major) << 22) | ((minor) << 12) | (patch))</type>
|
||||||
@ -147,7 +153,7 @@ server.
|
|||||||
<type category="define">// Vulkan 1.1 version number
|
<type category="define">// Vulkan 1.1 version number
|
||||||
#define <name>VK_API_VERSION_1_1</name> <type>VK_MAKE_VERSION</type>(1, 1, 0)// Patch version should always be set to 0</type>
|
#define <name>VK_API_VERSION_1_1</name> <type>VK_MAKE_VERSION</type>(1, 1, 0)// Patch version should always be set to 0</type>
|
||||||
<type category="define">// Version of this file
|
<type category="define">// Version of this file
|
||||||
#define <name>VK_HEADER_VERSION</name> 103</type>
|
#define <name>VK_HEADER_VERSION</name> 105</type>
|
||||||
|
|
||||||
<type category="define">
|
<type category="define">
|
||||||
#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type>
|
#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type>
|
||||||
@ -259,6 +265,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
|
|
||||||
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorUpdateTemplateCreateFlags</name>;</type>
|
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorUpdateTemplateCreateFlags</name>;</type>
|
||||||
<type category="bitmask" name="VkDescriptorUpdateTemplateCreateFlagsKHR" alias="VkDescriptorUpdateTemplateCreateFlags"/>
|
<type category="bitmask" name="VkDescriptorUpdateTemplateCreateFlagsKHR" alias="VkDescriptorUpdateTemplateCreateFlags"/>
|
||||||
|
<type requires="VkPipelineCreationFeedbackFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCreationFeedbackFlagsEXT</name>;</type>
|
||||||
|
|
||||||
<comment>WSI extensions</comment>
|
<comment>WSI extensions</comment>
|
||||||
<type requires="VkCompositeAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkCompositeAlphaFlagsKHR</name>;</type>
|
<type requires="VkCompositeAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkCompositeAlphaFlagsKHR</name>;</type>
|
||||||
@ -277,6 +284,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMacOSSurfaceCreateFlagsMVK</name>;</type>
|
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMacOSSurfaceCreateFlagsMVK</name>;</type>
|
||||||
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMetalSurfaceCreateFlagsEXT</name>;</type>
|
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMetalSurfaceCreateFlagsEXT</name>;</type>
|
||||||
<type category="bitmask">typedef <type>VkFlags</type> <name>VkImagePipeSurfaceCreateFlagsFUCHSIA</name>;</type>
|
<type category="bitmask">typedef <type>VkFlags</type> <name>VkImagePipeSurfaceCreateFlagsFUCHSIA</name>;</type>
|
||||||
|
<type category="bitmask">typedef <type>VkFlags</type> <name>VkStreamDescriptorSurfaceCreateFlagsGGP</name>;</type>
|
||||||
<type requires="VkPeerMemoryFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPeerMemoryFeatureFlags</name>;</type>
|
<type requires="VkPeerMemoryFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPeerMemoryFeatureFlags</name>;</type>
|
||||||
<type category="bitmask" name="VkPeerMemoryFeatureFlagsKHR" alias="VkPeerMemoryFeatureFlags"/>
|
<type category="bitmask" name="VkPeerMemoryFeatureFlagsKHR" alias="VkPeerMemoryFeatureFlags"/>
|
||||||
<type requires="VkMemoryAllocateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryAllocateFlags</name>;</type>
|
<type requires="VkMemoryAllocateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryAllocateFlags</name>;</type>
|
||||||
@ -487,6 +495,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<type name="VkMemoryOverallocationBehaviorAMD" category="enum"/>
|
<type name="VkMemoryOverallocationBehaviorAMD" category="enum"/>
|
||||||
<type name="VkScopeNV" category="enum"/>
|
<type name="VkScopeNV" category="enum"/>
|
||||||
<type name="VkComponentTypeNV" category="enum"/>
|
<type name="VkComponentTypeNV" category="enum"/>
|
||||||
|
<type name="VkPipelineCreationFeedbackFlagBitsEXT" category="enum"/>
|
||||||
|
|
||||||
<comment>WSI extensions</comment>
|
<comment>WSI extensions</comment>
|
||||||
<type name="VkColorSpaceKHR" category="enum"/>
|
<type name="VkColorSpaceKHR" category="enum"/>
|
||||||
@ -541,6 +550,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<type name="VkBlendOverlapEXT" category="enum"/>
|
<type name="VkBlendOverlapEXT" category="enum"/>
|
||||||
<type name="VkDebugUtilsMessageSeverityFlagBitsEXT" category="enum"/>
|
<type name="VkDebugUtilsMessageSeverityFlagBitsEXT" category="enum"/>
|
||||||
<type name="VkDebugUtilsMessageTypeFlagBitsEXT" category="enum"/>
|
<type name="VkDebugUtilsMessageTypeFlagBitsEXT" category="enum"/>
|
||||||
|
<type name="VkFullScreenExclusiveEXT" category="enum"/>
|
||||||
|
|
||||||
<comment>Enumerated types in the header, but not used by the API</comment>
|
<comment>Enumerated types in the header, but not used by the API</comment>
|
||||||
<type name="VkVendorId" category="enum"/>
|
<type name="VkVendorId" category="enum"/>
|
||||||
@ -1697,6 +1707,12 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<member optional="true"><type>VkImagePipeSurfaceCreateFlagsFUCHSIA</type> <name>flags</name></member>
|
<member optional="true"><type>VkImagePipeSurfaceCreateFlagsFUCHSIA</type> <name>flags</name></member>
|
||||||
<member><type>zx_handle_t</type> <name>imagePipeHandle</name></member>
|
<member><type>zx_handle_t</type> <name>imagePipeHandle</name></member>
|
||||||
</type>
|
</type>
|
||||||
|
<type category="struct" name="VkStreamDescriptorSurfaceCreateInfoGGP">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member>const <type>void</type>* <name>pNext</name></member>
|
||||||
|
<member optional="true"><type>VkStreamDescriptorSurfaceCreateFlagsGGP</type> <name>flags</name></member>
|
||||||
|
<member><type>GgpStreamDescriptor</type> <name>streamDescriptor</name></member>
|
||||||
|
</type>
|
||||||
<type category="struct" name="VkSurfaceFormatKHR" returnedonly="true">
|
<type category="struct" name="VkSurfaceFormatKHR" returnedonly="true">
|
||||||
<member><type>VkFormat</type> <name>format</name><comment>Supported pair of rendering format</comment></member>
|
<member><type>VkFormat</type> <name>format</name><comment>Supported pair of rendering format</comment></member>
|
||||||
<member><type>VkColorSpaceKHR</type> <name>colorSpace</name><comment>and color space for the surface</comment></member>
|
<member><type>VkColorSpaceKHR</type> <name>colorSpace</name><comment>and color space for the surface</comment></member>
|
||||||
@ -2496,6 +2512,16 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<member noautovalidity="true"><type>float</type> <name>maxContentLightLevel</name><comment>Content maximum luminance</comment></member>
|
<member noautovalidity="true"><type>float</type> <name>maxContentLightLevel</name><comment>Content maximum luminance</comment></member>
|
||||||
<member noautovalidity="true"><type>float</type> <name>maxFrameAverageLightLevel</name></member>
|
<member noautovalidity="true"><type>float</type> <name>maxFrameAverageLightLevel</name></member>
|
||||||
</type>
|
</type>
|
||||||
|
<type category="struct" name="VkDisplayNativeHdrSurfaceCapabilitiesAMD" returnedonly="true" structextends="VkSurfaceCapabilities2KHR">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member><type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>VkBool32</type> <name>localDimmingSupport</name></member>
|
||||||
|
</type>
|
||||||
|
<type category="struct" name="VkSwapchainDisplayNativeHdrCreateInfoAMD" structextends="VkSwapchainCreateInfoKHR">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member>const <type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>VkBool32</type> <name>localDimmingEnable</name></member>
|
||||||
|
</type>
|
||||||
<type category="struct" name="VkRefreshCycleDurationGOOGLE" returnedonly="true">
|
<type category="struct" name="VkRefreshCycleDurationGOOGLE" returnedonly="true">
|
||||||
<member><type>uint64_t</type> <name>refreshDuration</name><comment>Number of nanoseconds from the start of one refresh cycle to the next</comment></member>
|
<member><type>uint64_t</type> <name>refreshDuration</name><comment>Number of nanoseconds from the start of one refresh cycle to the next</comment></member>
|
||||||
</type>
|
</type>
|
||||||
@ -2977,6 +3003,11 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<member><type>VkBool32</type> <name>shaderRoundingModeRTZFloat32</name></member> <!-- An implementation can support RTZ -->
|
<member><type>VkBool32</type> <name>shaderRoundingModeRTZFloat32</name></member> <!-- An implementation can support RTZ -->
|
||||||
<member><type>VkBool32</type> <name>shaderRoundingModeRTZFloat64</name></member> <!-- An implementation can support RTZ -->
|
<member><type>VkBool32</type> <name>shaderRoundingModeRTZFloat64</name></member> <!-- An implementation can support RTZ -->
|
||||||
</type>
|
</type>
|
||||||
|
<type category="struct" name="VkPhysicalDeviceHostQueryResetFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>VkBool32</type> <name>hostQueryReset</name></member>
|
||||||
|
</type>
|
||||||
<type category="struct" name="VkNativeBufferANDROID">
|
<type category="struct" name="VkNativeBufferANDROID">
|
||||||
<member values="VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
|
<member values="VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
<member>const <type>void</type>* <name>pNext</name></member>
|
<member>const <type>void</type>* <name>pNext</name></member>
|
||||||
@ -3698,6 +3729,11 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<member><type>void</type>* <name>pNext</name></member>
|
<member><type>void</type>* <name>pNext</name></member>
|
||||||
<member><type>VkBool32</type> <name>scalarBlockLayout</name></member>
|
<member><type>VkBool32</type> <name>scalarBlockLayout</name></member>
|
||||||
</type>
|
</type>
|
||||||
|
<type category="struct" name="VkSurfaceProtectedCapabilitiesKHR" structextends="VkSurfaceCapabilities2KHR">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member>const <type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>VkBool32</type> <name>supportsProtected</name><comment>Represents if surface can be protected</comment></member>
|
||||||
|
</type>
|
||||||
<type category="struct" name="VkPhysicalDeviceDepthClipEnableFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
|
<type category="struct" name="VkPhysicalDeviceDepthClipEnableFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
|
||||||
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
<member><type>void</type>* <name>pNext</name><comment>Pointer to next structure</comment></member>
|
<member><type>void</type>* <name>pNext</name><comment>Pointer to next structure</comment></member>
|
||||||
@ -3740,7 +3776,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<type category="struct" name="VkBufferDeviceAddressCreateInfoEXT" structextends="VkBufferCreateInfo">
|
<type category="struct" name="VkBufferDeviceAddressCreateInfoEXT" structextends="VkBufferCreateInfo">
|
||||||
<member values="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
<member values="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
<member>const <type>void</type>* <name>pNext</name></member>
|
<member>const <type>void</type>* <name>pNext</name></member>
|
||||||
<member><type>VkDeviceSize</type> <name>deviceAddress</name></member>
|
<member><type>VkDeviceAddress</type> <name>deviceAddress</name></member>
|
||||||
</type>
|
</type>
|
||||||
<type category="struct" name="VkPhysicalDeviceImageViewImageFormatInfoEXT" structextends="VkPhysicalDeviceImageFormatInfo2">
|
<type category="struct" name="VkPhysicalDeviceImageViewImageFormatInfoEXT" structextends="VkPhysicalDeviceImageFormatInfo2">
|
||||||
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
@ -3788,6 +3824,37 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<member><type>VkDescriptorType</type> <name>descriptorType</name></member>
|
<member><type>VkDescriptorType</type> <name>descriptorType</name></member>
|
||||||
<member optional="true"><type>VkSampler</type> <name>sampler</name></member>
|
<member optional="true"><type>VkSampler</type> <name>sampler</name></member>
|
||||||
</type>
|
</type>
|
||||||
|
<type category="struct" name="VkPresentFrameTokenGGP" structextends="VkPresentInfoKHR">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member>const <type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>GgpFrameToken</type> <name>frameToken</name></member>
|
||||||
|
</type>
|
||||||
|
<type category="struct" name="VkPipelineCreationFeedbackEXT" returnedonly="true">
|
||||||
|
<member><type>VkPipelineCreationFeedbackFlagsEXT</type> <name>flags</name></member>
|
||||||
|
<member><type>uint64_t</type> <name>duration</name></member>
|
||||||
|
</type>
|
||||||
|
<type category="struct" name="VkPipelineCreationFeedbackCreateInfoEXT" structextends="VkGraphicsPipelineCreateInfo,VkComputePipelineCreateInfo,VkRayTracingPipelineCreateInfoNV">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member>const <type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>VkPipelineCreationFeedbackEXT</type>* <name>pPipelineCreationFeedback</name><comment>Output pipeline creation feedback.</comment></member>
|
||||||
|
<member><type>uint32_t</type> <name>pipelineStageCreationFeedbackCount</name></member>
|
||||||
|
<member len="pipelineStageCreationFeedbackCount"><type>VkPipelineCreationFeedbackEXT</type>* <name>pPipelineStageCreationFeedbacks</name><comment>One entry for each shader stage specified in the parent Vk*PipelineCreateInfo struct</comment></member>
|
||||||
|
</type>
|
||||||
|
<type category="struct" name="VkSurfaceFullScreenExclusiveInfoEXT" structextends="VkPhysicalDeviceSurfaceInfo2KHR,VkSwapchainCreateInfoKHR">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member><type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>VkFullScreenExclusiveEXT</type> <name>fullScreenExclusive</name></member>
|
||||||
|
</type>
|
||||||
|
<type category="struct" name="VkSurfaceFullScreenExclusiveWin32InfoEXT" structextends="VkPhysicalDeviceSurfaceInfo2KHR,VkSwapchainCreateInfoKHR">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member>const <type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>HMONITOR</type> <name>hmonitor</name></member>
|
||||||
|
</type>
|
||||||
|
<type category="struct" name="VkSurfaceCapabilitiesFullScreenExclusiveEXT" structextends="VkSurfaceCapabilities2KHR">
|
||||||
|
<member values="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||||
|
<member><type>void</type>* <name>pNext</name></member>
|
||||||
|
<member><type>VkBool32</type> <name>fullScreenExclusiveSupported</name></member>
|
||||||
|
</type>
|
||||||
</types>
|
</types>
|
||||||
|
|
||||||
<comment>Vulkan enumerant (token) definitions</comment>
|
<comment>Vulkan enumerant (token) definitions</comment>
|
||||||
@ -4916,6 +4983,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<enum value="8" name="VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR" comment="Qualcomm Technologies, Inc."/>
|
<enum value="8" name="VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR" comment="Qualcomm Technologies, Inc."/>
|
||||||
<enum value="9" name="VK_DRIVER_ID_ARM_PROPRIETARY_KHR" comment="Arm Limited"/>
|
<enum value="9" name="VK_DRIVER_ID_ARM_PROPRIETARY_KHR" comment="Arm Limited"/>
|
||||||
<enum value="10" name="VK_DRIVER_ID_GOOGLE_PASTEL_KHR" comment="Google LLC"/>
|
<enum value="10" name="VK_DRIVER_ID_GOOGLE_PASTEL_KHR" comment="Google LLC"/>
|
||||||
|
<enum value="11" name="VK_DRIVER_ID_GGP_PROPRIETARY_KHR" comment="Google LLC"/>
|
||||||
</enums>
|
</enums>
|
||||||
<enums name="VkConditionalRenderingFlagBitsEXT" type="bitmask">
|
<enums name="VkConditionalRenderingFlagBitsEXT" type="bitmask">
|
||||||
<enum bitpos="0" name="VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT"/>
|
<enum bitpos="0" name="VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT"/>
|
||||||
@ -5010,6 +5078,17 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<enum value="9" name="VK_COMPONENT_TYPE_UINT32_NV"/>
|
<enum value="9" name="VK_COMPONENT_TYPE_UINT32_NV"/>
|
||||||
<enum value="10" name="VK_COMPONENT_TYPE_UINT64_NV"/>
|
<enum value="10" name="VK_COMPONENT_TYPE_UINT64_NV"/>
|
||||||
</enums>
|
</enums>
|
||||||
|
<enums name="VkPipelineCreationFeedbackFlagBitsEXT" type="bitmask">
|
||||||
|
<enum bitpos="0" name="VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT"/>
|
||||||
|
<enum bitpos="1" name="VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT"/>
|
||||||
|
<enum bitpos="2" name="VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT"/>
|
||||||
|
</enums>
|
||||||
|
<enums name="VkFullScreenExclusiveEXT" type="enum">
|
||||||
|
<enum value="0" name="VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT"/>
|
||||||
|
<enum value="1" name="VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT"/>
|
||||||
|
<enum value="2" name="VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT"/>
|
||||||
|
<enum value="3" name="VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT"/>
|
||||||
|
</enums>
|
||||||
<commands comment="Vulkan command definitions">
|
<commands comment="Vulkan command definitions">
|
||||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_LAYER_NOT_PRESENT,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_INCOMPATIBLE_DRIVER">
|
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_LAYER_NOT_PRESENT,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_INCOMPATIBLE_DRIVER">
|
||||||
<proto><type>VkResult</type> <name>vkCreateInstance</name></proto>
|
<proto><type>VkResult</type> <name>vkCreateInstance</name></proto>
|
||||||
@ -5333,6 +5412,13 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param><type>VkDeviceSize</type> <name>stride</name></param>
|
<param><type>VkDeviceSize</type> <name>stride</name></param>
|
||||||
<param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param>
|
<param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param>
|
||||||
</command>
|
</command>
|
||||||
|
<command>
|
||||||
|
<proto><type>void</type> <name>vkResetQueryPoolEXT</name></proto>
|
||||||
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
|
<param><type>VkQueryPool</type> <name>queryPool</name></param>
|
||||||
|
<param><type>uint32_t</type> <name>firstQuery</name></param>
|
||||||
|
<param><type>uint32_t</type> <name>queryCount</name></param>
|
||||||
|
</command>
|
||||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_DEVICE_ADDRESS_EXT">
|
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_DEVICE_ADDRESS_EXT">
|
||||||
<proto><type>VkResult</type> <name>vkCreateBuffer</name></proto>
|
<proto><type>VkResult</type> <name>vkCreateBuffer</name></proto>
|
||||||
<param><type>VkDevice</type> <name>device</name></param>
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
@ -6066,7 +6152,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param optional="false,true"><type>uint32_t</type>* <name>pPresentModeCount</name></param>
|
<param optional="false,true"><type>uint32_t</type>* <name>pPresentModeCount</name></param>
|
||||||
<param optional="true" len="pPresentModeCount"><type>VkPresentModeKHR</type>* <name>pPresentModes</name></param>
|
<param optional="true" len="pPresentModeCount"><type>VkPresentModeKHR</type>* <name>pPresentModes</name></param>
|
||||||
</command>
|
</command>
|
||||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
|
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR,VK_ERROR_INITIALIZATION_FAILED">
|
||||||
<proto><type>VkResult</type> <name>vkCreateSwapchainKHR</name></proto>
|
<proto><type>VkResult</type> <name>vkCreateSwapchainKHR</name></proto>
|
||||||
<param><type>VkDevice</type> <name>device</name></param>
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
<param externsync="pCreateInfo.surface,pCreateInfo.oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfo</name></param>
|
<param externsync="pCreateInfo.surface,pCreateInfo.oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfo</name></param>
|
||||||
@ -6086,7 +6172,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param optional="false,true"><type>uint32_t</type>* <name>pSwapchainImageCount</name></param>
|
<param optional="false,true"><type>uint32_t</type>* <name>pSwapchainImageCount</name></param>
|
||||||
<param optional="true" len="pSwapchainImageCount"><type>VkImage</type>* <name>pSwapchainImages</name></param>
|
<param optional="true" len="pSwapchainImageCount"><type>VkImage</type>* <name>pSwapchainImages</name></param>
|
||||||
</command>
|
</command>
|
||||||
<command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
|
<command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
|
||||||
<proto><type>VkResult</type> <name>vkAcquireNextImageKHR</name></proto>
|
<proto><type>VkResult</type> <name>vkAcquireNextImageKHR</name></proto>
|
||||||
<param><type>VkDevice</type> <name>device</name></param>
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
|
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
|
||||||
@ -6095,7 +6181,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
|
<param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
|
||||||
<param><type>uint32_t</type>* <name>pImageIndex</name></param>
|
<param><type>uint32_t</type>* <name>pImageIndex</name></param>
|
||||||
</command>
|
</command>
|
||||||
<command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
|
<command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
|
||||||
<proto><type>VkResult</type> <name>vkQueuePresentKHR</name></proto>
|
<proto><type>VkResult</type> <name>vkQueuePresentKHR</name></proto>
|
||||||
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
|
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
|
||||||
<param externsync="pPresentInfo.pWaitSemaphores[],pPresentInfo.pSwapchains[]">const <type>VkPresentInfoKHR</type>* <name>pPresentInfo</name></param>
|
<param externsync="pPresentInfo.pWaitSemaphores[],pPresentInfo.pSwapchains[]">const <type>VkPresentInfoKHR</type>* <name>pPresentInfo</name></param>
|
||||||
@ -6167,6 +6253,13 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
|
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
|
||||||
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
|
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
|
||||||
</command>
|
</command>
|
||||||
|
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
|
||||||
|
<proto><type>VkResult</type> <name>vkCreateStreamDescriptorSurfaceGGP</name></proto>
|
||||||
|
<param><type>VkInstance</type> <name>instance</name></param>
|
||||||
|
<param>const <type>VkStreamDescriptorSurfaceCreateInfoGGP</type>* <name>pCreateInfo</name></param>
|
||||||
|
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
|
||||||
|
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
|
||||||
|
</command>
|
||||||
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
|
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
|
||||||
<proto><type>VkResult</type> <name>vkCreateDebugReportCallbackEXT</name></proto>
|
<proto><type>VkResult</type> <name>vkCreateDebugReportCallbackEXT</name></proto>
|
||||||
<param><type>VkInstance</type> <name>instance</name></param>
|
<param><type>VkInstance</type> <name>instance</name></param>
|
||||||
@ -6564,7 +6657,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
|
<param externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
|
||||||
<param optional="false,true"><type>VkDeviceGroupPresentModeFlagsKHR</type>* <name>pModes</name></param>
|
<param optional="false,true"><type>VkDeviceGroupPresentModeFlagsKHR</type>* <name>pModes</name></param>
|
||||||
</command>
|
</command>
|
||||||
<command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
|
<command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
|
||||||
<proto><type>VkResult</type> <name>vkAcquireNextImage2KHR</name></proto>
|
<proto><type>VkResult</type> <name>vkAcquireNextImage2KHR</name></proto>
|
||||||
<param><type>VkDevice</type> <name>device</name></param>
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
<param>const <type>VkAcquireNextImageInfoKHR</type>* <name>pAcquireInfo</name></param>
|
<param>const <type>VkAcquireNextImageInfoKHR</type>* <name>pAcquireInfo</name></param>
|
||||||
@ -6626,7 +6719,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name></param>
|
<param len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name></param>
|
||||||
<param len="swapchainCount">const <type>VkHdrMetadataEXT</type>* <name>pMetadata</name></param>
|
<param len="swapchainCount">const <type>VkHdrMetadataEXT</type>* <name>pMetadata</name></param>
|
||||||
</command>
|
</command>
|
||||||
<command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
|
<command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
|
||||||
<proto><type>VkResult</type> <name>vkGetSwapchainStatusKHR</name></proto>
|
<proto><type>VkResult</type> <name>vkGetSwapchainStatusKHR</name></proto>
|
||||||
<param><type>VkDevice</type> <name>device</name></param>
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
|
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
|
||||||
@ -6837,6 +6930,11 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param optional="false,true"><type>size_t</type>* <name>pInfoSize</name></param>
|
<param optional="false,true"><type>size_t</type>* <name>pInfoSize</name></param>
|
||||||
<param optional="true" len="pInfoSize"><type>void</type>* <name>pInfo</name></param>
|
<param optional="true" len="pInfoSize"><type>void</type>* <name>pInfo</name></param>
|
||||||
</command>
|
</command>
|
||||||
|
<command>
|
||||||
|
<proto><type>void</type> <name>vkSetLocalDimmingAMD</name></proto>
|
||||||
|
<param><type>VkSwapchainKHR</type> <name>swapChain</name></param>
|
||||||
|
<param><type>VkBool32</type> <name>localDimmingEnable</name></param>
|
||||||
|
</command>
|
||||||
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
|
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
|
||||||
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceCalibrateableTimeDomainsEXT</name></proto>
|
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceCalibrateableTimeDomainsEXT</name></proto>
|
||||||
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
|
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
|
||||||
@ -7216,6 +7314,30 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<param><type>VkDevice</type> <name>device</name></param>
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
<param>const <type>VkImageViewHandleInfoNVX</type>* <name>pInfo</name></param>
|
<param>const <type>VkImageViewHandleInfoNVX</type>* <name>pInfo</name></param>
|
||||||
</command>
|
</command>
|
||||||
|
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
|
||||||
|
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfacePresentModes2EXT</name></proto>
|
||||||
|
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
|
||||||
|
<param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
|
||||||
|
<param optional="false,true"><type>uint32_t</type>* <name>pPresentModeCount</name></param>
|
||||||
|
<param optional="true" len="pPresentModeCount"><type>VkPresentModeKHR</type>* <name>pPresentModes</name></param>
|
||||||
|
</command>
|
||||||
|
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
|
||||||
|
<proto><type>VkResult</type> <name>vkGetDeviceGroupSurfacePresentModes2EXT</name></proto>
|
||||||
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
|
<param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
|
||||||
|
<param optional="false,true"><type>VkDeviceGroupPresentModeFlagsKHR</type>* <name>pModes</name></param>
|
||||||
|
</command>
|
||||||
|
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_SURFACE_LOST_KHR">
|
||||||
|
<proto><type>VkResult</type> <name>vkAcquireFullScreenExclusiveModeEXT</name></proto>
|
||||||
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
|
<param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
|
||||||
|
</command>
|
||||||
|
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
|
||||||
|
<proto><type>VkResult</type> <name>vkReleaseFullScreenExclusiveModeEXT</name></proto>
|
||||||
|
<param><type>VkDevice</type> <name>device</name></param>
|
||||||
|
<param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
|
||||||
|
</command>
|
||||||
|
|
||||||
</commands>
|
</commands>
|
||||||
|
|
||||||
<feature api="vulkan" name="VK_VERSION_1_0" number="1.0" comment="Vulkan core API interface definitions">
|
<feature api="vulkan" name="VK_VERSION_1_0" number="1.0" comment="Vulkan core API interface definitions">
|
||||||
@ -8268,10 +8390,14 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<enum value=""VK_GOOGLE_extension_49"" name="VK_GOOGLE_EXTENSION_49_EXTENSION_NAME"/>
|
<enum value=""VK_GOOGLE_extension_49"" name="VK_GOOGLE_EXTENSION_49_EXTENSION_NAME"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_GOOGLE_extension_50" number="50" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
|
<extension name="VK_GGP_stream_descriptor_surface" number="50" type="instance" requires="VK_KHR_surface" platform="ggp" author="GGP" contact="Jean-Francois Roy @jfroy" supported="vulkan">
|
||||||
<require>
|
<require>
|
||||||
<enum value="0" name="VK_GOOGLE_EXTENSION_50_SPEC_VERSION"/>
|
<enum value="1" name="VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION"/>
|
||||||
<enum value=""VK_GOOGLE_extension_50"" name="VK_GOOGLE_EXTENSION_50_EXTENSION_NAME"/>
|
<enum value=""VK_GGP_stream_descriptor_surface"" name="VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME"/>
|
||||||
|
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP"/>
|
||||||
|
<type name="VkStreamDescriptorSurfaceCreateFlagsGGP"/>
|
||||||
|
<type name="VkStreamDescriptorSurfaceCreateInfoGGP"/>
|
||||||
|
<command name="vkCreateStreamDescriptorSurfaceGGP"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_NV_corner_sampled_image" number="51" author="NV" type="device" requires="VK_KHR_get_physical_device_properties2" contact="Daniel Koch @dgkoch" supported="vulkan">
|
<extension name="VK_NV_corner_sampled_image" number="51" author="NV" type="device" requires="VK_KHR_get_physical_device_properties2" contact="Daniel Koch @dgkoch" supported="vulkan">
|
||||||
@ -8454,6 +8580,9 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<type name="VkDeviceGroupSwapchainCreateInfoKHR"/>
|
<type name="VkDeviceGroupSwapchainCreateInfoKHR"/>
|
||||||
<command name="vkAcquireNextImage2KHR"/>
|
<command name="vkAcquireNextImage2KHR"/>
|
||||||
</require>
|
</require>
|
||||||
|
<require extension="VK_EXT_full_screen_exclusive">
|
||||||
|
<command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
|
||||||
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_EXT_validation_flags" number="62" type="instance" author="GOOGLE" contact="Tobin Ehlis @tobine" supported="vulkan">
|
<extension name="VK_EXT_validation_flags" number="62" type="instance" author="GOOGLE" contact="Tobin Ehlis @tobine" supported="vulkan">
|
||||||
<require>
|
<require>
|
||||||
@ -10052,16 +10181,23 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<type name="VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT"/>
|
<type name="VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_GOOGLE_extension_192" number="192" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
|
<extension name="VK_GGP_frame_token" number="192" type="device" requires="VK_KHR_swapchain,VK_GGP_stream_descriptor_surface" platform="ggp" author="GGP" contact="Jean-Francois Roy @jfroy" supported="vulkan">
|
||||||
<require>
|
<require>
|
||||||
<enum value="0" name="VK_GOOGLE_EXTENSION_192_SPEC_VERSION"/>
|
<enum value="1" name="VK_GGP_FRAME_TOKEN_SPEC_VERSION"/>
|
||||||
<enum value=""VK_GOOGLE_extension_192"" name="VK_GOOGLE_EXTENSION_192_EXTENSION_NAME"/>
|
<enum value=""VK_GGP_frame_token"" name="VK_GGP_FRAME_TOKEN_EXTENSION_NAME"/>
|
||||||
|
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP"/>
|
||||||
|
<type name="VkPresentFrameTokenGGP"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_GOOGLE_extension_193" number="193" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
|
<extension name="VK_EXT_pipeline_creation_feedback" number="193" type="device" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="vulkan">
|
||||||
<require>
|
<require>
|
||||||
<enum value="0" name="VK_GOOGLE_EXTENSION_193_SPEC_VERSION"/>
|
<enum value="1" name="VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION"/>
|
||||||
<enum value=""VK_GOOGLE_extension_193"" name="VK_GOOGLE_EXTENSION_193_EXTENSION_NAME"/>
|
<enum value=""VK_EXT_pipeline_creation_feedback"" name="VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME"/>
|
||||||
|
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT"/>
|
||||||
|
<type name="VkPipelineCreationFeedbackFlagBitsEXT"/>
|
||||||
|
<type name="VkPipelineCreationFeedbackFlagsEXT"/>
|
||||||
|
<type name="VkPipelineCreationFeedbackCreateInfoEXT"/>
|
||||||
|
<type name="VkPipelineCreationFeedbackEXT"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_GOOGLE_extension_194" number="194" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
|
<extension name="VK_GOOGLE_extension_194" number="194" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
|
||||||
@ -10233,10 +10369,16 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<type name="VkPhysicalDevicePCIBusInfoPropertiesEXT"/>
|
<type name="VkPhysicalDevicePCIBusInfoPropertiesEXT"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_AMD_extension_214" number="214" author="AMD" contact="Neil Henning @sheredom" supported="disabled">
|
<extension name="VK_AMD_display_native_hdr" number="214" type="device" author="AMD" requires="VK_KHR_get_physical_device_properties2,VK_KHR_get_surface_capabilities2,VK_KHR_swapchain" contact="Matthaeus G. Chajdas @anteru" supported="vulkan">
|
||||||
<require>
|
<require>
|
||||||
<enum value="0" name="VK_KHR_EXTENSION_214_SPEC_VERSION"/>
|
<enum value="1" name="VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION"/>
|
||||||
<enum value=""VK_KHR_extension_214"" name="VK_KHR_EXTENSION_214_EXTENSION_NAME"/>
|
<enum value=""VK_AMD_display_native_hdr"" name="VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME"/>
|
||||||
|
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD"/>
|
||||||
|
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD"/>
|
||||||
|
<enum offset="0" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DISPLAY_NATIVE_AMD"/>
|
||||||
|
<type name="VkDisplayNativeHdrSurfaceCapabilitiesAMD"/>
|
||||||
|
<type name="VkSwapchainDisplayNativeHdrCreateInfoAMD"/>
|
||||||
|
<command name="vkSetLocalDimmingAMD"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_FUCHSIA_imagepipe_surface" number="215" type="instance" author="FUCHSIA" requires="VK_KHR_surface" platform="fuchsia" contact="Craig Stout @cdotstout" supported="vulkan">
|
<extension name="VK_FUCHSIA_imagepipe_surface" number="215" type="instance" author="FUCHSIA" requires="VK_KHR_surface" platform="fuchsia" contact="Craig Stout @cdotstout" supported="vulkan">
|
||||||
@ -10421,10 +10563,12 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<type name="VkMemoryPriorityAllocateInfoEXT"/>
|
<type name="VkMemoryPriorityAllocateInfoEXT"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_KHR_extension_240" number="240" author="KHR" contact="Sandeep Shinde @nvidia" supported="disabled">
|
<extension name="VK_KHR_surface_protected_capabilities" number="240" type="instance" requiresCore="1.1" requires="VK_KHR_get_surface_capabilities2" author="KHR" contact="Sandeep Shinde @sashinde" supported="vulkan">
|
||||||
<require>
|
<require>
|
||||||
<enum value="0" name="VK_KHR_EXTENSION_240_SPEC_VERSION"/>
|
<enum value="1" name="VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION"/>
|
||||||
<enum value=""VK_KHR_extension_240"" name="VK_KHR_EXTENSION_240_EXTENSION_NAME"/>
|
<enum value=""VK_KHR_surface_protected_capabilities"" name="VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME"/>
|
||||||
|
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR"/>
|
||||||
|
<type name="VkSurfaceProtectedCapabilitiesKHR"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_NV_dedicated_allocation_image_aliasing" number="241" type="device" requires="VK_KHR_dedicated_allocation" author="NVIDIA" contact="Nuno Subtil @nsubtil" supported="vulkan">
|
<extension name="VK_NV_dedicated_allocation_image_aliasing" number="241" type="device" requires="VK_KHR_dedicated_allocation" author="NVIDIA" contact="Nuno Subtil @nsubtil" supported="vulkan">
|
||||||
@ -10544,10 +10688,26 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<enum value=""VK_EXT_extension_255"" name="VK_EXT_EXTENSION_255_EXTENSION_NAME"/>
|
<enum value=""VK_EXT_extension_255"" name="VK_EXT_EXTENSION_255_EXTENSION_NAME"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_EXT_extension_256" number="256" author="EXT" contact="James Jones @cubanismo" supported="disabled">
|
<extension name="VK_EXT_full_screen_exclusive" number="256" type="device" author="EXT" requires="VK_KHR_get_physical_device_properties2,VK_KHR_surface,VK_KHR_get_surface_capabilities2,VK_KHR_swapchain" platform="win32" contact="James Jones @cubanismo" supported="vulkan">
|
||||||
<require>
|
<require>
|
||||||
<enum value="0" name="VK_EXT_EXTENSION_256_SPEC_VERSION"/>
|
<enum value="3" name="VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION"/>
|
||||||
<enum value=""VK_EXT_extension_256"" name="VK_EXT_EXTENSION_256_EXTENSION_NAME"/>
|
<enum value=""VK_EXT_full_screen_exclusive"" name="VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME"/>
|
||||||
|
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT"/>
|
||||||
|
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT"/>
|
||||||
|
<enum offset="0" extends="VkResult" dir="-" name="VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"/>
|
||||||
|
<type name="VkFullScreenExclusiveEXT"/>
|
||||||
|
<type name="VkSurfaceFullScreenExclusiveInfoEXT"/>
|
||||||
|
<type name="VkSurfaceCapabilitiesFullScreenExclusiveEXT"/>
|
||||||
|
<command name="vkGetPhysicalDeviceSurfacePresentModes2EXT"/>
|
||||||
|
<command name="vkAcquireFullScreenExclusiveModeEXT"/>
|
||||||
|
<command name="vkReleaseFullScreenExclusiveModeEXT"/>
|
||||||
|
</require>
|
||||||
|
<require feature="VK_KHR_win32_surface">
|
||||||
|
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT"/>
|
||||||
|
<type name="VkSurfaceFullScreenExclusiveWin32InfoEXT"/>
|
||||||
|
</require>
|
||||||
|
<require feature="VK_VERSION_1_1">
|
||||||
|
<command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
<extension name="VK_EXT_extension_257" number="257" author="EXT" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
|
<extension name="VK_EXT_extension_257" number="257" author="EXT" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
|
||||||
@ -10580,5 +10740,14 @@ typedef void <name>CAMetalLayer</name>;
|
|||||||
<enum value=""VK_NV_extension_261"" name="VK_NV_EXTENSION_261_EXTENSION_NAME"/>
|
<enum value=""VK_NV_extension_261"" name="VK_NV_EXTENSION_261_EXTENSION_NAME"/>
|
||||||
</require>
|
</require>
|
||||||
</extension>
|
</extension>
|
||||||
|
<extension name="VK_EXT_host_query_reset" number="262" author="EXT" contact="Bas Nieuwenhuizen @BNieuwenhuizen" supported="vulkan" type="device" requires="VK_KHR_get_physical_device_properties2">
|
||||||
|
<require>
|
||||||
|
<enum value="1" name="VK_EXT_HOST_QUERY_RESET_SPEC_VERSION"/>
|
||||||
|
<enum value=""VK_EXT_host_query_reset"" name="VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME"/>
|
||||||
|
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT"/>
|
||||||
|
<type name="VkPhysicalDeviceHostQueryResetFeaturesEXT"/>
|
||||||
|
<command name="vkResetQueryPoolEXT"/>
|
||||||
|
</require>
|
||||||
|
</extension>
|
||||||
</extensions>
|
</extensions>
|
||||||
</registry>
|
</registry>
|
||||||
|
214
registry/vkconventions.py
Normal file
214
registry/vkconventions.py
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
#!/usr/bin/python3 -i
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013-2019 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.
|
||||||
|
|
||||||
|
# Working-group-specific style conventions,
|
||||||
|
# used in generation.
|
||||||
|
|
||||||
|
from conventions import ConventionsBase
|
||||||
|
|
||||||
|
|
||||||
|
class VulkanConventions(ConventionsBase):
|
||||||
|
def formatExtension(self, name):
|
||||||
|
"""Mark up a name as an extension for the spec."""
|
||||||
|
return '`<<{}>>`'.format(name)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def null(self):
|
||||||
|
"""Preferred spelling of NULL."""
|
||||||
|
return '`NULL`'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def constFlagBits(self):
|
||||||
|
"""Returns True if static const flag bits should be generated, False if an enumerated type should be generated."""
|
||||||
|
return False
|
||||||
|
|
||||||
|
@property
|
||||||
|
def struct_macro(self):
|
||||||
|
return 'sname:'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def external_macro(self):
|
||||||
|
return 'code:'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def structtype_member_name(self):
|
||||||
|
"""Return name of the structure type member"""
|
||||||
|
return 'sType'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def nextpointer_member_name(self):
|
||||||
|
"""Return name of the structure pointer chain member"""
|
||||||
|
return 'pNext'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def valid_pointer_prefix(self):
|
||||||
|
"""Return prefix to pointers which must themselves be valid"""
|
||||||
|
return 'valid'
|
||||||
|
|
||||||
|
def is_structure_type_member(self, paramtype, paramname):
|
||||||
|
"""Determine if member type and name match the structure type member."""
|
||||||
|
return paramtype == 'VkStructureType' and paramname == self.structtype_member_name
|
||||||
|
|
||||||
|
def is_nextpointer_member(self, paramtype, paramname):
|
||||||
|
"""Determine if member type and name match the next pointer chain member."""
|
||||||
|
return paramtype == 'void' and paramname == self.nextpointer_member_name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def warning_comment(self):
|
||||||
|
"""Return warning comment to be placed in header of generated Asciidoctor files"""
|
||||||
|
return '// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def file_suffix(self):
|
||||||
|
"""Return suffix of generated Asciidoctor files"""
|
||||||
|
return '.txt'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def api_name(self):
|
||||||
|
"""Return API name"""
|
||||||
|
return 'Vulkan'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def xml_supported_name_of_api(self):
|
||||||
|
"""Return the supported= attribute used in API XML"""
|
||||||
|
return 'vulkan'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def api_prefix(self):
|
||||||
|
"""Return API token prefix"""
|
||||||
|
return 'VK_'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def api_version_prefix(self):
|
||||||
|
"""Return API core version token prefix"""
|
||||||
|
return 'VK_VERSION_'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def KHR_prefix(self):
|
||||||
|
"""Return extension name prefix for KHR extensions"""
|
||||||
|
return 'VK_KHR_'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def EXT_prefix(self):
|
||||||
|
"""Return extension name prefix for EXT extensions"""
|
||||||
|
return 'VK_EXT_'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def write_contacts(self):
|
||||||
|
"""Return whether contact list should be written to extension appendices"""
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def write_refpage_include(self):
|
||||||
|
"""Return whether refpage include should be written to extension appendices"""
|
||||||
|
return True
|
||||||
|
|
||||||
|
def writeFeature(self, featureExtraProtect, filename):
|
||||||
|
"""Returns True if OutputGenerator.endFeature should write this feature.
|
||||||
|
Used in COutputGenerator
|
||||||
|
"""
|
||||||
|
return True
|
||||||
|
|
||||||
|
def requires_error_validation(self, return_type):
|
||||||
|
"""Returns True if the return_type element is an API result code
|
||||||
|
requiring error validation.
|
||||||
|
"""
|
||||||
|
return False
|
||||||
|
|
||||||
|
@property
|
||||||
|
def required_errors(self):
|
||||||
|
"""Return a list of required error codes for validation."""
|
||||||
|
return []
|
||||||
|
|
||||||
|
def is_externsync_command(self, protoname):
|
||||||
|
"""Returns True if the protoname element is an API command requiring
|
||||||
|
external synchronization
|
||||||
|
"""
|
||||||
|
return protoname is not None and 'vkCmd' in protoname
|
||||||
|
|
||||||
|
def is_api_name(self, name):
|
||||||
|
"""Returns True if name is in the reserved API namespace.
|
||||||
|
For Vulkan, these are names with a case-insensitive 'vk' prefix, or
|
||||||
|
a 'PFN_vk' function pointer type prefix.
|
||||||
|
"""
|
||||||
|
return name[0:2].lower() == 'vk' or name[0:6] == 'PFN_vk'
|
||||||
|
|
||||||
|
def is_voidpointer_alias(self, tag, text, tail):
|
||||||
|
"""Return True if the declaration components (tag,text,tail) of an
|
||||||
|
element represents a void * type
|
||||||
|
"""
|
||||||
|
return tag == 'type' and text == 'void' and tail.startswith('*')
|
||||||
|
|
||||||
|
def make_voidpointer_alias(self, tail):
|
||||||
|
"""Reformat a void * declaration to include the API alias macro.
|
||||||
|
Vulkan doesn't have an API alias macro, so do nothing.
|
||||||
|
"""
|
||||||
|
return tail
|
||||||
|
|
||||||
|
@property
|
||||||
|
def specURL(self):
|
||||||
|
"""Return public registry URL which ref pages should link to for the
|
||||||
|
current all-extensions HTML specification, so xrefs in the
|
||||||
|
asciidoc source that aren't to ref pages can link into it
|
||||||
|
instead. N.b. this may need to change on a per-refpage basis if
|
||||||
|
there are multiple documents involved.
|
||||||
|
"""
|
||||||
|
return 'https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def xml_api_name(self):
|
||||||
|
"""Return the name used in the default API XML registry for the default API"""
|
||||||
|
return 'vulkan'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def registry_path(self):
|
||||||
|
"""Return relpath to the default API XML registry in this project."""
|
||||||
|
return 'xml/vk.xml'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def specification_path(self):
|
||||||
|
"""Return relpath to the Asciidoctor specification sources in this project."""
|
||||||
|
return '../appendices/meta'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def extra_refpage_headers(self):
|
||||||
|
"""Return any extra text to add to refpage headers."""
|
||||||
|
return 'include::../config/attribs.txt[]'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def extension_index_prefixes(self):
|
||||||
|
"""Return a list of extension prefixes used to group extension refpages."""
|
||||||
|
return ['VK_KHR', 'VK_EXT', 'VK']
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unified_flag_refpages(self):
|
||||||
|
"""Returns True if Flags/FlagBits refpages are unified, False if
|
||||||
|
they're separate.
|
||||||
|
"""
|
||||||
|
return False
|
||||||
|
|
||||||
|
@property
|
||||||
|
def spec_reflow_path(self):
|
||||||
|
"""Return the relative path to the spec source folder to reflow"""
|
||||||
|
return '.'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def spec_no_reflow_dirs(self):
|
||||||
|
"""Return a set of directories not to automatically descend into
|
||||||
|
when reflowing spec text
|
||||||
|
"""
|
||||||
|
return ('scripts', 'style')
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user