Limit device core vulkan version to declared instance version

* This prevents us from returning function pointers that should be NULL for core
  functionality (or promoted extension functionality) which an application may
  see and then try to call. The spec requires us to return NULL for these cases
  (except for non-maint5 future core versions, but we can legally return NULL
  there and that's the correct thing to do as the maint5 feature bit is stupid).
This commit is contained in:
baldurk committed 2023-11-15 14:51:04 +00:00
1 parent d9fd975138
commit 0ed8c5eb4c
1 file changed
+2 -1
@@ -4159,7 +4159,8 @@ VkResult WrappedVulkan::vkCreateDevice(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties physProps;
ObjDisp(physicalDevice)->GetPhysicalDeviceProperties(Unwrap(physicalDevice), &physProps);
record->instDevInfo->vulkanVersion = physProps.apiVersion;
record->instDevInfo->vulkanVersion =
RDCMIN(physProps.apiVersion, GetRecord(m_Instance)->instDevInfo->vulkanVersion);
#undef CheckExt
#define CheckExt(name, ver) \