Skip to content

Commit

Permalink
Changes from OpenXR 1.1.38.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: fd4ad294a24169b4db555022859a02dd5bebcd2f
  • Loading branch information
rpavlik committed Jun 10, 2024
1 parent 7dba18e commit 477fae4
Show file tree
Hide file tree
Showing 23 changed files with 387 additions and 154 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/msvc-build-preset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
lfs: true

- name: Get modern CMake and Ninja
uses: lukka/get-cmake@v3.28.3
uses: lukka/get-cmake@v3.29.5

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3
uses: microsoft/setup-msbuild@v2

- name: Install Vulkan SDK
run: ./.github/scripts/install_vulkan.ps1
Expand Down
1 change: 1 addition & 0 deletions changes/conformance/mr.3085.gl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New test: Interactive test for new `XR_EXT_composition_layer_inverted_alpha` extension.
1 change: 1 addition & 0 deletions changes/conformance/mr.3369.gl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improvement: Code cleanups in `GetSwapchainCreateTestParameters` and related tests.
4 changes: 4 additions & 0 deletions changes/conformance/mr.3380.gl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- issue.2300.gl
---
New test: Verify that the string returned by `xrGetInputSourceLocalizedName` is null-terminated.
10 changes: 6 additions & 4 deletions checkCodespell
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ CODESPELL_IGNORE=${CODESPELL_IGNORE:-${DEFAULT_CODESPELL_IGNORE}}
# .Nd is used for a description in a mandoc manpage.
# ba is from a regex
# unknwn is a header file name
# Wee, Ser, Nuber, Blok are names
IGNORE_WORDS="lod,nd,ba,unknwn,wee,ser,nuber,blok,rouge,implementor,implementors"
# Wee, Ser, Nuber, Blok, DeVault are names
# rouge is a word (and our source code highlighter)
# implementors is just how we spell it
IGNORE_WORDS="lod,nd,ba,unknwn,wee,ser,nuber,blok,devault,rouge,implementor,implementors"

# Add to this to exclude individual files or directories (comma-delimited)
# - Skipping external code.
# - Skipping binary files.
SKIP="${ROOT}/src/external,${ROOT}/src/conformance/framework/catch2,*.pyc,*.png,*.jpg,*.svg,*.otf"
# - Skipping binary and data files.
SKIP="${ROOT}/src/external,${ROOT}/src/conformance/framework/catch2,*.pyc,*.png,*.jpg,*.svg,*.otf,*.slvs"

# Args that get passed if no args are provided to this script.
# -q4 to silence "UINT ==> UNIT | disabled due to being a data type"
Expand Down
2 changes: 1 addition & 1 deletion specification/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ endif
VERSIONS := XR_VERSION_1_0 XR_VERSION_1_1 XR_LOADER_VERSION_1_0
VERSIONOPTIONS := $(foreach version,$(VERSIONS),-feature $(version))

SPECREVISION = 1.1.37
SPECREVISION = 1.1.38
REVISION_COMPONENTS = $(subst ., ,$(SPECREVISION))
MAJORMINORVER = $(word 1,$(REVISION_COMPONENTS)).$(word 2,$(REVISION_COMPONENTS))

Expand Down
32 changes: 21 additions & 11 deletions specification/registry/xr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project.
<tag name="BD" author="Bytedance" contact="Will Fu @willfu, Bangsen Han @Hansenn"/>
<tag name="COLLABORA" author="Collabora" contact="Rylie Pavlik @rpavlik"/>
<tag name="DANWILLM" author="Daniel Willmott" contact="Daniel Willmott @danwillm"/>
<tag name="DEEPMIRROR" author="Deep Mirror" contact="Yuhui Lun @lyh-dm"/>
<tag name="EPIC" author="Epic" contact="Nick Whiting @whitingn"/>
<tag name="EXT" author="Multivendor" contact="Rylie Pavlik @rpavlik"/>
<tag name="FB" author="Facebook" contact="Cass Everitt @casseveritt, Jonathan Wright @Nelno"/>
Expand Down Expand Up @@ -134,7 +135,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project.
updates them automatically by processing a line at a time.
-->
<type category="define">// OpenXR current version number.
#define <name>XR_CURRENT_API_VERSION</name> <type>XR_MAKE_VERSION</type>(1, 1, 37)</type>
#define <name>XR_CURRENT_API_VERSION</name> <type>XR_MAKE_VERSION</type>(1, 1, 38)</type>

<!--
Defines for a fixed major.minor version of OpenXR preserving the shared patch version.
Expand Down Expand Up @@ -2839,7 +2840,7 @@ typedef XrResult (XRAPI_PTR *<name>PFN_xrCreateApiLayerInstance</name>)(
<member><type>XrPassthroughFlagsFB</type> <name>flags</name></member>
<member><type>XrPassthroughLayerPurposeFB</type> <name>purpose</name></member>
</type>
<type category="struct" name="XrCompositionLayerPassthroughFB" structextends="XrCompositionLayerBaseHeader">
<type category="struct" name="XrCompositionLayerPassthroughFB" parentstruct="XrCompositionLayerBaseHeader">
<member values="XR_TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB"><type>XrStructureType</type> <name>type</name></member>
<member>const <type>void</type>* <name>next</name></member>
<member><type>XrCompositionLayerFlags</type> <name>flags</name></member>
Expand Down Expand Up @@ -4742,15 +4743,15 @@ typedef XrResult (XRAPI_PTR *<name>PFN_xrCreateApiLayerInstance</name>)(
<!-- flags for XR_FB_keyboard_tracking query state -->
<enums name="XrKeyboardTrackingFlagBitsFB" type="bitmask">
<enum bitpos="0" name="XR_KEYBOARD_TRACKING_EXISTS_BIT_FB" comment="indicates that the system has a physically tracked keyboard to report. If not set then no other bits should be considered to be valid or meaningful. If set either XR_KEYBOARD_TRACKING_LOCAL_BIT_FB or XR_KEYBOARD_TRACKING_REMOTE_BIT_FB must also be set."/>
<enum bitpos="1" name="XR_KEYBOARD_TRACKING_LOCAL_BIT_FB" comment="indicates that the physically tracked keyboard is intended to be used in a local pairing with the system. Mutally exclusive with XR_KEYBOARD_TRACKING_REMOTE_BIT_FB."/>
<enum bitpos="2" name="XR_KEYBOARD_TRACKING_REMOTE_BIT_FB" comment="indicates that the physically tracked keyboard is intended to be used while paired to a separate remote computing device. Mutally exclusive with XR_KEYBOARD_TRACKING_LOCAL_BIT_FB."/>
<enum bitpos="1" name="XR_KEYBOARD_TRACKING_LOCAL_BIT_FB" comment="indicates that the physically tracked keyboard is intended to be used in a local pairing with the system. Mutually exclusive with XR_KEYBOARD_TRACKING_REMOTE_BIT_FB."/>
<enum bitpos="2" name="XR_KEYBOARD_TRACKING_REMOTE_BIT_FB" comment="indicates that the physically tracked keyboard is intended to be used while paired to a separate remote computing device. Mutually exclusive with XR_KEYBOARD_TRACKING_LOCAL_BIT_FB."/>
<enum bitpos="3" name="XR_KEYBOARD_TRACKING_CONNECTED_BIT_FB" comment="indicates that the physically tracked keyboard is actively connected to the headset and capable of sending key data"/>
</enums>

<!-- flags for XR_FB_keyboard_tracking query -->
<enums name="XrKeyboardTrackingQueryFlagBitsFB" type="bitmask">
<enum bitpos="1" name="XR_KEYBOARD_TRACKING_QUERY_LOCAL_BIT_FB" comment="indicates the query is for the physically tracked keyboard that is intended to be used in a local pairing with the System. Mutally exclusive with XR_KEYBOARD_TRACKING_QUERY_REMOTE_BIT_FB."/>
<enum bitpos="2" name="XR_KEYBOARD_TRACKING_QUERY_REMOTE_BIT_FB" comment="indicates the query is for the physically tracked keyboard that may be connected to a separate remote computing device. Mutally exclusive with XR_KEYBOARD_TRACKING_QUERY_LOCAL_BIT_FB."/>
<enum bitpos="1" name="XR_KEYBOARD_TRACKING_QUERY_LOCAL_BIT_FB" comment="indicates the query is for the physically tracked keyboard that is intended to be used in a local pairing with the System. Mutually exclusive with XR_KEYBOARD_TRACKING_QUERY_REMOTE_BIT_FB."/>
<enum bitpos="2" name="XR_KEYBOARD_TRACKING_QUERY_REMOTE_BIT_FB" comment="indicates the query is for the physically tracked keyboard that may be connected to a separate remote computing device. Mutually exclusive with XR_KEYBOARD_TRACKING_QUERY_LOCAL_BIT_FB."/>
</enums>

<!-- flags for XR_FB_space_warp -->
Expand Down Expand Up @@ -9800,7 +9801,7 @@ typedef XrResult (XRAPI_PTR *<name>PFN_xrCreateApiLayerInstance</name>)(

<extension name="XR_FB_passthrough" number="119" type="instance" supported="openxr">
<require>
<enum value="3" name="XR_FB_passthrough_SPEC_VERSION"/>
<enum value="4" name="XR_FB_passthrough_SPEC_VERSION"/>
<enum value="&quot;XR_FB_passthrough&quot;" name="XR_FB_PASSTHROUGH_EXTENSION_NAME"/>

<enum offset="0" extends="XrStructureType" name="XR_TYPE_SYSTEM_PASSTHROUGH_PROPERTIES_FB"/>
Expand Down Expand Up @@ -12866,7 +12867,7 @@ typedef XrResult (XRAPI_PTR *<name>PFN_xrCreateApiLayerInstance</name>)(

<extension name="XR_EXT_plane_detection" number="430" type="instance" supported="openxr">
<require>
<enum value="1" name="XR_EXT_plane_detection_SPEC_VERSION"/>
<enum value="2" name="XR_EXT_plane_detection_SPEC_VERSION"/>
<enum value="&quot;XR_EXT_plane_detection&quot;" name="XR_EXT_PLANE_DETECTION_EXTENSION_NAME"/>

<enum offset="0" dir="-" extends="XrResult" name="XR_ERROR_SPACE_NOT_LOCATABLE_EXT" comment="The space passed to the function was not locatable."/>
Expand Down Expand Up @@ -13833,10 +13834,12 @@ typedef XrResult (XRAPI_PTR *<name>PFN_xrCreateApiLayerInstance</name>)(
</require>
</extension>

<extension name="XR_META_extension_555" number="555" type="instance" supported="disabled">
<extension name="XR_EXT_composition_layer_inverted_alpha" number="555" type="instance" supported="openxr">
<require>
<enum value="1" name="XR_META_extension_555_SPEC_VERSION"/>
<enum value="&quot;XR_META_extension_555&quot;" name="XR_META_extension_555_EXTENSION_NAME"/>
<enum value="1" name="XR_EXT_composition_layer_inverted_alpha_SPEC_VERSION"/>
<enum value="&quot;XR_EXT_composition_layer_inverted_alpha&quot;" name="XR_EXT_COMPOSITION_LAYER_INVERTED_ALPHA_EXTENSION_NAME"/>
<enum bitpos="3" extends="XrCompositionLayerFlagBits" name="XR_COMPOSITION_LAYER_INVERTED_ALPHA_BIT_EXT" comment="Indicates that the texture alpha channel stores transparency instead of opacity, and is to be inverted before layer blending."/>
<!-- Addition to core bitmask from EXT approved by WG 14-March-2024 -->
</require>
</extension>

Expand Down Expand Up @@ -15284,6 +15287,13 @@ typedef XrResult (XRAPI_PTR *<name>PFN_xrCreateApiLayerInstance</name>)(
</require>
</extension>

<extension name="XR_LOGITECH_extension_746" number="746" type="instance" supported="disabled">
<require>
<enum value="1" name="XR_LOGITECH_extension_746_SPEC_VERSION"/>
<enum value="&quot;XR_LOGITECH_extension_746&quot;" name="XR_LOGITECH_EXTENSION_746_EXTENSION_NAME"/>
</require>
</extension>

</extensions>

</registry>
21 changes: 16 additions & 5 deletions specification/scripts/cgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ def genType(self, typeinfo, name, alias):
if category == 'define' and self.misracppstyle():
body = body.replace("(uint32_t)", "static_cast<uint32_t>")
if body:
comment = typeElem.get('comment')
if comment and self.genOpts.emitComments:
body = self.makeCComment(comment) + body

# Add extra newline after multi-line entries.
if '\n' in body[0:-1]:
body += '\n'
Expand Down Expand Up @@ -428,10 +432,14 @@ def genStruct(self, typeinfo, typeName, alias):

typeElem = typeinfo.elem

body = ''
comment = typeElem.get('comment')
if comment and self.genOpts.emitComments:
body += self.makeCComment(comment)

if alias:
body = f"typedef {alias} {typeName};\n"
body += f"typedef {alias} {typeName};\n"
else:
body = ''
(protect_begin, protect_end) = self.genProtectString(typeElem.get('protect'))
if protect_begin:
body += protect_begin
Expand All @@ -451,9 +459,12 @@ def genStruct(self, typeinfo, typeName, alias):
body += f" {typeName} {{\n"

targetLen = self.getMaxCParamTypeLength(typeinfo)
for member in typeElem.findall('.//member'):
body += self.makeCParamDecl(member, targetLen + 4)
body += ';\n'
for elem in list(typeElem):
if elem.tag == 'member':
body += self.makeCParamDecl(elem, targetLen + 4)
body += ';\n'
elif elem.tag == 'comment' and self.genOpts.emitComments:
body += self.makeCComment(elem.text, indents = 1)
body += f"}} {typeName};\n"
if protect_end:
body += protect_end
Expand Down
Loading

0 comments on commit 477fae4

Please sign in to comment.