ARB_spirv_extensions: need to separate capabilities supported from extensions
From SPIR-V spec:
A SPIR-V module is consumed by an execution environment, specified by a client API, that needs to support the features used by that SPIR-V module. Features are classified through capabilities. Capabilities used by a particular SPIR-V module must be declared early in that module with the OpCapability instruction.
Some are defined on core, and others are added as SPIR-V extensions are added. So there is a relation between extensions and capabilities.
On our ARB_spirv_extensions support we made an effort to avoid defining a list of extensions supported, and a list of capabilities supported. So we tried to derive one from the other.
The natural solution seemed to ask the driver to define the list of extensions that it supports, and derive the supported capabilities from it. But this doesn't cover the capabilities that are already defined by the core. So we decided to do the opposite. The driver need to define which capabilities it supports, and the list of supported extensions are derived from it
But we found that the latter is wrong, as it doesn't cover a specific case: extensions that doesn't define a new capability. Example: SPV_KHR_storage_buffer_storage_class
So the solution would be that the driver needs to define both, the list of extensions and the list of capabilities supported. FWIW, the intel vulkan driver is already doing something similar. It also do some (python based) generation code to list the extensions from the spec, so probably we could do the same.