layers incorrectly rewrite extensions list
lunarpapillo opened this issue · 5 comments
This was found during SDK vkconfig
testing.
Launch vkconfig
. Inside vkconfig
, launch hwcapsviewer
, and look at the Extensions tab. Note that there is no VK_KHR_shader_object
or VK_KHR_synchronization2
extension reported:
In vkconfig
, create a layer configuration with VK_LAYER_KHRONOS_synchronization2
and VK_LAYER_KHRONOS_shader_object
forced on. In their settings, they should both have ☑ Force Enable selected. Launch hwcapsviewer
from inside vkconfig
again, and again check the list of extensions reported.
There are two observed issues here, both with the reported list of extensions. @christophe-lunarg suspects that one or both of the layers VK_LAYER_KHRONOS_synchronization2
and VK_LAYER_KHRONOS_shader_object
fail to rewrite the reported extension list correctly.
VK_KHR_synchronization2
is not listed.VK_EXT_vertex_attribute_divisor
was shown before the layers were activated; it disappeared after the layers were activated.
I went through the various options and reported what I saw in the caps viewer, which differs slightly from what is reported here. This was done on Windows using the latest SDK (1.3.261, which is in development).
The gist is that the properties & features of an extension are only present if the respective structs appear in pNext chains - which depends on the layers adding them.
Because Sync2 doesn't define any properties, sync2 never appears in the Properties->extensions list. It does appear in the features->extensions list, as well as just the raw list of extensions.
On windows, I did not see any different in output based on whether the Force Enabled option was set in either layer.
Note that because my GPU supports sync2, they appear twice in the output.
The double reporting does look wrong - but that is probably a separate issue to the one initially reported, that the extension doesn't appear at all unless the layer is enabled through vkconfig (it may appear if the layer is enabled through other mechanisms, but I did not test that).
To respond to the two reported issues: VK_KHR_synchronization2 is not listed in properties->extensions
because sync2 has no properties struct. It never appeared no matter what when I tested things. Don't expect sync2 to appear there. In other words, user error with VulkanCapsViewer gives misleading results.
Also - VK_EXT_vertex_attribute_divisor is always removed whenever shader_object is active because they are incompatible. The disappearance is expected.
I recommend closing this issue - both things reported by bob are expected behavior.
Christophes double reporting of sync2 is now in its own issue, #303, to better track things.