Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a loader bug which prevented Layers from not implementing all XR functions #91

Conversation

@jrmenzel
Copy link
Contributor

commented Aug 1, 2019

Both the loader and the api dump layer have GetInstanceProcAddr functions
which try to match the function names with the functions they know. If it
wasn't found, the next layer will get called. However, the detection of
this situation is whether or not the function pointer is NULL, which breaks
if the input value of that pointer hasn't been NULL to begin with.

This fix adds a line to init the function pointer to NULL to fix the code.

Without this fix layers only work if they implement all OpenXR functions.

Both the loader and the api dump layer have GetInstanceProcAddr funct…
…ions

which try to match the function names with the functions they know. If it
wasn't found, the next layer will get called. However, the detection of
this situation is whether or not the function pointer is NULL, which breaks
if the input value of that pointer hasn't been NULL to begin with.

This fix adds a line to init the function pointer to NULL to fix the code.

Without this fix layers only work if they implement all OpenXR functions.
@CLAassistant

This comment has been minimized.

Copy link

commented Aug 1, 2019

CLA assistant check
All committers have signed the CLA.

@rpavlik

rpavlik approved these changes Aug 2, 2019

@rpavlik rpavlik merged commit 574f3d9 into KhronosGroup:master Aug 2, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

rpavlik added a commit that referenced this pull request Aug 3, 2019

OpenXR 1.0.1 release (2-August-2019)
Patch release for the 1.0 series.

### GitHub Pull Requests

These had been integrated into the public repo incrementally.

- General, Build, Other
  - #87 - Fix makefiles
  - #88 - Remove unneeded generation (corresponds to issue #74, internal issue 1139, internal MR 1491)
  - #101 - Fix install of header and loader.
- Loader
  - #91 - Fix a loader bug which prevented Layers from not implementing all XR functions
  - #95 - Guard config includes/defines (relates to #81, #92)
  - #97 - Remove a constant static std::vector, use a std::array instead.
- Layers
  - #84 - Fix Linux warning for apidump
- From OpenXR-Docs:
  - #26 - Proposal for unbounded space and spatial anchor extensions (vendor extensions)

### Internal issues

- General, Build, Other
  - Makefile cleanups (internal MR 1469, 1489)
  - Add release scripts (internal MR 1496)
- Registry
  - Reserve Oculus extension numbers (internal MR 1493)
  - Add Monado headless (vendor extension) (internal MR 1482)
- Loader
  - Remove unnecessary `#ifdef _WIN32` in loader. (internal MR 1487)

### New extensions

- `XR_MND_headless`
- `XR_MSFT_spatial_anchor`
- `XR_MSFT_unbounded_reference_space`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.