Skip to content

Implement capability block "depends" - #1116

Merged
christophe-lunarg merged 17 commits into
mainfrom
capability-block-depends-split
Nov 20, 2026
Merged

christophe-lunarg merged 17 commits into
mainfrom
capability-block-depends-split

Conversation

@christophe-lunarg

Copy link
Copy Markdown
Collaborator

No description provided.

…--analyse aliases

The aliases check compared the member values as JSON values, so an enum
value name and its alias, e.g. VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE
in VkPhysicalDeviceVulkan12Properties and
VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR in
VkPhysicalDeviceFloatControlsPropertiesKHR, were reported as mismatching.

Resolve the enum value names and the flag bit names to their integer
values in vk.xml, using the member type of the structure, including the
aliased types and value names, and compare these integers. The names
which aren't values of the member type are still compared as JSON
values.
Support the 'depends' condition of capability blocks of the profiles
schema 0.8.3 (#1090). The capability block requirements only apply to the
devices satisfying the condition, written with the vk.xml 'depends'
expression syntax.

Validate the conditions, keep the capability blocks with a condition
separate in transform, extract and consolidate, skip them in combine, and
download the schemas from the Khronos-Schemas 'capability-block-depends'
branch until it is merged. Document the conditions.
Evaluate the 'depends' condition of the capability blocks on the physical
device for the device support checks and vpCreateDevice.
Load the capability blocks with a 'depends' condition satisfied by the
simulated device, after the other capability blocks.
…tedMemory is supported

Replace the 'optionals' list of VP_KHR_roadmap_2026, deprecated by the
schema 0.8.3, with a capability block with a 'depends' condition.
…l depends

Add the 'depends' pull bit: with 'requirements', the properties of the
unconditional capability blocks contradicting a Vulkan core requirement
of the devices not supporting a capability the profile doesn't require
are extracted into capability blocks with a 'depends' condition on that
capability. The unconditional property keeps the value of the devices
not supporting the capability. Use it to generate the desktop and
Android profiles.

Compare the capability blocks with the same 'depends' condition with
combine --mode difference.

Convert VP_LUNARG_minimum_requirements_1_4 to capability blocks with a
'depends' condition, checked against the VulkanObject conditional
requirements.

Document that the Roadmap profiles come from the Vulkan-Headers registry
in profiles/CMakeLists.txt.
…condition

Add the 'depends' strip bit: the capability blocks with a 'depends'
condition the profile doesn't satisfy are removed, and the features and
properties whose Vulkan core requirement depends on a condition the
profile doesn't satisfy are set to the value of the devices not
satisfying it, the Vulkan core value of these devices or the value of
an unsupported capability, or removed without such a value. Strip the
desktop profiles with it.

Without a Vulkan core value for the devices not supporting a capability,
--pull depends uses the value of an unsupported property, e.g. false for
the 'max' shaderSignedZeroInfNanPreserveFloat16 property which depends
on shaderFloat16.

Report the properties contradicting the value of the devices not
supporting a capability the profile doesn't require with validate
--analyse depends, and analyse the combined desktop baseline profiles
with all the analysis checks before transforming them.

Document the 'depends' condition, the checking of the GPUInfo.org device
reports, and the Android and Roadmap profiles in the whitepaper.
…tersection

combine --mode union and --mode intersection skipped the capability
blocks with a 'depends' condition with a warning.

Combine them by condition, into a capability block with the same
condition. For the devices satisfying a condition, the requirements of
a profile are its unconditional blocks merged with its blocks with that
condition, or only its unconditional blocks without such a block. These
requirements are combined like the unconditional blocks, the least
capable values for an intersection and the most capable values for a
union, and the values which differ from the combined unconditional
block are written to the block. When the combined unconditional
features satisfy the condition, the values are merged into the
unconditional block instead.

An intersection also combines the requirements for the devices
satisfying several conditions, in a block with the conjunction of the
conditions, e.g. 'A+B' for the condition 'A' of a profile and 'B' of
another profile. A union keeps a block per condition: a device
satisfying only one condition doesn't have to satisfy the requirements
of the other condition, so the disjunction of the conditions would
require too much.

The conditions are compared once their feature structures are
canonicalized for the profile API version.
GetFeatureValue now reads the structure TransferValue keeps after loading:
a condition naming a promoted structure reads VkPhysicalDeviceVulkan1XFeatures
when the profile wrote it, and a condition naming
VkPhysicalDeviceVulkan1XFeatures reads the promoted structures otherwise.

Also transfer the core VkPhysicalDeviceProtectedMemoryFeatures and
VkPhysicalDeviceShaderDrawParametersFeatures structures, which were never
synchronized with VkPhysicalDeviceVulkan11Features.
…sues

Fix the known issues of the GPUInfo.org device reports with validate
--apply-workarounds, in place or in copies written to the --output
directory, leaving the input reports unchanged. Each workaround has its
own value, and --apply-workarounds without values applies all of them:
- driver-id: sets the driverID from the driverName for the drivers
  unknown to the exporter, and removes the '_KHR' suffix of the driver
  IDs without a '_KHR' alias, e.g. VK_DRIVER_ID_MOLTENVK_KHR.
- 64-bit-strings: converts to numbers the 64-bit integers written as
  strings.
- flags-as-numbers: converts to flag bit names the flags written as
  numbers or numeric strings.
- enums-as-numbers: converts to enum value names the extension enum
  values written as numbers, e.g. the image layouts of
  VkPhysicalDeviceHostImageCopyPropertiesEXT.

Each applied change is logged at the info level. With --output, the
--analyse checks run on the copies after the workarounds.

The validate_desktop_baseline_*_reports graph nodes write the fixed
copies of the device reports to profiles/build/reports, validate them,
and run all the analysis checks except 'unratified' to discover the
issues without a workaround yet.
…eports

The GPUInfo.org exporter writes the property structures of the
extensions it doesn't know, but neither these extensions nor their
feature structures, e.g. VkPhysicalDeviceMaintenance7PropertiesKHR in
device reports not listing VK_KHR_maintenance7.

Add the 'undeclared-extension-structures' workaround, which removes the
feature and property extension structures whose extension the
capability block doesn't declare and which aren't promoted to the API
version of the profiles using the block. It runs first, so that the
other workarounds don't fix the removed structures.

Report these structures as errors with validate --analyse extensions,
sharing the check with the workaround.
…able value

The aliased property members of some device reports have mismatching
values, e.g. every integerDotProduct*Accelerated member true in
VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR while most are
false in VkPhysicalDeviceVulkan13Properties, including on GPUs without
dot product instructions, in the 2022 to 2024 reports.

Add the 'mismatching-aliases' workaround, which sets these members to
their least capable value following their limittype in vk.xml,
considering the capability not reliable enough to be supported: false
or the smallest value for 'max', the largest value for 'min', the flag
bits set in every member for 'bitmask', and the intersection for
'range'. The members with an 'exact' or 'noauto' limittype are ignored.
It runs last, so that the values are compared once written as expected.

Add the 'mismatching-aliases-extra' workaround, which sets to false the
mismatching VkBool32 members with an 'exact' limittype, e.g.
uniformTexelBufferOffsetSingleTexelAlignment.
…ore value

Some device reports have the properties of a feature the device doesn't
support, e.g. the geometry shader limits of Apple and llvmpipe devices
without geometryShader, or the descriptor indexing limits of older GPUs
without descriptorIndexing.

Only report with validate --analyse depends the properties with a Vulkan
core value for the devices not supporting the feature, a '!condition'
requirement, e.g. 0 for maxGeometryShaderInvocations without
geometryShader. The value of an unsupported property derived from its
limittype, e.g. false for shaderSignedZeroInfNanPreserveFloat16 without
shaderFloat16, isn't a requirement of these devices. transform --pull
depends still uses it.

Add the 'unsupported-feature-properties' workaround, which sets the
properties that validate --analyse depends reports to that core value.
It runs after the 'mismatching-aliases' workaround, so that the aliased
properties have a single value.
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI VulkanProfiles build queued with queue ID 206668.

1 similar comment
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI VulkanProfiles build queued with queue ID 206668.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI VulkanProfiles build # 4826 running.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI VulkanProfiles build # 4826 passed.

@christophe-lunarg christophe-lunarg linked an issue Nov 20, 2026 that may be closed by this pull request
@christophe-lunarg
christophe-lunarg merged commit 42ab320 into main Nov 20, 2026
11 checks passed
@christophe-lunarg
christophe-lunarg deleted the capability-block-depends-split branch November 20, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vkprofiles: Add "depends" support

2 participants