Extend 'len' attribute for nested pointers#2618
Extend 'len' attribute for nested pointers#2618mematthias wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
|
We'll need to check with downstream consumers to see how they handle this change. Often this sort of thing can be very slow to get in because downstreams not only don't know how to handle it, they can do the wrong thing on encountering it - but this follows existing syntax (if not semantics) for the attribute, and is limited to just a few places, so it's worth checking. Usually we ping the SDK folks (@spencer-lunarg), Vulkan-Hpp (@asuessenbach), and Ash (@MarijnS95) as those are the most important downstreams we know about. Assuming the change is acceptable, at that point we'll need an addition to the schema document (registry.adoc) describing this new usage. |
|
Ash is already able to parse these existing
Note that I removed Ash from all Khronos repositories' CI exactly to prevent this from being an issue. |
This draft PR experiments with an extended len syntax for pointer-to-pointer parameters in the KHR acceleration structure build commands.
The goal is to describe the conceptual 2D shape of these parameters more accurately:
infoCountpInfos[i].geometryCountThis syntax is new for the Registry and is proposed here only as a draft for discussion.
Proposed constraints for the new len form
The extended
len="X,Y"form (withYreferencingSomeArray[].member) is intended to be valid only under the following conditions:Y(e.g.pInfos) must be another member of the same command/struct/union.const VkAccelerationStructureBuildGeometryInfoKHR* pInfos).infoCountas the outer dimension).VkAccelerationStructureBuildGeometryInfoKHRmust contain ageometryCountmember).These rules are intended to keep the semantics constrained and mechanically checkable for tools and schema validation.