mirror of
https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
synced 2025-05-15 09:18:49 +00:00
scripts: Manual VK_ENABLE_BETA_EXTENSIONS
This commit is contained in:
parent
42b34ac73e
commit
07ca0f6962
6 changed files with 32 additions and 0 deletions
|
@ -14108,6 +14108,7 @@ struct safe_VkDeviceDiagnosticsConfigCreateInfoNV {
|
|||
return reinterpret_cast<VkDeviceDiagnosticsConfigCreateInfoNV const*>(this);
|
||||
}
|
||||
};
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
struct safe_VkCudaModuleCreateInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext{};
|
||||
|
@ -14209,6 +14210,7 @@ struct safe_VkPhysicalDeviceCudaKernelLaunchPropertiesNV {
|
|||
return reinterpret_cast<VkPhysicalDeviceCudaKernelLaunchPropertiesNV const*>(this);
|
||||
}
|
||||
};
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
struct safe_VkQueryLowLatencySupportNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext{};
|
||||
|
@ -20291,6 +20293,7 @@ struct safe_VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT {
|
|||
return reinterpret_cast<VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT const*>(this);
|
||||
}
|
||||
};
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
struct safe_VkSetPresentConfigNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext{};
|
||||
|
@ -20325,6 +20328,7 @@ struct safe_VkPhysicalDevicePresentMeteringFeaturesNV {
|
|||
return reinterpret_cast<VkPhysicalDevicePresentMeteringFeaturesNV const*>(this);
|
||||
}
|
||||
};
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
struct safe_VkAccelerationStructureGeometryTrianglesDataKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext{};
|
||||
|
|
|
@ -743,11 +743,13 @@ template <> inline VkStructureType GetSType<VkSurfaceCapabilitiesPresentBarrierN
|
|||
template <> inline VkStructureType GetSType<VkSwapchainPresentBarrierCreateInfoNV>() { return VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV; }
|
||||
template <> inline VkStructureType GetSType<VkPhysicalDeviceDiagnosticsConfigFeaturesNV>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV; }
|
||||
template <> inline VkStructureType GetSType<VkDeviceDiagnosticsConfigCreateInfoNV>() { return VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV; }
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
template <> inline VkStructureType GetSType<VkCudaModuleCreateInfoNV>() { return VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV; }
|
||||
template <> inline VkStructureType GetSType<VkCudaFunctionCreateInfoNV>() { return VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV; }
|
||||
template <> inline VkStructureType GetSType<VkCudaLaunchInfoNV>() { return VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV; }
|
||||
template <> inline VkStructureType GetSType<VkPhysicalDeviceCudaKernelLaunchFeaturesNV>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV; }
|
||||
template <> inline VkStructureType GetSType<VkPhysicalDeviceCudaKernelLaunchPropertiesNV>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV; }
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
template <> inline VkStructureType GetSType<VkQueryLowLatencySupportNV>() { return VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV; }
|
||||
#ifdef VK_USE_PLATFORM_METAL_EXT
|
||||
template <> inline VkStructureType GetSType<VkExportMetalObjectCreateInfoEXT>() { return VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT; }
|
||||
|
@ -1051,8 +1053,10 @@ template <> inline VkStructureType GetSType<VkMemoryMetalHandlePropertiesEXT>()
|
|||
template <> inline VkStructureType GetSType<VkMemoryGetMetalHandleInfoEXT>() { return VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT; }
|
||||
#endif // VK_USE_PLATFORM_METAL_EXT
|
||||
template <> inline VkStructureType GetSType<VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT; }
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
template <> inline VkStructureType GetSType<VkSetPresentConfigNV>() { return VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV; }
|
||||
template <> inline VkStructureType GetSType<VkPhysicalDevicePresentMeteringFeaturesNV>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV; }
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
template <> inline VkStructureType GetSType<VkAccelerationStructureGeometryTrianglesDataKHR>() { return VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR; }
|
||||
template <> inline VkStructureType GetSType<VkAccelerationStructureGeometryAabbsDataKHR>() { return VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR; }
|
||||
template <> inline VkStructureType GetSType<VkAccelerationStructureGeometryInstancesDataKHR>() { return VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR; }
|
||||
|
|
|
@ -134,6 +134,12 @@ class SafeStructOutputGenerator(BaseGenerator):
|
|||
return False
|
||||
|
||||
def generate(self):
|
||||
# Should be fixed in 1.4.310 headers
|
||||
# https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/7196
|
||||
manual_protect = ["VkCudaModuleNV", "VkCudaFunctionNV", "VkCudaModuleCreateInfoNV", "VkCudaFunctionCreateInfoNV", "VkCudaLaunchInfoNV", "VkPhysicalDeviceCudaKernelLaunchFeaturesNV", "VkPhysicalDeviceCudaKernelLaunchPropertiesNV", "VkSetPresentConfigNV", "VkPhysicalDevicePresentMeteringFeaturesNV"]
|
||||
for struct in [x for x in self.vk.structs.values() if x.name in manual_protect]:
|
||||
struct.protect = "VK_ENABLE_BETA_EXTENSIONS"
|
||||
|
||||
self.write(f'''// *** THIS FILE IS GENERATED - DO NOT EDIT ***
|
||||
// See {os.path.basename(__file__)} for modifications
|
||||
|
||||
|
|
|
@ -27,6 +27,12 @@ class StructHelperOutputGenerator(BaseGenerator):
|
|||
BaseGenerator.__init__(self)
|
||||
|
||||
def generate(self):
|
||||
# Should be fixed in 1.4.310 headers
|
||||
# https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/7196
|
||||
manual_protect = ["VkCudaModuleNV", "VkCudaFunctionNV", "VkCudaModuleCreateInfoNV", "VkCudaFunctionCreateInfoNV", "VkCudaLaunchInfoNV", "VkPhysicalDeviceCudaKernelLaunchFeaturesNV", "VkPhysicalDeviceCudaKernelLaunchPropertiesNV", "VkSetPresentConfigNV", "VkPhysicalDevicePresentMeteringFeaturesNV"]
|
||||
for struct in [x for x in self.vk.structs.values() if x.name in manual_protect]:
|
||||
struct.protect = "VK_ENABLE_BETA_EXTENSIONS"
|
||||
|
||||
out = []
|
||||
out.append(f'''// *** THIS FILE IS GENERATED - DO NOT EDIT ***
|
||||
// See {os.path.basename(__file__)} for modifications
|
||||
|
|
|
@ -1380,12 +1380,14 @@ void *SafePnextCopy(const void *pNext, PNextCopyState* copy_state) {
|
|||
case VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV:
|
||||
safe_pNext = new safe_VkDeviceDiagnosticsConfigCreateInfoNV(reinterpret_cast<const VkDeviceDiagnosticsConfigCreateInfoNV *>(pNext), copy_state, false);
|
||||
break;
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV:
|
||||
safe_pNext = new safe_VkPhysicalDeviceCudaKernelLaunchFeaturesNV(reinterpret_cast<const VkPhysicalDeviceCudaKernelLaunchFeaturesNV *>(pNext), copy_state, false);
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV:
|
||||
safe_pNext = new safe_VkPhysicalDeviceCudaKernelLaunchPropertiesNV(reinterpret_cast<const VkPhysicalDeviceCudaKernelLaunchPropertiesNV *>(pNext), copy_state, false);
|
||||
break;
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
case VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV:
|
||||
safe_pNext = new safe_VkQueryLowLatencySupportNV(reinterpret_cast<const VkQueryLowLatencySupportNV *>(pNext), copy_state, false);
|
||||
break;
|
||||
|
@ -2025,12 +2027,14 @@ void *SafePnextCopy(const void *pNext, PNextCopyState* copy_state) {
|
|||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT:
|
||||
safe_pNext = new safe_VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT(reinterpret_cast<const VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT *>(pNext), copy_state, false);
|
||||
break;
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
case VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV:
|
||||
safe_pNext = new safe_VkSetPresentConfigNV(reinterpret_cast<const VkSetPresentConfigNV *>(pNext), copy_state, false);
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV:
|
||||
safe_pNext = new safe_VkPhysicalDevicePresentMeteringFeaturesNV(reinterpret_cast<const VkPhysicalDevicePresentMeteringFeaturesNV *>(pNext), copy_state, false);
|
||||
break;
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR:
|
||||
safe_pNext = new safe_VkWriteDescriptorSetAccelerationStructureKHR(reinterpret_cast<const VkWriteDescriptorSetAccelerationStructureKHR *>(pNext), copy_state, false);
|
||||
break;
|
||||
|
@ -3427,12 +3431,14 @@ void FreePnextChain(const void *pNext) {
|
|||
case VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV:
|
||||
delete reinterpret_cast<safe_VkDeviceDiagnosticsConfigCreateInfoNV *>(header);
|
||||
break;
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV:
|
||||
delete reinterpret_cast<safe_VkPhysicalDeviceCudaKernelLaunchFeaturesNV *>(header);
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV:
|
||||
delete reinterpret_cast<safe_VkPhysicalDeviceCudaKernelLaunchPropertiesNV *>(header);
|
||||
break;
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
case VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV:
|
||||
delete reinterpret_cast<safe_VkQueryLowLatencySupportNV *>(header);
|
||||
break;
|
||||
|
@ -4072,12 +4078,14 @@ void FreePnextChain(const void *pNext) {
|
|||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT:
|
||||
delete reinterpret_cast<safe_VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT *>(header);
|
||||
break;
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
case VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV:
|
||||
delete reinterpret_cast<safe_VkSetPresentConfigNV *>(header);
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV:
|
||||
delete reinterpret_cast<safe_VkPhysicalDevicePresentMeteringFeaturesNV *>(header);
|
||||
break;
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR:
|
||||
delete reinterpret_cast<safe_VkWriteDescriptorSetAccelerationStructureKHR *>(header);
|
||||
break;
|
||||
|
|
|
@ -7909,6 +7909,7 @@ void safe_VkDeviceDiagnosticsConfigCreateInfoNV::initialize(const safe_VkDeviceD
|
|||
flags = copy_src->flags;
|
||||
pNext = SafePnextCopy(copy_src->pNext);
|
||||
}
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
|
||||
safe_VkCudaModuleCreateInfoNV::safe_VkCudaModuleCreateInfoNV(const VkCudaModuleCreateInfoNV* in_struct,
|
||||
[[maybe_unused]] PNextCopyState* copy_state, bool copy_pnext)
|
||||
|
@ -8272,6 +8273,7 @@ void safe_VkPhysicalDeviceCudaKernelLaunchPropertiesNV::initialize(
|
|||
computeCapabilityMajor = copy_src->computeCapabilityMajor;
|
||||
pNext = SafePnextCopy(copy_src->pNext);
|
||||
}
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
|
||||
safe_VkQueryLowLatencySupportNV::safe_VkQueryLowLatencySupportNV(const VkQueryLowLatencySupportNV* in_struct,
|
||||
[[maybe_unused]] PNextCopyState* copy_state, bool copy_pnext)
|
||||
|
@ -17714,6 +17716,7 @@ void safe_VkPhysicalDevicePipelineOpacityMicromapFeaturesARM::initialize(
|
|||
pipelineOpacityMicromap = copy_src->pipelineOpacityMicromap;
|
||||
pNext = SafePnextCopy(copy_src->pNext);
|
||||
}
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
|
||||
safe_VkSetPresentConfigNV::safe_VkSetPresentConfigNV(const VkSetPresentConfigNV* in_struct,
|
||||
[[maybe_unused]] PNextCopyState* copy_state, bool copy_pnext)
|
||||
|
@ -17812,6 +17815,7 @@ void safe_VkPhysicalDevicePresentMeteringFeaturesNV::initialize(const safe_VkPhy
|
|||
presentMetering = copy_src->presentMetering;
|
||||
pNext = SafePnextCopy(copy_src->pNext);
|
||||
}
|
||||
#endif // VK_ENABLE_BETA_EXTENSIONS
|
||||
|
||||
} // namespace vku
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue