From a5685e4dd0ad551f1382277f9d1c970f5d5f126e Mon Sep 17 00:00:00 2001 From: Hoe Hao Cheng Date: Sun, 14 Feb 2021 02:29:34 +0800 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/zink/zink_device_info.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_device_info.py b/src/gallium/drivers/zink/zink_device_info.py index 726ea887f45..da41d2c4539 100644 --- a/src/gallium/drivers/zink/zink_device_info.py +++ b/src/gallium/drivers/zink/zink_device_info.py @@ -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}; %endfor