Skip to content

API dump: print XrPath values#606

Open
xytovl wants to merge 1 commit into
KhronosGroup:mainfrom
xytovl:main
Open

API dump: print XrPath values#606
xytovl wants to merge 1 commit into
KhronosGroup:mainfrom
xytovl:main

Conversation

@xytovl
Copy link
Copy Markdown

@xytovl xytovl commented May 21, 2026

The API dump shows numeric values of an XrPath, which are not convenient to track what is being called.

This change calls xrPathToString on each value and prints the result.
It appears that PathToString always returns XR_SUCCESS through the dispatch table, so I can't handle invalid paths correctly.

Sample new output:

XrResult xrSuggestInteractionProfileBindings
    XrInstance instance = 0x55d95352be10
    const XrInteractionProfileSuggestedBinding* suggestedBindings = 0x00007ffcda491fe0
    XrStructureType suggestedBindings->type = XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING
    const void * suggestedBindings->next = 0x0000000000000000
    XrPath suggestedBindings->interactionProfile = /interaction_profiles/bytedance/pico_neo3_controller
    uint32_t suggestedBindings->countSuggestedBindings = 0x44
    const XrActionSuggestedBinding* suggestedBindings->suggestedBindings = 0x55d9537aed50
    const XrActionSuggestedBinding* suggestedBindings->suggestedBindings[0] = 0x000055d9537aed50
    XrAction suggestedBindings->suggestedBindings[0].action = 0x55d95371a030
    XrPath suggestedBindings->suggestedBindings[0].binding = /user/hand/left/input/aim/pose
    const XrActionSuggestedBinding* suggestedBindings->suggestedBindings[1] = 0x000055d9537aed60
    XrAction suggestedBindings->suggestedBindings[1].action = 0x55d95371bd10
    XrPath suggestedBindings->suggestedBindings[1].binding = /user/hand/left/input/trigger/value
[...]

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 21, 2026

CLA assistant check
All committers have signed the CLA.

@rpavlik-bot
Copy link
Copy Markdown
Collaborator

An issue (number 2759) has been filed to correspond to this pull request in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#2759 ), to facilitate working group processes.

This GitHub pull request will continue to be the main site of discussion.

@rpavlik-bot rpavlik-bot added the synced to gitlab Synchronized to OpenXR internal GitLab label May 21, 2026
@rpavlik
Copy link
Copy Markdown
Contributor

rpavlik commented Jun 4, 2026

Hey this looks pretty handy. Any way you could print both the atom value and the string?

@xytovl
Copy link
Copy Markdown
Author

xytovl commented Jun 4, 2026

If we want to have both id and value, options are:

  • include both in the "value" field, so we get something like "0: some name". This will be semantically incorrect, the html output will have a single <div class="val">0: some name</div>.
  • do as if it were a struct with id and value fields, html output will be like
<details class="data">
  <summary>...</summary>
  <div class="data">
    <div class="type">int</div>
    <div class="var">id</div>
    <div class="val">0</div>
  </div>
  <div class="data">
    <div class="type">string</div>
    <div class="var">value</div>
    <div class="val">some value</div>
  </div>
</details>
  • extend the return type with an optional "decoded" value so that the generated html could separate the identifier and the logical value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

synced to gitlab Synchronized to OpenXR internal GitLab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants