Skip to content

Commit d790ced

Browse files
authored
Validate enums have sensible versions and are visible (KhronosGroup#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: KhronosGroup#278, KhronosGroup#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
1 parent b8b9eb8 commit d790ced

File tree

3 files changed

+1552
-675
lines changed

3 files changed

+1552
-675
lines changed

0 commit comments

Comments
 (0)