Zink: enabled extensions and features may not match
When running on radv a validation error VUID-VkDeviceCreateInfo-pNext-pNext is reported:
vkCreateDevice(): pCreateInfo->pNext<VkPhysicalDeviceComputeShaderDerivativesFeaturesNV>
includes a pointer to a VkPhysicalDeviceComputeShaderDerivativesFeaturesNV, but when
creating VkDevice, the parent extension (VK_NV_compute_shader_derivatives) was not
included in ppEnabledExtensionNames.
From what I can see the generated code for zink_device_info.c
first reads all extensions exposed by the host driver. Based on this the screen->info
data is filled to query the extension features. Then these features are used to updated the screen->info->have_<extension>
values, and the latter are then used to fill the list of extensions in screen->info->extensions
. If a required feature is missing, then the extension is left out from that list, but is still in the pCreateInfo->pNext
chain triggering the validation error.
To fix this one would have to re-generate the pNext
chain in screen->info
after the screen->info->have_<extension>
values are set, probably in parallel with filling the extensions list. I might tackle this later on, but if someone with a better understanding of the python/mako code could step in that would probably be better.