Skip to content

Commit da30672

Browse files
Paul Gofmanivyl
Paul Gofman
authored andcommitted
wineopenxr: Update to 1.1.36 registry version.
CW-Bug-Id: #23689
1 parent 3661124 commit da30672

File tree

7 files changed

+13811
-6374
lines changed

7 files changed

+13811
-6374
lines changed

OpenXR-SDK

Submodule OpenXR-SDK updated 141 files

wineopenxr/make_openxr

+13-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ LOGGER = logging.Logger("openxr")
6262
LOGGER.addHandler(logging.StreamHandler())
6363

6464
XR_XML_VERSION = "1.0.11"
65-
WINE_XR_VERSION = (1, 0)
65+
WINE_XR_VERSION = (1, 1)
6666

6767
# Filenames to create.
6868
WINE_OPENXR_H = "./wineopenxr.h"
@@ -145,6 +145,9 @@ DRIVER_VERSION = 1
145145
FUNCTION_OVERRIDES = {
146146
# Global functions
147147
"xrCreateInstance" : {"dispatch" : False, "driver" : True, "thunk" : False},
148+
"xrCreateApiLayerInstance" : {"dispatch" : False, "driver" : True, "thunk" : False},
149+
"xrNegotiateLoaderRuntimeInterface" : {"dispatch" : False, "driver" : True, "thunk" : False},
150+
"xrNegotiateLoaderApiLayerInterface" : {"dispatch" : False, "driver" : False, "thunk" : False},
148151
"xrDestroyInstance" : {"dispatch" : False, "driver" : True, "thunk" : False},
149152

150153
"xrCreateSession" : {"dispatch" : True, "driver" : True, "thunk" : False},
@@ -174,6 +177,12 @@ FUNCTION_OVERRIDES = {
174177
"xrEndFrame" : {"dispatch" : True, "driver" : True, "thunk" : False},
175178
}
176179

180+
NOT_OUR_FUNCTIONS = [
181+
# xr.xml defines that as a part of XR_LOADER_VERSION_1_0 commands but it looks like only layers should provide it
182+
# (through dll export).
183+
"xrNegotiateLoaderApiLayerInterface",
184+
]
185+
177186
STRUCT_CHAIN_CONVERSIONS = [
178187
"XrInstanceCreateInfo",
179188
]
@@ -1352,7 +1361,7 @@ class XrParam(object):
13521361
self.format_conv = "wine_dbgstr_longlong({0})"
13531362
elif self.type == "HANDLE":
13541363
self.format_str = "%p"
1355-
elif self.type in ["XrSystemId", "XrPath", "XrTime", "XrDuration", "XrControllerModelKeyMSFT"]:
1364+
elif self.type in ["XrSystemId", "XrPath", "XrTime", "XrDuration", "XrControllerModelKeyMSFT", "XrMarkerML"]:
13561365
self.format_str = "0x%s"
13571366
self.format_conv = "wine_dbgstr_longlong({0})"
13581367
elif self.type in ["XrVector2f"]:
@@ -2538,7 +2547,8 @@ class XrRegistry(object):
25382547
# calls out in the 3 types of functions: device, global and instance.
25392548
instance_funcs = []
25402549
for func in funcs.values():
2541-
instance_funcs.append(func)
2550+
if not func.name in NOT_OUR_FUNCTIONS:
2551+
instance_funcs.append(func)
25422552

25432553
# Sort function lists by name and store them.
25442554
self.instance_funcs = sorted(instance_funcs, key=lambda func: func.name)

wineopenxr/openxr.c

+17-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
#pragma pop_macro("_WIN32")
3636
#pragma pop_macro("__cdecl")
3737

38+
typedef struct XrApiLayerCreateInfo XrApiLayerCreateInfo;
39+
typedef struct XrNegotiateLoaderInfo XrNegotiateLoaderInfo;
40+
typedef struct XrNegotiateApiLayerRequest XrNegotiateApiLayerRequest;
41+
typedef struct XrNegotiateRuntimeRequest XrNegotiateRuntimeRequest;
42+
3843
#include "openxr_private.h"
3944

4045
#include "wine/vulkan_driver.h"
@@ -858,6 +863,13 @@ XrResult WINAPI wine_xrCreateInstance(const XrInstanceCreateInfo *createInfo, Xr
858863
return res;
859864
}
860865

866+
XrResult WINAPI wine_xrCreateApiLayerInstance(const XrInstanceCreateInfo *info, const XrApiLayerCreateInfo *layerInfo, XrInstance *instance)
867+
{
868+
WINE_TRACE("%p, %p, %p\n", info, layerInfo, instance);
869+
870+
return wine_xrCreateInstance(info, instance);
871+
}
872+
861873
XrResult WINAPI wine_xrDestroyInstance(XrInstance instance)
862874
{
863875
wine_XrInstance *wine_instance = (wine_XrInstance *)instance;
@@ -1061,10 +1073,10 @@ XrResult WINAPI wine_xrDestroySession(XrSession session)
10611073
return XR_SUCCESS;
10621074
}
10631075

1064-
XrResult WINAPI wine_xrNegotiateLoaderRuntimeInterface(
1065-
const XrNegotiateLoaderInfo_win *loaderInfo,
1066-
XrNegotiateRuntimeRequest_win *runtimeRequest)
1076+
XrResult WINAPI wine_xrNegotiateLoaderRuntimeInterface(const XrNegotiateLoaderInfo *info, XrNegotiateRuntimeRequest *request)
10671077
{
1078+
const XrNegotiateLoaderInfo_win *loaderInfo = (const XrNegotiateLoaderInfo_win *)info;
1079+
XrNegotiateRuntimeRequest_win *runtimeRequest = (XrNegotiateRuntimeRequest_win *)request;
10681080
XrResult res;
10691081

10701082
WINE_TRACE("%p %p\n", loaderInfo, runtimeRequest);
@@ -1359,6 +1371,8 @@ XrResult WINAPI wine_xrPollEvent(XrInstance instance, XrEventDataBuffer *eventDa
13591371

13601372
res = xrPollEvent(((wine_XrInstance *)instance)->instance, eventData);
13611373

1374+
WINE_TRACE("eventData->type %#x\n", eventData->type);
1375+
13621376
if(res == XR_SUCCESS){
13631377
switch(eventData->type){
13641378
case XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED:

0 commit comments

Comments
 (0)