Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate enums have sensible versions and are visible (#369)
* Validate enums have a sensible versions and are visible Add version field for each eumerant. For capabilities and instructions introduced by an extension (its first version is "None"): - the capability should be guarded by an extension - the instruction should be guarded by a capability. Other enums are presumed guarded transitiviely by use as an operand to an instruction or another operand. Fixes: #278, #368 * Fix capability logic, and check more cases For capabilities, only check for lack of an extension. If capability X lists capabilities Y and Z, those are not guards *for* X, but rather when X is enabled it also implicitly enables Y and Z. Also, an instruction that is *not* in a core SPIR-V version must not be directly enabled by *both* and extension and a capability. There are 78 existing cases that break this rule, so grandparent them in with an allow-list. * Add "version": "None" to enums added for a recent extension Add it for the HostAccessQualifier enums from SPV_INTEL_global_variable_host_access
- Loading branch information