zink: fix detection of KHR_maintenance1/2

Since some extensions never got their dedicated feature structs, not all
extensions promoted to core Vulkan have the relevant feature bits in
`VkPhysicalDeviceVulkanXYFeatures`. Those extensions are supported by
the device when the device version is high enough.

For those extensions, set the screen flags directly if the device
version is sufficient, otherwise check for the extension as usual.

Fixes: efe6f00e ("zink/codegen: do not enable extensions that are now core")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9030>
This commit is contained in:
Hoe Hao Cheng
2021-02-14 02:29:34 +08:00
committed by Marge Bot
parent 83eebadf92
commit a5685e4dd0
+5 -1
View File
@@ -270,6 +270,10 @@ zink_get_physical_device_info(struct zink_screen *screen)
if (!strcmp(extensions[i].extensionName, "${ext.name}")) {
support_${ext.name_with_vendor()} = true;
}
%if not (ext.has_features or ext.has_properties):
} else {
info->have_${ext.name_with_vendor()} = true;
%endif
}
%endif
%endfor
@@ -359,7 +363,7 @@ zink_get_physical_device_info(struct zink_screen *screen)
conditions += "&& (" + cond + ")\\n"
conditions = conditions.strip()
%>\
info->have_${ext.name_with_vendor()} = support_${ext.name_with_vendor()}
info->have_${ext.name_with_vendor()} |= support_${ext.name_with_vendor()}
${conditions};
</%helpers:guard>
%endfor