Compare commits

...

43 Commits

Author SHA1 Message Date
Zebediah Figura
63bcce34d6 proton: Always check if the prefix config changed.
In particular, make sure that we update builtin dlls for the first process that runs.
2021-06-16 08:23:04 -05:00
Arkadiusz Hiler
cd3384f2af README: Document the VM-less build. 2021-06-16 10:50:08 +03:00
Arkadiusz Hiler
706d829acf configure.sh: Expose --enable-ccache.
Until now the option had to be added by hand to the Makefile or
specified each `make` invocation.
2021-06-16 10:50:07 +03:00
Arkadiusz Hiler
85b7b3be1d configure.sh: Detect rootless container setups.
Until now the option had to be added by hand to the Makefile or
specified each `make` invocation.
2021-06-16 10:50:06 +03:00
Arkadiusz Hiler
b85e04cabf configure.sh: Add option to select container engine.
Configure will also test the container engine by trying to run the
selected SDK image.

This may make the first configure a bit slow, as it downloads the image,
but after that the SDK will be cached locally.
2021-06-16 10:50:06 +03:00
Arkadiusz Hiler
684c75deae configure.sh: Look for AFDKO.
Debian-like distributions install AFDKO's executables into libexec and
provide an `afdko` helper to call them.

Python's pip installs the executables in bin.

Let's support both.
2021-06-16 10:50:05 +03:00
Arkadiusz Hiler
963c57a125 configure.sh: Check for host-side tools and warn if something is missing.
The checks don't exit immediately so users won't have to rerun configure
after installing only a single dependency.
2021-06-16 10:50:04 +03:00
Paul Gofman
51997cb398 wineopenxr: Update to 1.0.17 registry version. 2021-06-16 00:13:51 +03:00
Paul Gofman
3661adc773 wineopenxr: Fix spec entries. 2021-06-16 00:13:51 +03:00
Paul Gofman
e9ccf71070 Update OpenXR-SDK submodule. 2021-06-15 21:57:40 +03:00
Rémi Bernon
cd301e43eb
build: Make sure wineopenx64.json depends on prefix.
So that deleting the prefix to recreate it also forces the file to be
copied again.
2021-06-15 08:53:56 +02:00
Liam Middlebrook
ae13658e1f proton: Simplify find_nvidia_wine_dll_dir libdl discovery
After testing DLSS+Proton on a different system than I normally use I
discovered that the call to `find_library("dl")` wasn't properly
discovering libdl.so.2

To simplify things here, just remove usage of find_library altogether.

Reviewed-by: Adam Moss <amoss@nvidia.com>
2021-06-14 14:17:46 -05:00
Liam Middlebrook
f7b8a814cb proton: Don't exit early if NVIDIA Wine DLLs cannot be found
Reviewed-by: Adam Moss <amoss@nvidia.com>
2021-06-14 14:17:45 -05:00
Andrew Eikum
8b92fe08ba update wine 2021-06-10 12:23:24 -05:00
Andrew Eikum
ebe847d547 update wine 2021-06-04 09:18:11 -05:00
Liam Middlebrook
cc7ad4bd13 proton: Improve find_nvidia_wine_dll_dir() handling of missing files
Additionally split out the find_library() logic for discovery of libdl
so that the case of a missing libdl (no matter how unlikely) is caught
before attempting to load an erroneous CDLL.

Fixes: 4881 (Latest Proton Experimental Fails To Open)

Reviewed-by: Adam Moss <amoss@nvidia.com>
2021-06-02 14:25:21 -07:00
Andrew Eikum
91d99ef236 update vkd3d-proton to v2.3.1-39-gec5b4cce 2021-06-02 14:13:10 -05:00
Andrew Eikum
b58cfb4168 update wine 2021-06-02 14:13:10 -05:00
Liam Middlebrook
2dda8e4e47 proton: Copy DLLs provided by the NVIDIA driver into prefix
The upcoming NVIDIA 470 driver series will introduce a DLL (nvngx.dll)
for the support of NVIDIA DLSS in Proton. This change adds logic for
discovering the location of DLL files provided by the NVIDIA driver, and
copies them to C:\Windows\System32\

Reviewed-by: Adam Moss <amoss@nvidia.com>
2021-06-02 14:13:10 -05:00
Liam Middlebrook
0503dde36c dxvk-nvapi: Add to Proton
Add https://github.com/jp7677/dxvk-nvapi as a submodule. dxvk-nvapi will
not be copied into Proton prefixes by default, but instead will be
controlled via the environment variable PROTON_ENABLE_NVAPI. This is
done to avoid any potential adverse effects of the nvapi DLL existing
in cases where an application may require a function that is not
implemented by dxvk-nvapi.

This new functionality can be enabled by setting the following environment
variable to a value of `1`:
    `PROTON_ENABLE_NVAPI`

This functionality is needed in order to support DLSS within Proton.

Reviewed-by: Adam Moss <amoss@nvidia.com>
2021-06-02 14:13:10 -05:00
Andrew Eikum
5a30a04562 proton: Use DXVK's DXGI by default 2021-06-02 13:10:23 -05:00
Andrew Eikum
622beb876e update dxvk to v1.8.1-137-gf4cbc9ae 2021-06-02 13:10:23 -05:00
Andrew Eikum
22c42cd43d Makefile: Don't consider proton-sdk tags for build name 2021-06-02 13:10:23 -05:00
Giovanni Mascellani
c287de9b0f
docker: Install Capstone development files. 2021-05-28 12:12:02 +02:00
Andrew Eikum
c82f15be51
update wine 2021-05-28 12:12:02 +02:00
Andrew Eikum
c16db69537
update dxvk to v1.8.1-84-gc5108006 2021-05-28 12:12:02 +02:00
Rémi Bernon
c913122960
docker: Add python3-pefile package to SDK image. 2021-05-28 12:12:01 +02:00
Rémi Bernon
df0b2ceaf7
docker: Don't install tini, it's already there now. 2021-05-28 12:12:01 +02:00
Rémi Bernon
a60b494afd
docker: Install libxpresent-dev packages. 2021-05-28 12:12:01 +02:00
Rémi Bernon
c214de457c
docker: Bump steamrt version to 0.20210505.0. 2021-05-28 12:12:01 +02:00
Andrew Eikum
383977e6cb
update wine 2021-05-28 12:12:01 +02:00
Andrew Eikum
9cf3679c0e
update dxvk 2021-05-28 12:12:00 +02:00
Andrew Eikum
9e513d238e
update vkd3d-proton to v2.3.1-8-g8734589e 2021-05-28 12:12:00 +02:00
Andrew Eikum
cbb3d2a0a9
Handle steampipe quirks in deploy builds 2021-05-28 12:12:00 +02:00
Andrew Eikum
e7b8fedd00
Don't ship filenames with colons in them 2021-05-28 12:11:59 +02:00
Andrew Eikum
b263b86894
Don't ship proton dist files in a tarball anymore 2021-05-28 12:11:57 +02:00
Rémi Bernon
dc318f58c0
build: Cleanup target directories before building.
And force copy artifacts after.
2021-05-28 12:10:35 +02:00
Rémi Bernon
c0ea64ec95
build: Use jobs to control xargs parallelism. 2021-05-28 11:11:18 +02:00
Rémi Bernon
46e9ab5bf3
build: Make silent builds actually quiet. 2021-05-28 11:11:18 +02:00
Paul Gofman
b70ae9094b
build: Fixup PE section headers.
For FH4.
2021-05-28 11:11:17 +02:00
Rémi Bernon
ccde2554ce
build: Build with Proton SDK 0.20210505.0-2.
But disable XPresent extension for now.
2021-05-28 11:11:11 +02:00
Paul Gofman
be905ab339 wineopenxr: Update to 1.0.15 registry version. 2021-05-27 21:44:39 +03:00
Andrew Eikum
d611ab8a5f proton: Add PROTON_CRASH_REPORT_DIR runtime config
CW-Bug-Id: #18905
2021-05-27 13:43:12 -05:00
28 changed files with 3475 additions and 1152 deletions

3
.gitmodules vendored
View File

@ -31,3 +31,6 @@
[submodule "OpenXR-SDK"]
path = OpenXR-SDK
url = https://github.com/KhronosGroup/OpenXR-SDK
[submodule "dxvk-nvapi"]
path = dxvk-nvapi
url = https://github.com/jp7677/dxvk-nvapi

View File

@ -18,7 +18,7 @@ BUILD_DIR := "build-$(shell echo $(_build_name) | sed -e 's/ /_/g')"
STEAM_DIR := $(HOME)/.steam/root
ifeq ($(build_name),)
DEPLOY_DIR := $(shell git describe --tags --always)
DEPLOY_DIR := $(shell git describe --tags --always --exclude proton-sdk*)
else
DEPLOY_DIR := $(_build_name)
endif
@ -145,19 +145,24 @@ install-internal: downloads
install: install-internal
mkdir -p $(STEAM_DIR)/compatibilitytools.d/
rm -rf $(STEAM_DIR)/compatibilitytools.d/$(_build_name)/files/ #remove proton's internal files, but preserve user_settings etc from top-level
cp -Rf --no-dereference --preserve=mode,links vagrant_share/compatibilitytools.d/$(_build_name) $(STEAM_DIR)/compatibilitytools.d/
echo "Proton installed to your local Steam installation"
redist: | vagrant_share/$(DEPLOY_DIR)
redist: private SHELL := $(VAGRANT_SHELL)
redist: downloads
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) redist && cp $(BUILD_DIR)/redist/* /vagrant/$(DEPLOY_DIR) && \
rm -rf /vagrant/$(DEPLOY_DIR)/* && \
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) redist && \
cp -Rf $(BUILD_DIR)/redist/* /vagrant/$(DEPLOY_DIR) && \
echo "Proton build available at vagrant_share/$(DEPLOY_DIR)"
deploy: | vagrant_share/$(DEPLOY_DIR)-deploy
deploy: private SHELL := $(VAGRANT_SHELL)
deploy: downloads
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) deploy && cp $(BUILD_DIR)/deploy/* /vagrant/$(DEPLOY_DIR)-deploy && \
rm -rf /vagrant/$(DEPLOY_DIR)-deploy/* && \
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) deploy && \
cp -Rf $(BUILD_DIR)/deploy/* /vagrant/$(DEPLOY_DIR)-deploy && \
echo "Proton deployed to vagrant_share/$(DEPLOY_DIR)-deploy"
module: | vagrant_share/$(module)/lib/wine/
@ -176,39 +181,47 @@ dxvk: | vagrant_share/dxvk/lib64/wine/dxvk
dxvk: private SHELL := $(VAGRANT_SHELL)
dxvk: downloads
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) dxvk && \
cp -f $(BUILD_DIR)/dist/dist/lib/wine/dxvk/*.dll /vagrant/dxvk/lib/wine/dxvk/ && \
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/dxvk/*.dll /vagrant/dxvk/lib64/wine/dxvk/
cp -f $(BUILD_DIR)/dist/files/lib/wine/dxvk/*.dll /vagrant/dxvk/lib/wine/dxvk/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/dxvk/*.dll /vagrant/dxvk/lib64/wine/dxvk/
dxvk-nvapi: | vagrant_share/dxvk-nvapi/lib/wine/nvapi
dxvk-nvapi: | vagrant_share/dxvk-nvapi/lib64/wine/nvapi
dxvk-nvapi: private SHELL := $(VAGRANT_SHELL)
dxvk-nvapi: downloads
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) dxvk-nvapi && \
cp -f $(BUILD_DIR)/dist/files/lib/wine/nvapi/*.dll /vagrant/dxvk-nvapi/lib/wine/nvapi/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/nvapi/*.dll /vagrant/dxvk-nvapi/lib64/wine/nvapi/
vkd3d-proton: | vagrant_share/vkd3d-proton/lib/wine/vkd3d-proton
vkd3d-proton: | vagrant_share/vkd3d-proton/lib64/wine/vkd3d-proton
vkd3d-proton: private SHELL := $(VAGRANT_SHELL)
vkd3d-proton: downloads
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) vkd3d-proton && \
cp -f $(BUILD_DIR)/dist/dist/lib/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib/wine/vkd3d-proton/ && \
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib64/wine/vkd3d-proton/
cp -f $(BUILD_DIR)/dist/files/lib/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib/wine/vkd3d-proton/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib64/wine/vkd3d-proton/
lsteamclient: | vagrant_share/lsteamclient/lib/wine
lsteamclient: | vagrant_share/lsteamclient/lib64/wine
lsteamclient: private SHELL := $(VAGRANT_SHELL)
lsteamclient: downloads
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) lsteamclient && \
cp -f $(BUILD_DIR)/dist/dist/lib/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib/wine && \
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib64/wine
cp -f $(BUILD_DIR)/dist/files/lib/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib/wine && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib64/wine
vrclient: | vagrant_share/vrclient/lib/wine
vrclient: | vagrant_share/vrclient/lib64/wine
vrclient: private SHELL := $(VAGRANT_SHELL)
vrclient: downloads
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) vrclient && \
cp -f $(BUILD_DIR)/dist/dist/lib/wine/vrclient.dll.so /vagrant/vrclient/lib/wine && \
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/vrclient_x64.dll.so /vagrant/vrclient/lib64/wine
cp -f $(BUILD_DIR)/dist/files/lib/wine/vrclient.dll.so /vagrant/vrclient/lib/wine && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/vrclient_x64.dll.so /vagrant/vrclient/lib64/wine
wineopenxr: | vagrant_share/wineopenxr/lib/wine
wineopenxr: | vagrant_share/wineopenxr/lib64/wine
wineopenxr: private SHELL := $(VAGRANT_SHELL)
wineopenxr: downloads
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) wineopenxr && \
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/wineopenxr.dll.so /vagrant/wineopenxr/lib64/wine
cp -f $(BUILD_DIR)/dist/files/lib64/wine/wineopenxr.dll.so /vagrant/wineopenxr/lib64/wine
vagrant_share/%:
mkdir -p $@

@ -1 +1 @@
Subproject commit 5197afbf199c026eca82a47a8573ed10b0c6fa4e
Subproject commit bf21ccb1007bb531b45d9978919a56ea5059c245

View File

@ -205,6 +205,29 @@ manually (see below), or automatically with `make install`.
`make deploy` will package Proton up for distribution via Steamworks.
---
Building without the VM
---
Since most of the build happens inside the Proton SDK container, building
without a VM should be mostly safe. It requires a working container engine
(Docker / Podman) and few command line tools.
Running `configure.sh` will check if containers are functional and prompt you
if any dependencies are missing.
The build by default uses Docker, but you can switch to another, compatible
engine with `--container-engine=<executable_name>`.
You can enable ccache with `--enable-cache` flag. This will mount your
`$CCACHE_DIR` or `$HOME/.ccache` inside the container.
Example:
mkdir build && cd build
../proton/configure.sh --container-engine=podman --enable-ccache
make dist
---
Install Proton locally
---
@ -273,12 +296,14 @@ the Wine prefix. Removing the option will revert to the previous behavior.
| | <tt>PROTON_LOG_DIR</tt> | Output log files into the directory specified. Defaults to your home directory. |
| | <tt>PROTON_DUMP_DEBUG_COMMANDS</tt> | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. |
| | <tt>PROTON_DEBUG_DIR</tt> | Root directory for the Proton debug scripts, `/tmp` by default. |
| | <tt>PROTON_CRASH_REPORT_DIR</tt> | Write crash logs into this directory. Does not clean up old logs, so may eat all your disk space eventually. |
| <tt>wined3d</tt> | <tt>PROTON_USE_WINED3D</tt> | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11, d3d10, and d3d9. |
| <tt>nod3d11</tt> | <tt>PROTON_NO_D3D11</tt> | Disable <tt>d3d11.dll</tt>, for d3d11 games which can fall back to and run better with d3d9. |
| <tt>nod3d10</tt> | <tt>PROTON_NO_D3D10</tt> | Disable <tt>d3d10.dll</tt> and <tt>dxgi.dll</tt>, for d3d10 games which can fall back to and run better with d3d9. |
| <tt>noesync</tt> | <tt>PROTON_NO_ESYNC</tt> | Do not use eventfd-based in-process synchronization primitives. |
| <tt>nofsync</tt> | <tt>PROTON_NO_FSYNC</tt> | Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no `FUTEX_WAIT_MULTIPLE` support.) |
| <tt>noxim</tt> | <tt>PROTON_NO_XIM</tt> | Enabled by default. Do not attempt to use XIM (X Input Methods) support. XIM support is known to cause crashes with libx11 older than version 1.7. |
| <tt>enablenvapi</tt> | <tt>PROTON_ENABLE_NVAPI</tt> | Enable NVIDIA's NVAPI GPU support library. |
| <tt>nativevulkanloader</tt> | | Use the Vulkan loader shipped with the game instead of Proton's built-in Vulkan loader. This breaks VR support, but is required by a few games. |
| <tt>forcelgadd</tt> | <tt>PROTON_FORCE_LARGE_ADDRESS_AWARE</tt> | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. |
| <tt>heapdelayfree</tt>| <tt>PROTON_HEAP_DELAY_FREE</tt>| Delay freeing some memory, to work around application use-after-free bugs. |

View File

@ -1,6 +1,15 @@
SRC := $(abspath $(SRCDIR))
OBJ := $(abspath $(CURDIR))
ifeq ($(filter s,$(MAKEFLAGS)),s)
MAKEFLAGS += --quiet --no-print-directory
--quiet? := --quiet
else
MFLAGS += V=1 VERBOSE=1
-v? := -v
--verbose? := --verbose
endif
##
## Nested make
##
@ -59,7 +68,11 @@ ifneq ($(ROOTLESS_CONTAINER),1)
DOCKER_OPTS := -e HOME -e USER -e USERID=$(shell id -u) -u $(shell id -u):$(shell id -g) $(DOCKER_OPTS)
endif
DOCKER_BASE = docker run --rm -v $(SRC):$(SRC) -v $(OBJ):$(OBJ) \
ifeq ($(CONTAINER_ENGINE),)
CONTAINER_ENGINE := docker
endif
DOCKER_BASE = $(CONTAINER_ENGINE) run --rm -v $(SRC):$(SRC) -v $(OBJ):$(OBJ) \
-w $(OBJ) -e MAKEFLAGS \
$(DOCKER_OPTS) $(STEAMRT_IMAGE)
@ -104,6 +117,8 @@ container-build:
all32 $(MAKECMDGOALS32): container-build
all64 $(MAKECMDGOALS64): container-build
else
J = $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))
endif
@ -125,7 +140,7 @@ endif
##
DST_BASE := $(OBJ)/dist
DST_DIR := $(DST_BASE)/dist
DST_DIR := $(DST_BASE)/files
DST_LIBDIR32 := $(DST_DIR)/lib
DST_LIBDIR64 := $(DST_DIR)/lib64
DEPLOY_DIR := ./deploy
@ -167,6 +182,7 @@ CARGO_BUILD_ARG := --release
COMPAT_MANIFEST_TEMPLATE := $(SRCDIR)/compatibilitytool.vdf.template
LICENSE := $(SRCDIR)/dist.LICENSE
OFL_LICENSE := $(SRCDIR)/fonts/liberation-fonts/LICENSE
STEAMPIPE_FIXUPS_PY := $(SRCDIR)/steampipe_fixups.py
GECKO_VER := 2.47.2
GECKO32_TARBALL := wine-gecko-$(GECKO_VER)-x86.tar.xz
@ -253,8 +269,9 @@ DIST_TARGETS := $(DIST_COPY_TARGETS) $(DIST_OVR32) $(DIST_OVR64) \
$(DIST_GECKO32) $(DIST_GECKO64) $(DIST_WINEMONO) \
$(DIST_COMPAT_MANIFEST) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE) $(DIST_FONTS)
DEPLOY_COPY_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE)
REDIST_COPY_TARGETS := $(DEPLOY_COPY_TARGETS) $(DIST_COMPAT_MANIFEST)
BASE_COPY_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE) $(DST_DIR)
DEPLOY_COPY_TARGETS := $(BASE_COPY_TARGETS) $(STEAMPIPE_FIXUPS_PY)
REDIST_COPY_TARGETS := $(BASE_COPY_TARGETS) $(DIST_COMPAT_MANIFEST)
$(DIST_LICENSE): $(LICENSE)
cp -a $< $@
@ -343,36 +360,36 @@ dist: $(DIST_TARGETS) all-dist dist_wineopenxr | $(DST_DIR)
echo `date '+%s'` `GIT_DIR=$(abspath $(SRCDIR)/.git) git describe --tags` > $(DIST_VERSION)
deploy: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
mkdir -p $(DEPLOY_DIR) && \
cp -a $(DEPLOY_COPY_TARGETS) $(DEPLOY_DIR) && \
tar -C $(DST_DIR) -c . > $(DEPLOY_DIR)/proton_dist.tar
@echo "Created deployment archive at "$(DEPLOY_DIR)"/proton_dist.tar"
mkdir -p $(DEPLOY_DIR)
cp -af --no-dereference --preserve=mode,links $(DEPLOY_COPY_TARGETS) $(DEPLOY_DIR)
python3 $(STEAMPIPE_FIXUPS_PY) process $(DEPLOY_DIR)
install: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
if [ ! -d $(STEAM_DIR) ]; then echo >&2 "!! "$(STEAM_DIR)" does not exist, cannot install"; return 1; fi
mkdir -p $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
cp -rf --no-dereference --preserve=mode,links $(DST_BASE)/* $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
cp -f $(DIST_VERSION) $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)/dist/
cp -af --no-dereference --preserve=mode,links $(DST_BASE)/* $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
@echo "Installed Proton to "$(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
@echo "You may need to restart Steam to select this tool"
redist: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
mkdir -p $(REDIST_DIR)
cp -a $(REDIST_COPY_TARGETS) $(REDIST_DIR)
tar -C $(DST_DIR) -c . | gzip -c -1 > $(REDIST_DIR)/proton_dist.tar.gz
@echo "Created redistribution tarball at "$(REDIST_DIR)"/proton_dist.tar.gz"
cp -af --no-dereference --preserve=mode,links $(REDIST_COPY_TARGETS) $(REDIST_DIR)
.PHONY: module32 module64 module
module32: private SHELL := $(CONTAINER_SHELL)
module32: CONTAINERGOALS := $(CONTAINERGOALS) wine-configure32
module32: | all-source wine-configure32
+$(MAKE) -j$(J) $(filter -j%,$(MAKEFLAGS)) $(MFLAGS) $(MAKEOVERRIDES) -C $(WINE_OBJ32)/dlls/$(module)
+$(MAKE) -j$(J) $(filter -j%,$(MAKEFLAGS)) $(MFLAGS) $(MAKEOVERRIDES) -C $(WINE_OBJ32)/dlls/$(module) && \
find $(WINE_OBJ32)/dlls/$(module) -type f -name '*.dll' -printf '%p\0' | \
xargs $(--verbose?) -0 -r -P$(J) -n1 $(SRC)/make/pefixup.py
module64: private SHELL := $(CONTAINER_SHELL)
module64: CONTAINERGOALS := $(CONTAINERGOALS) wine-configure64
module64: | all-source wine-configure64
+$(MAKE) -j$(J) $(filter -j%,$(MAKEFLAGS)) $(MFLAGS) $(MAKEOVERRIDES) -C $(WINE_OBJ64)/dlls/$(module)
+$(MAKE) -j$(J) $(filter -j%,$(MAKEFLAGS)) $(MFLAGS) $(MAKEOVERRIDES) -C $(WINE_OBJ64)/dlls/$(module) && \
find $(WINE_OBJ64)/dlls/$(module) -type f -name '*.dll' -printf '%p\0' | \
xargs $(--verbose?) -0 -r -P$(J) -n1 $(SRC)/make/pefixup.py
module: CONTAINERGOALS := $(CONTAINERGOALS) wine-configure
module: | all-source wine-configure
@ -594,7 +611,7 @@ $(eval $(call rules-source,wineopenxr,$(SRCDIR)/wineopenxr))
# $(eval $(call rules-winemaker,wineopenxr,32,wineopenxr.dll))
$(eval $(call rules-winemaker,wineopenxr,64,wineopenxr.dll))
$(DIST_WINEOPENXR_JSON64): $(WINEOPENXR_SRC)/wineopenxr64.json | dist_prefix
$(DIST_WINEOPENXR_JSON64): $(WINEOPENXR_SRC)/wineopenxr64.json dist_prefix
mkdir -p $(dir $@)
cp -a $< $@
@ -633,6 +650,7 @@ WINE_SOURCE_ARGS = \
WINE_CONFIGURE_ARGS = \
--with-mingw \
--without-xpresent \
--disable-tests
WINE_CONFIGURE_ARGS64 = --enable-win64
@ -717,6 +735,32 @@ $(OBJ)/.dxvk-post-build32:
touch $@
##
## dxvk-nvapi
##
DXVK_NVAPI_MESON_ARGS32 = \
--bindir=$(DXVK_NVAPI_DST32)/lib/wine/nvapi \
--cross-file=$(DXVK_NVAPI_OBJ32)/build-win32.txt
DXVK_NVAPI_MESON_ARGS64 = \
--bindir=$(DXVK_NVAPI_DST64)/lib64/wine/nvapi \
--cross-file=$(DXVK_NVAPI_OBJ64)/build-win64.txt
$(eval $(call rules-source,dxvk-nvapi,$(SRCDIR)/dxvk-nvapi))
$(eval $(call rules-meson,dxvk-nvapi,32))
$(eval $(call rules-meson,dxvk-nvapi,64))
$(OBJ)/.dxvk-nvapi-post-build64:
mkdir -p "$(DST_DIR)"/lib64/wine/nvapi
rm -f "$(DST_DIR)"/lib64/wine/nvapi/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk-nvapi ) > "$(DST_DIR)"/lib64/wine/nvapi/version; fi
touch $@
$(OBJ)/.dxvk-nvapi-post-build32:
mkdir -p "$(DST_DIR)"/lib/wine/nvapi
rm -f "$(DST_DIR)"/lib/wine/nvapi/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk-nvapi ) > "$(DST_DIR)"/lib/wine/nvapi/version; fi
touch $@
##
## vkd3d-proton
##
@ -825,11 +869,11 @@ $(FONTS_OBJ)/%.sfd: $(LIBERATION_SRCDIR)/%.sfd | $(FONTS_OBJ)
#The use of "YaHei" for compatibility with programs that require that exact string. This font is not Microsoft YaHei.
$(SOURCE_HAN_SANS_REGULAR_OTF): $(SOURCE_HAN_SANS_REGULAR_CIDFONTINFO) $(SOURCE_HAN_SANS_REGULAR_CIDFONT) \
$(SOURCE_HAN_SANS_REGULAR_FEATURES) $(SOURCE_HAN_SANS_REGULAR_SEQUENCES) $(SOURCE_HAN_SANS_REGULAR_UNISOURCE) $(YAHEI_MENUNAMEDB)
makeotf -f $(SOURCE_HAN_SANS_REGULAR_CIDFONT) -omitMacNames -ff $(SOURCE_HAN_SANS_REGULAR_FEATURES) \
$(AFDKO_VERB) makeotf -f $(SOURCE_HAN_SANS_REGULAR_CIDFONT) -omitMacNames -ff $(SOURCE_HAN_SANS_REGULAR_FEATURES) \
-fi $(SOURCE_HAN_SANS_REGULAR_CIDFONTINFO) -mf $(YAHEI_MENUNAMEDB) -r -nS -cs 25 -ch $(SOURCE_HAN_SANS_REGULAR_UNISOURCE) \
-ci $(SOURCE_HAN_SANS_REGULAR_SEQUENCES) -o $(SOURCE_HAN_SANS_REGULAR_OTF)
tx -cff +S -no_futile $(SOURCE_HAN_SANS_REGULAR_CIDFONT) $(FONTS_OBJ)/CFF.OTC.SC
sfntedit -a CFF=$(FONTS_OBJ)/CFF.OTC.SC $(SOURCE_HAN_SANS_REGULAR_OTF)
$(AFDKO_VERB) tx -cff +S -no_futile $(SOURCE_HAN_SANS_REGULAR_CIDFONT) $(FONTS_OBJ)/CFF.OTC.SC
$(AFDKO_VERB) sfntedit -a CFF=$(FONTS_OBJ)/CFF.OTC.SC $(SOURCE_HAN_SANS_REGULAR_OTF)
fonts: $(FONTS_OBJ)/LiberationSans-Regular.ttf
fonts: $(FONTS_OBJ)/LiberationSans-Bold.ttf

View File

@ -31,6 +31,55 @@ die() { err "$@"; exit 1; }
finish() { stat "$@"; exit 0; }
cmd() { showcmd "$@"; "$@"; }
#
# Dependency Checks
#
MISSING_DEPENDENCIES=0
dependency_command() {
local COMMAND=$1
shift
if ! command -v "$COMMAND" &> /dev/null; then
err "Couldn't find command '$COMMAND'. Please install ${@:-$COMMAND}."
MISSING_DEPENDENCIES=1
fi
}
dependency_afdko() {
if command -v makeotf &> /dev/null; then
AFDKO_VERB=
elif command -v afdko &> /dev/null; then
AFDKO_VERB=afdko
else
err "Couldn't find 'afdko'. Install it and make sure that 'makeotf' is in your PATH or 'afdko makeotf' works."
MISSING_DEPENDENCIES=1
fi
}
check_container_engine() {
info "Making sure that the container engine is working."
if ! cmd $arg_container_engine run --rm $arg_protonsdk_image; then
die "Broken container engine. Please fix your $arg_container_engine setup."
fi
touch permission_check
local inner_uid="$($arg_container_engine run -v "$(pwd):/test" \
--rm $arg_protonsdk_image \
stat --format "%u" /test/permission_check)"
rm permission_check
if [ "$inner_uid" -eq 0 ]; then
# namespace maps the user as root or the build is performed as host's root
ROOTLESS_CONTAINER=1
elif [ "$inner_uid" -eq "$(id -u)" ]; then
ROOTLESS_CONTAINER=0
else
err "File owner's UID doesn't map to 0 or $(id -u) in the container."
die "Don't know how to map permissions. Please check your $arg_container_engine setup."
fi
}
#
# Configure
#
@ -64,6 +113,27 @@ function configure() {
info "No build name specified, using default: $build_name"
fi
dependency_command fontforge
dependency_command find "findutils"
dependency_command make "GNU Make"
dependency_command rsync
dependency_command wget
dependency_command xz
dependency_command patch
dependency_command autoconf
dependency_command git
dependency_command python3
dependency_afdko
if [ "$MISSING_DEPENDENCIES" -ne 0 ]; then
die "Missing dependencies, cannot continue."
fi
if [[ -n "$arg_container_engine" ]]; then
check_container_engine
fi
## Write out config
# Don't die after this point or we'll have rather unhelpfully deleted the Makefile
[[ ! -e "$MAKEFILE" ]] || rm "$MAKEFILE"
@ -79,9 +149,16 @@ function configure() {
echo "STEAMRT_NAME := $(escape_for_make "$steamrt_name")"
echo "STEAMRT_IMAGE := $(escape_for_make "$steamrt_image")"
echo "ROOTLESS_CONTAINER := $ROOTLESS_CONTAINER"
echo "CONTAINER_ENGINE := $arg_container_engine"
if [[ -n "$arg_docker_opts" ]]; then
echo "DOCKER_OPTS := $arg_docker_opts"
fi
if [[ -n "$arg_enable_ccache" ]]; then
echo "ENABLE_CCACHE := 1"
fi
echo "AFDKO_VERB := $AFDKO_VERB"
# Include base
echo ""
@ -97,10 +174,12 @@ function configure() {
#
arg_steamrt="soldier"
arg_protonsdk_image="registry.gitlab.steamos.cloud/proton/soldier/sdk:0.20210126.1-1"
arg_protonsdk_image="registry.gitlab.steamos.cloud/proton/soldier/sdk:0.20210505.0-2"
arg_no_protonsdk=""
arg_build_name=""
arg_container_engine="docker"
arg_docker_opts=""
arg_enable_ccache=""
arg_help=""
invalid_args=""
function parse_args() {
@ -137,9 +216,14 @@ function parse_args() {
elif [[ $arg = --build-name ]]; then
arg_build_name="$val"
val_used=1
elif [[ $arg = --container-engine ]]; then
arg_container_engine="$val"
val_used=1
elif [[ $arg = --docker-opts ]]; then
arg_docker_opts="$val"
val_used=1
elif [[ $arg = --enable-ccache ]]; then
arg_enable_ccache="1"
elif [[ $arg = --proton-sdk-image ]]; then
val_used=1
arg_protonsdk_image="$val"
@ -191,8 +275,13 @@ usage() {
"$1" ""
"$1" " --build-name=<name> Set the name of the build that displays when used in Steam"
"$1" ""
"$1" " --container-engine=<engine> Which container Docker-compatible container engine to use,"
"$1" " e.g. podman. Defaults to docker."
"$1" ""
"$1" " --docker-opts='<options>' Extra options to pass to Docker when invoking the runtime."
"$1" ""
"$1" " --enable-ccache Mount \$CCACHE_DIR or \$HOME/.ccache inside of the container and use ccache for the build."
"$1" ""
"$1" " Steam Runtime"
"$1" " Proton builds that are to be installed & run under the steam client must be built with"
"$1" " the Steam Runtime SDK to ensure compatibility. See README.md for more information."

View File

@ -73,6 +73,14 @@ def setup_dll_symlinks(default_pfx_dir, dist_dir):
os.unlink(filename)
make_relative_symlink(target, filename)
#steampipe can't handle filenames with colons, so we remove them here
#and restore them in the proton script
def fixup_drive_links(default_pfx_dir):
for walk_dir, dirs, files in os.walk(os.path.join(default_pfx_dir, "dosdevices")):
for dir_ in dirs:
if ":" in dir_:
os.remove(os.path.join(walk_dir, dir_))
def make_default_pfx(default_pfx_dir, dist_dir, runtime):
local_env = dict(os.environ)
@ -96,6 +104,7 @@ def make_default_pfx(default_pfx_dir, dist_dir, runtime):
env=local_env, check=True)
setup_dll_symlinks(default_pfx_dir, dist_dir)
fixup_drive_links(default_pfx_dir)
if __name__ == '__main__':
import sys

View File

@ -1,4 +1,4 @@
STEAMRT_VERSION = 0.20210126.1
STEAMRT_VERSION = 0.20210505.0
STEAMRT_URLBASE = registry.gitlab.steamos.cloud
PROTONSDK_URLBASE = $(STEAMRT_URLBASE)/proton/soldier/sdk

View File

@ -52,9 +52,14 @@ RUN bash -c 'mkdir -p /usr/lib/ccache && ls /usr/bin/{,*-}{cc,c++,gcc,g++}{,-[0-
ENV PATH=/usr/lib/ccache:$PATH
RUN apt-get install -y \
tini \
libxpresent-dev \
libxpresent-dev:i386 \
python3-pefile \
libcapstone-dev \
libcapstone-dev:i386 \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/usr/bin/tini-static", "-s", "-g", "--"]
CMD ["/bin/bash"]

2
dxvk

@ -1 +1 @@
Subproject commit f8a4ca555a6e5d89f5162a042bbae550902f4e49
Subproject commit ed3aacadb27918e7988e479a275088a78e18cfa8

1
dxvk-nvapi Submodule

@ -0,0 +1 @@
Subproject commit 8b3987f6707946b9202eda3dda38632197d2286b

25
make/pefixup.py Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env python3
import sys
import os
import stat
import pefile
for path in sys.argv[1:]:
pe = pefile.PE(path)
for section in pe.sections:
if section.Name.decode("utf-8")[0:5] == ".text":
section.Characteristics &= ~pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_CNT_INITIALIZED_DATA']
section.Characteristics &= ~pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_ALIGN_MASK']
pe.OPTIONAL_HEADER.CheckSum = pe.generate_checksum()
perm = stat.S_IMODE(os.stat(path).st_mode)
if (perm & stat.S_IWUSR) == 0:
os.chmod(path, perm | stat.S_IWUSR)
pe.write(path)
if (perm & stat.S_IWUSR) == 0:
os.chmod(path, perm)

View File

@ -12,7 +12,7 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/configure.ac
rm -rf "$$($(2)_OBJ$(3))/config.cache"
cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \
$$($(2)_SRC)/configure -C \
$$($(2)_SRC)/configure $(--quiet?) -C \
--prefix="$$($(2)_DST$(3))" \
--libdir="$$($(2)_DST$(3))/lib$(subst 32,,$(3))" \
$$($(2)_ENV$(3)) \

View File

@ -55,26 +55,32 @@ ifneq ($(UNSTRIPPED_BUILD),)
$$(OBJ)/.$(1)-dist$(3):
@echo ":: installing $(3)bit $(1)..." >&2
mkdir -p $$($(2)_LIBDIR$(3))/ $$(DST_LIBDIR$(3))/
cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs --verbose -0 -r -P8 mkdir -p
cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs --verbose -0 -r -P8 -n2 cp -a
cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs $(--verbose?) -0 -r -P$$(J) mkdir -p
cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs $(--verbose?) -0 -r -P$$(J) -n2 cp -a
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \
-printf '--only-keep-debug\0%p\0$$(DST_LIBDIR$(3))/%p.debug\0' | \
xargs --verbose -0 -r -P8 -n3 objcopy --file-alignment=4096
xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy --file-alignment=4096
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \
-printf '--add-gnu-debuglink=$$(DST_LIBDIR$(3))/%p.debug\0--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \
xargs --verbose -0 -r -P8 -n4 objcopy --file-alignment=4096
xargs $(--verbose?) -0 -r -P$$(J) -n4 objcopy --file-alignment=4096
cd $$($(2)_LIBDIR$(3)) && find -type f -name '*.dll' \
-printf '$$(DST_LIBDIR$(3))/%p\0' | \
xargs $(--verbose?) -0 -r -P$$(J) -n1 $$(SRC)/make/pefixup.py
touch $$@
else
$$(OBJ)/.$(1)-dist$(3):
@echo ":: installing $(3)bit $(1)..." >&2
mkdir -p $$($(2)_LIBDIR$(3))/ $$(DST_LIBDIR$(3))/
cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs --verbose -0 -r -P8 mkdir -p
cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs --verbose -0 -r -P8 -n2 cp -a
cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs $(--verbose?) -0 -r -P$$(J) mkdir -p
cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs $(--verbose?) -0 -r -P$$(J) -n2 cp -a
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \
-printf '$$(DST_LIBDIR$(3))/%p.debug\0' | xargs --verbose -0 -r -P8 rm -f
-printf '$$(DST_LIBDIR$(3))/%p.debug\0' | xargs $(--verbose?) -0 -r -P$$(J) rm -f
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \
-printf '--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \
xargs --verbose -0 -r -P8 -n3 objcopy --file-alignment=4096
xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy --file-alignment=4096
cd $$($(2)_LIBDIR$(3)) && find -type f -name '*.dll' \
-printf '$$(DST_LIBDIR$(3))/%p\0' | \
xargs $(--verbose?) -0 -r -P$$(J) -n1 $$(SRC)/make/pefixup.py
touch $$@
endif
endif

View File

@ -31,7 +31,7 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/meson.build
$$(OBJ)/.$(1)-build$(3):
@echo ":: building $(3)bit $(1)..." >&2
env $$($(2)_ENV$(3)) \
ninja $$(filter -j%,$$(MAKEFLAGS)) -C "$$($(2)_OBJ$(3))" install
ninja $$(filter -j%,$$(MAKEFLAGS)) -C "$$($(2)_OBJ$(3))" install $(-v?)
touch $$@
endif
endef

View File

@ -25,7 +25,7 @@ $$(OBJ)/.$(1)-source: $$(shell echo -n 'syncing $(1)... ' >&2 && \
rsync --dry-run --filter=:C --exclude '*~' --exclude .git $$($(2)_SOURCE_ARGS) --info=name -Oarx --delete "$$(abspath $(3))/" "$$($(2)_SRC)" | \
grep -v -e ^$$$$ | grep -q ^ && echo $(1)-rebuild && \
echo 'done, dirty' >&2 || echo 'done' >&2)
rsync --filter=:C --exclude '*~' --exclude .git $$($(2)_SOURCE_ARGS) --info=name -Oarx --delete "$$(abspath $(3))/" "$$($(2)_SRC)"
rsync --filter=:C --exclude '*~' --exclude .git $$($(2)_SOURCE_ARGS) --info=name -Oarx --delete "$$(abspath $(3))/" "$$($(2)_SRC)" $(--quiet?)
touch $$@
$$(OBJ)/.$(1)-post-source: $$(OBJ)/.$(1)-source

228
proton
View File

@ -15,6 +15,15 @@ import subprocess
import sys
import tarfile
from ctypes import CDLL
from ctypes import POINTER
from ctypes import Structure
from ctypes import addressof
from ctypes import cast
from ctypes import c_int
from ctypes import c_char_p
from ctypes import c_void_p
from filelock import FileLock
#To enable debug logging, copy "user_settings.sample.py" to "user_settings.py"
@ -67,7 +76,7 @@ def makedirs(path):
#already exists
pass
def try_copy(src, dst, add_write_perm=True):
def try_copy(src, dst, add_write_perm=True, optional=False):
try:
if os.path.isdir(dst):
dstfile = dst + "/" + os.path.basename(src)
@ -84,6 +93,12 @@ def try_copy(src, dst, add_write_perm=True):
new_mode = os.lstat(dstfile).st_mode | stat.S_IWUSR | stat.S_IWGRP
os.chmod(dstfile, new_mode)
except FileNotFoundError as e:
if optional:
log('Error while copying to \"' + dst + '\": ' + e.strerror)
else:
raise
except PermissionError as e:
if e.errno == errno.EPERM:
#be forgiving about permissions errors; if it's a real problem, things will explode later anyway
@ -127,6 +142,87 @@ def try_get_game_library_dir():
return None
# Function to find the installed location of DLL files for use by Wine/Proton
# from the NVIDIA Linux driver
#
# See https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/issues/71 for
# background on the chosen method of DLL discovery.
#
# On success, returns a str() of the absolute-path to the directory at which DLL
# files are stored
#
# On failure, returns None
def find_nvidia_wine_dll_dir():
try:
libdl = CDLL("libdl.so.2")
except (OSError):
return None
try:
libglx_nvidia = CDLL("libGLX_nvidia.so.0")
except OSError:
return None
# from dlinfo(3)
#
# struct link_map {
# ElfW(Addr) l_addr; /* Difference between the
# address in the ELF file and
# the address in memory */
# char *l_name; /* Absolute pathname where
# object was found */
# ElfW(Dyn) *l_ld; /* Dynamic section of the
# shared object */
# struct link_map *l_next, *l_prev;
# /* Chain of loaded objects */
#
# /* Plus additional fields private to the
# implementation */
# };
RTLD_DI_LINKMAP = 2
class link_map(Structure):
_fields_ = [("l_addr", c_void_p), ("l_name", c_char_p), ("l_ld", c_void_p)]
# from dlinfo(3)
#
# int dlinfo (void *restrict handle, int request, void *restrict info)
dlinfo_func = libdl.dlinfo
dlinfo_func.argtypes = c_void_p, c_int, c_void_p
dlinfo_func.restype = c_int
# Allocate a link_map object
glx_nvidia_info_ptr = POINTER(link_map)()
# Run dlinfo(3) on the handle to libGLX_nvidia.so.0, storing results at the
# address represented by glx_nvidia_info_ptr
if dlinfo_func(libglx_nvidia._handle,
RTLD_DI_LINKMAP,
addressof(glx_nvidia_info_ptr)) != 0:
return None
# Grab the contents our of our pointer
glx_nvidia_info = cast(glx_nvidia_info_ptr, POINTER(link_map)).contents
# Decode the path to our library to a str()
if glx_nvidia_info.l_name is None:
return None
try:
libglx_nvidia_path = os.fsdecode(glx_nvidia_info.l_name)
except UnicodeDecodeError:
return None
# Follow any symlinks to the actual file
libglx_nvidia_realpath = os.path.realpath(libglx_nvidia_path)
# Go to the relative path ./nvidia/wine from our library
nvidia_wine_dir = os.path.join(os.path.dirname(libglx_nvidia_realpath), "nvidia", "wine")
# Check that nvngx.dll exists here, or fail
if os.path.exists(os.path.join(nvidia_wine_dir, "nvngx.dll")):
return nvidia_wine_dir
return None
EXT2_IOC_GETFLAGS = 0x80086601
EXT2_IOC_SETFLAGS = 0x40086602
@ -149,14 +245,14 @@ def set_dir_casefold_bit(dir_path):
class Proton:
def __init__(self, base_dir):
self.base_dir = base_dir + "/"
self.dist_dir = self.path("dist/")
self.bin_dir = self.path("dist/bin/")
self.lib_dir = self.path("dist/lib/")
self.lib64_dir = self.path("dist/lib64/")
self.fonts_dir = self.path("dist/share/fonts/")
self.wine_fonts_dir = self.path("dist/share/wine/fonts/")
self.dist_dir = self.path("files/")
self.bin_dir = self.path("files/bin/")
self.lib_dir = self.path("files/lib/")
self.lib64_dir = self.path("files/lib64/")
self.fonts_dir = self.path("files/share/fonts/")
self.wine_fonts_dir = self.path("files/share/wine/fonts/")
self.version_file = self.path("version")
self.default_pfx_dir = self.path("dist/share/default_pfx/")
self.default_pfx_dir = self.path("files/share/default_pfx/")
self.user_settings_file = self.path("user_settings.py")
self.wine_bin = self.bin_dir + "wine"
self.wineserver_bin = self.bin_dir + "wineserver"
@ -165,28 +261,34 @@ class Proton:
def path(self, d):
return self.base_dir + d
def need_tarball_extraction(self):
'''Checks if the proton_dist tarball archive must be extracted. Returns true if extraction is needed, false otherwise'''
return not os.path.exists(self.dist_dir) or \
not os.path.exists(self.path("dist/version")) or \
not filecmp.cmp(self.version_file, self.path("dist/version"))
def cleanup_legacy_dist(self):
old_dist_dir = self.path("dist/")
if os.path.exists(old_dist_dir):
with self.dist_lock:
if os.path.exists(old_dist_dir):
shutil.rmtree(old_dist_dir)
def extract_tarball(self):
with self.dist_lock:
if self.need_tarball_extraction():
if os.path.exists(self.dist_dir):
shutil.rmtree(self.dist_dir)
tar = None
for sf in ["", ".xz", ".bz2", ".gz"]:
if os.path.exists(self.path("proton_dist.tar" + sf)):
tar = tarfile.open(self.path("proton_dist.tar" + sf), mode="r:*")
break
if not tar:
log("No proton_dist tarball??")
sys.exit(1)
tar.extractall(path=self.dist_dir)
tar.close()
try_copy(self.version_file, self.dist_dir)
def do_steampipe_fixups(self):
fixups_json = self.path("steampipe_fixups.json")
fixups_mtime = self.path("files/steampipe_fixups_mtime")
if os.path.exists(fixups_json):
with self.dist_lock:
import steampipe_fixups
current_fixup_mtime = None
if os.path.exists(fixups_mtime):
with open(fixups_mtime, "r") as f:
current_fixup_mtime = f.readline().strip()
new_fixup_mtime = getmtimestr(fixups_json)
if current_fixup_mtime != new_fixup_mtime:
result_code = steampipe_fixups.do_restore(self.base_dir, fixups_json)
if result_code == 0:
with open(fixups_mtime, "w") as f:
f.write(new_fixup_mtime + "\n")
def missing_default_prefix(self):
'''Check if the default prefix dir is missing. Returns true if missing, false if present'''
@ -432,11 +534,18 @@ class CompatData:
if not os.path.exists(self.prefix_dir + "/user.reg"):
self.copy_pfx()
if not os.path.lexists(self.prefix_dir + "/dosdevices/c:"):
os.symlink("../drive_c", self.prefix_dir + "/dosdevices/c:")
if not os.path.lexists(self.prefix_dir + "/dosdevices/z:"):
os.symlink("/", self.prefix_dir + "/dosdevices/z:")
# collect configuration info
steamdir = os.environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"]
use_wined3d = "wined3d" in g_session.compat_config
use_dxvk_dxgi = "WINEDLLOVERRIDES" in g_session.env and "dxgi=n" in g_session.env["WINEDLLOVERRIDES"]
use_dxvk_dxgi = not ("WINEDLLOVERRIDES" in g_session.env and "dxgi=b" in g_session.env["WINEDLLOVERRIDES"])
use_nvapi = 'enablenvapi' in g_session.compat_config
builtin_dll_copy = os.environ.get("PROTON_DLL_COPY",
#dxsetup redist
@ -481,22 +590,22 @@ class CompatData:
str(use_wined3d),
str(use_dxvk_dxgi),
builtin_dll_copy,
str(use_nvapi),
))
if old_ver == CURRENT_PREFIX_VERSION:
# check whether any prefix config has changed
try:
with open(self.config_info_file, "r") as f:
old_prefix_info = f.read()
except IOError:
old_prefix_info = ""
# check whether any prefix config has changed
try:
with open(self.config_info_file, "r") as f:
old_prefix_info = f.read()
except IOError:
old_prefix_info = ""
if old_prefix_info != prefix_info:
# update builtin dll symlinks or copies
self.update_builtin_libs(builtin_dll_copy)
if old_prefix_info != prefix_info:
# update builtin dll symlinks or copies
self.update_builtin_libs(builtin_dll_copy)
with open(self.config_info_file, "w") as f:
f.write(prefix_info)
with open(self.config_info_file, "w") as f:
f.write(prefix_info)
with open(self.version_file, "w") as f:
f.write(CURRENT_PREFIX_VERSION + "\n")
@ -556,7 +665,6 @@ class CompatData:
dxvkfiles = ["dxvk_config", "d3d11", "d3d10", "d3d10core", "d3d10_1", "d3d9"]
wined3dfiles = []
#if the user asked for dxvk's dxgi (dxgi=n), then copy it into place
if use_dxvk_dxgi:
dxvkfiles.append("dxgi")
else:
@ -575,6 +683,32 @@ class CompatData:
self.prefix_dir + "drive_c/windows/syswow64/" + f + ".dll")
g_session.dlloverrides[f] = "n"
# If the user requested the NVAPI be available, copy it into place.
# If they didn't, clean up any stray nvapi DLLs.
if use_nvapi:
try_copy(g_proton.lib64_dir + "wine/nvapi/nvapi64.dll",
self.prefix_dir + "drive_c/windows/system32/nvapi64.dll")
try_copy(g_proton.lib_dir + "wine/nvapi/nvapi.dll",
self.prefix_dir + "drive_c/windows/syswow64/nvapi.dll")
g_session.dlloverrides["nvapi64"] = "n"
g_session.dlloverrides["nvapi"] = "n"
else:
nvapi64_dll = self.prefix_dir + "drive_c/windows/system32/nvapi64.dll"
nvapi32_dll = self.prefix_dir + "drive_c/windows/syswow64/nvapi.dll"
if os.path.exists(nvapi64_dll):
os.unlink(nvapi64_dll)
if os.path.exists(nvapi32_dll):
os.unlink(nvapi32_dll)
# Try to detect known DLLs that ship with the NVIDIA Linux Driver
# and add them into the prefix
nvidia_wine_dll_dir = find_nvidia_wine_dll_dir()
if nvidia_wine_dll_dir:
for dll in ["_nvngx.dll", "nvngx.dll"]:
try_copy(nvidia_wine_dll_dir + "/" + dll,
self.prefix_dir + "drive_c/windows/system32/" + dll,
optional=True)
try_copy(g_proton.lib64_dir + "wine/vkd3d-proton/d3d12.dll",
self.prefix_dir + "drive_c/windows/system32/d3d12.dll")
try_copy(g_proton.lib_dir + "wine/vkd3d-proton/d3d12.dll",
@ -740,6 +874,7 @@ class Session:
self.check_environment("PROTON_SET_GAME_DRIVE", "gamedrive")
self.check_environment("PROTON_NO_XIM", "noxim")
self.check_environment("PROTON_HEAP_DELAY_FREE", "heapdelayfree")
self.check_environment("PROTON_ENABLE_NVAPI", "enablenvapi")
if "noesync" in self.compat_config:
self.env.pop("WINEESYNC", "")
@ -779,6 +914,9 @@ class Session:
if "hidenvgpu" in self.compat_config:
self.env["WINE_HIDE_NVIDIA_GPU"] = "1"
if "PROTON_CRASH_REPORT_DIR" in self.env:
self.env["WINE_CRASH_REPORT_DIR"] = self.env["PROTON_CRASH_REPORT_DIR"]
if "SteamGameId" in self.env:
if self.env["WINEDEBUG"] != "-all":
basedir = self.env.get("PROTON_LOG_DIR", os.environ["HOME"])
@ -967,8 +1105,8 @@ if __name__ == "__main__":
g_proton = Proton(os.path.dirname(sys.argv[0]))
if g_proton.need_tarball_extraction():
g_proton.extract_tarball()
g_proton.cleanup_legacy_dist()
g_proton.do_steampipe_fixups()
g_compatdata = CompatData(os.environ["STEAM_COMPAT_DATA_PATH"])

116
steampipe_fixups.py Executable file
View File

@ -0,0 +1,116 @@
#!/usr/bin/env python3
#Steampipe doesn't support certain unix-y things which may be required by
#native Linux applications. This file will process a directory of Linux files
#and store the file properties into a manifest file. After a round trip through
#Steampipe, the original file properties can be restored using this same
#script.
import json
import os
import secrets
import stat
DEFAULT_MANIFEST_NAME = "steampipe_fixups.json"
def usage():
print("Usage:")
print("\t" + sys.argv[0] + "\tprepare\t<path to directory to process>\t[manifest output file]")
print("\t\tProcess the given path and output the manifest file to the given path, or <path/" + DEFAULT_MANIFEST_NAME + "> if unspecified.")
print("")
print("\t" + sys.argv[0] + "\trestore\t<path to directory to process>\t[manifest file]")
print("\t\tRestore the given path using the manifest file, or <path/" + DEFAULT_MANIFEST_NAME + "> if unspecified.")
empty_dirs = []
no_write_paths = []
def canonicalize(path, prefix):
return path.replace(prefix, "", 1).lstrip('/')
def process_dir(path):
for root, subdirs, files in os.walk(path):
if len(subdirs) == 0 and len(files) == 0:
empty_dirs.append(canonicalize(root, path))
for file_ in files:
this_file = os.path.join(root, file_)
stat_result = os.lstat(this_file)
if (stat_result.st_mode & stat.S_IWUSR) == 0:
no_write_paths.append(canonicalize(this_file, path))
return 0
def write_manifest(manifest):
out = open(manifest, "w")
json.dump(
{
"id": str(secrets.randbits(32)), #we need steampipe to update this file for every build
"empty_dirs": empty_dirs,
"no_write_paths": no_write_paths,
},
out,
indent = 4,
sort_keys = True
)
return 0
def do_process(path, manifest):
if os.path.exists(manifest):
os.remove(manifest)
ret = process_dir(path)
if ret != 0:
return ret
#output should be deterministic
empty_dirs.sort()
no_write_paths.sort()
ret = write_manifest(manifest)
if ret != 0:
return ret
return 0
def do_restore(path, manifest):
loaded = json.load(open(manifest, "r"))
empty_dirs = loaded["empty_dirs"]
no_write_paths = loaded["no_write_paths"]
for empty_dir in empty_dirs:
try:
os.makedirs(os.path.join(path, empty_dir))
except OSError:
#already exists
pass
for file_ in no_write_paths:
this_file = os.path.join(path, file_)
stat_result = os.lstat(this_file)
os.chmod(this_file,
stat_result.st_mode & ~(stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH))
return 0
if __name__ == '__main__':
import sys
if len(sys.argv) < 3 or len(sys.argv) > 4:
usage()
sys.exit(1)
verb = sys.argv[1]
path = sys.argv[2]
if len(sys.argv) >= 4:
manifest = sys.argv[3]
else:
manifest = os.path.join(path, DEFAULT_MANIFEST_NAME)
if verb == "process":
sys.exit(do_process(path, manifest))
if verb == "restore":
sys.exit(do_restore(path, manifest))
usage()
sys.exit(1)

@ -1 +1 @@
Subproject commit 3ed3526332f53d7d35cf1b685fa8096b01f26ff0
Subproject commit ec5b4ccecf799e7593dd3c6e8b13dc4f04e77228

2
wine

@ -1 +1 @@
Subproject commit f94b0f7590d43bb3e6aefcc6e16cf69bffc25122
Subproject commit 1e6d4d63ac5a247613d883f59a6e0f9472af7f59

View File

@ -178,6 +178,11 @@ FUNCTION_OVERRIDES = {
"xrCreateSwapchain" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrDestroySwapchain" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrEndFrame" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrCreateSceneObserverMSFT" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrDestroySceneObserverMSFT" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrCreateSceneMSFT" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrDestroySceneMSFT" : {"dispatch" : True, "driver" : True, "thunk" : False},
}
STRUCT_CHAIN_CONVERSIONS = [
@ -831,6 +836,8 @@ class XrHandle(object):
return "wine_session->wine_instance->funcs"
if self.parent in ["XrActionSet"]:
return "wine_action_set->wine_instance->funcs"
if self.parent in ["XrSceneObserverMSFT"]:
return "wine_scene_observer_msft->wine_session->wine_instance->funcs"
LOGGER.error("Unhandled dispatchable parent: {0}".format(self.parent))
@ -881,6 +888,10 @@ class XrHandle(object):
return None
if self.name == "XrSpace":
return None
if self.name == "XrSceneObserverMSFT":
native_handle_name = "scene_observer_msft"
if self.name == "XrSceneMSFT":
native_handle_name = "scene_msft"
if native_handle_name:
return "((wine_{0} *){1})->{2}".format(self.name, name, native_handle_name)
@ -1616,10 +1627,15 @@ class XrStruct(Sequence):
if self.is_alias() and not conv:
return ""
if self.union:
text = "union {0}".format(self.name)
if conv:
text = "typedef "
else:
text = "struct {0}".format(self.name)
text = ""
if self.union:
text += "union {0}".format(self.name)
else:
text += "struct {0}".format(self.name)
if postfix is not None:
text += postfix
@ -1635,7 +1651,10 @@ class XrStruct(Sequence):
text += " {0};\n".format(m.definition())
if postfix is not None:
text += "}} {1};\n\n".format(self.name, postfix)
if conv:
text += "}} {0}{1};\n\n".format(self.name, postfix)
else:
text += "}} {1};\n\n".format(self.name, postfix)
else:
text += "}};\n".format(self.name)

View File

@ -1022,12 +1022,108 @@ XrResult WINAPI wine_xrDestroySpatialAnchorMSFT(XrSpatialAnchorMSFT anchor)
return XR_SUCCESS;
}
XrResult WINAPI wine_xrCreateSceneObserverMSFT(XrSession session,
const XrSceneObserverCreateInfoMSFT *createInfo, XrSceneObserverMSFT *observer)
{
wine_XrSession *wine_session = (wine_XrSession *)session;
wine_XrSceneObserverMSFT *wine_scene_observer_msft;
XrResult res;
WINE_TRACE("%p, %p, %p\n", session, createInfo, observer);
wine_scene_observer_msft = heap_alloc_zero(sizeof(*wine_scene_observer_msft));
res = wine_session->wine_instance->funcs.p_xrCreateSceneObserverMSFT(wine_session->session,
createInfo, &wine_scene_observer_msft->scene_observer_msft);
if(res != XR_SUCCESS){
WINE_WARN("xrCreateSceneObserverMSFT failed: %d\n", res);
heap_free(wine_scene_observer_msft);
return res;
}
wine_scene_observer_msft->wine_session = wine_session;
*observer = (XrSceneObserverMSFT)wine_scene_observer_msft;
WINE_TRACE("allocated wine sceneObserver %p for native sceneObserver %p\n",
wine_scene_observer_msft, wine_scene_observer_msft->scene_observer_msft);
return XR_SUCCESS;
}
XrResult WINAPI wine_xrDestroySceneObserverMSFT(XrSceneObserverMSFT observer)
{
wine_XrSceneObserverMSFT *wine_observer = (wine_XrSceneObserverMSFT *)observer;
XrResult res;
WINE_TRACE("%p\n", observer);
res = wine_observer->wine_session->wine_instance->funcs.p_xrDestroySceneObserverMSFT(wine_observer->scene_observer_msft);
if(res != XR_SUCCESS){
WINE_WARN("xrDestroySceneObserverMSFT failed: %d\n", res);
return res;
}
heap_free(wine_observer);
return XR_SUCCESS;
}
XrResult WINAPI wine_xrCreateSceneMSFT(XrSceneObserverMSFT observer,
const XrSceneCreateInfoMSFT *createInfo, XrSceneMSFT *scene)
{
wine_XrSceneObserverMSFT *wine_observer = (wine_XrSceneObserverMSFT *)observer;
wine_XrSceneMSFT *wine_scene_msft;
XrResult res;
WINE_TRACE("%p, %p, %p\n", observer, createInfo, scene);
wine_scene_msft = heap_alloc_zero(sizeof(*wine_scene_msft));
res = wine_observer->wine_session->wine_instance->funcs.p_xrCreateSceneMSFT(wine_observer->scene_observer_msft,
createInfo, &wine_scene_msft->scene_msft);
if(res != XR_SUCCESS){
WINE_WARN("xrCreateSceneMSFT failed: %d\n", res);
heap_free(wine_scene_msft);
return res;
}
wine_scene_msft->wine_scene_observer_msft = wine_observer;
*scene = (XrSceneMSFT)wine_scene_msft;
WINE_TRACE("allocated wine sceneMSFT %p for native sceneMSFT %p\n",
wine_scene_msft, wine_scene_msft->scene_msft);
return XR_SUCCESS;
}
XrResult WINAPI wine_xrDestroySceneMSFT(XrSceneMSFT scene)
{
wine_XrSceneMSFT *wine_scene = (wine_XrSceneMSFT *)scene;
XrResult res;
WINE_TRACE("%p\n", scene);
res = wine_scene->wine_scene_observer_msft->wine_session->wine_instance->funcs.p_xrDestroySceneMSFT(wine_scene->scene_msft);
if(res != XR_SUCCESS){
WINE_WARN("xrDestroySceneMSFT failed: %d\n", res);
return res;
}
heap_free(wine_scene);
return XR_SUCCESS;
}
XrResult WINAPI wine_xrNegotiateLoaderRuntimeInterface(
const XrNegotiateLoaderInfo_win *loaderInfo,
XrNegotiateRuntimeRequest_win *runtimeRequest)
{
XrResult res;
WINE_TRACE("%p %p\n", loaderInfo, runtimeRequest);
if(!loaderInfo || !runtimeRequest)
return XR_ERROR_INITIALIZATION_FAILED;

View File

@ -50,6 +50,16 @@ typedef struct wine_XrSpatialAnchorMSFT {
struct wine_XrSession *wine_session;
} wine_XrSpatialAnchorMSFT;
typedef struct wine_XrSceneObserverMSFT {
XrSceneObserverMSFT scene_observer_msft;
struct wine_XrSession *wine_session;
} wine_XrSceneObserverMSFT;
typedef struct wine_XrSceneMSFT {
XrSceneMSFT scene_msft;
struct wine_XrSceneObserverMSFT *wine_scene_observer_msft;
} wine_XrSceneMSFT;
typedef struct wine_XrSwapchain{
XrSwapchain swapchain;
struct wine_XrSession *wine_session;

View File

@ -3,7 +3,7 @@
* This file is generated from OpenXR xr.xml file covered
* by the following copyright and permission notice:
*
* Copyright (c) 2017-2020 The Khronos Group Inc.
* Copyright (c) 2017-2021, The Khronos Group Inc.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
@ -30,6 +30,15 @@
WINE_DEFAULT_DEBUG_CHANNEL(openxr);
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_XrSceneMeshBuffersGetInfoMSFT_win_to_host(const XrSceneMeshBuffersGetInfoMSFT *in, XrSceneMeshBuffersGetInfoMSFT_host *out)
{
if (!in) return;
out->type = in->type;
out->next = in->next;
out->meshBufferId = in->meshBufferId;
}
#endif /* USE_STRUCT_CONVERSION */
XrResult convert_XrInstanceCreateInfo_struct_chain(const void *next, XrInstanceCreateInfo *out_struct)
@ -98,6 +107,12 @@ XrResult WINAPI wine_xrBeginSession(XrSession session, const XrSessionBeginInfo
return xrBeginSession(((wine_XrSession *)session)->session, beginInfo);
}
static XrResult WINAPI wine_xrComputeNewSceneMSFT(XrSceneObserverMSFT sceneObserver, const XrNewSceneComputeInfoMSFT *computeInfo)
{
WINE_TRACE("%p, %p\n", sceneObserver, computeInfo);
return ((wine_XrSceneObserverMSFT *)sceneObserver)->wine_session->wine_instance->funcs.p_xrComputeNewSceneMSFT(((wine_XrSceneObserverMSFT *)sceneObserver)->scene_observer_msft, computeInfo);
}
XrResult WINAPI wine_xrCreateAction(XrActionSet actionSet, const XrActionCreateInfo *createInfo, XrAction *action)
{
WINE_TRACE("%p, %p, %p\n", actionSet, createInfo, action);
@ -140,6 +155,12 @@ static XrResult WINAPI wine_xrCreateSpatialGraphNodeSpaceMSFT(XrSession session,
return ((wine_XrSession *)session)->wine_instance->funcs.p_xrCreateSpatialGraphNodeSpaceMSFT(((wine_XrSession *)session)->session, createInfo, space);
}
static XrResult WINAPI wine_xrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, const XrSceneDeserializeInfoMSFT *deserializeInfo)
{
WINE_TRACE("%p, %p\n", sceneObserver, deserializeInfo);
return ((wine_XrSceneObserverMSFT *)sceneObserver)->wine_session->wine_instance->funcs.p_xrDeserializeSceneMSFT(((wine_XrSceneObserverMSFT *)sceneObserver)->scene_observer_msft, deserializeInfo);
}
XrResult WINAPI wine_xrDestroyAction(XrAction action)
{
WINE_TRACE("%p\n", action);
@ -200,6 +221,18 @@ XrResult WINAPI wine_xrEnumerateReferenceSpaces(XrSession session, uint32_t spac
return xrEnumerateReferenceSpaces(((wine_XrSession *)session)->session, spaceCapacityInput, spaceCountOutput, spaces);
}
static XrResult WINAPI wine_xrEnumerateReprojectionModesMSFT(XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, uint32_t modeCapacityInput, uint32_t *modeCountOutput, XrReprojectionModeMSFT *modes)
{
WINE_TRACE("%p, 0x%s, %#x, %u, %p, %p\n", instance, wine_dbgstr_longlong(systemId), viewConfigurationType, modeCapacityInput, modeCountOutput, modes);
return ((wine_XrInstance *)instance)->funcs.p_xrEnumerateReprojectionModesMSFT(((wine_XrInstance *)instance)->instance, systemId, viewConfigurationType, modeCapacityInput, modeCountOutput, modes);
}
static XrResult WINAPI wine_xrEnumerateSceneComputeFeaturesMSFT(XrInstance instance, XrSystemId systemId, uint32_t featureCapacityInput, uint32_t *featureCountOutput, XrSceneComputeFeatureMSFT *features)
{
WINE_TRACE("%p, 0x%s, %u, %p, %p\n", instance, wine_dbgstr_longlong(systemId), featureCapacityInput, featureCountOutput, features);
return ((wine_XrInstance *)instance)->funcs.p_xrEnumerateSceneComputeFeaturesMSFT(((wine_XrInstance *)instance)->instance, systemId, featureCapacityInput, featureCountOutput, features);
}
XrResult WINAPI wine_xrEnumerateViewConfigurationViews(XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, uint32_t viewCapacityInput, uint32_t *viewCountOutput, XrViewConfigurationView *views)
{
WINE_TRACE("%p, 0x%s, %#x, %u, %p, %p\n", instance, wine_dbgstr_longlong(systemId), viewConfigurationType, viewCapacityInput, viewCountOutput, views);
@ -236,6 +269,18 @@ XrResult WINAPI wine_xrGetActionStateVector2f(XrSession session, const XrActionS
return xrGetActionStateVector2f(((wine_XrSession *)session)->session, getInfo, state);
}
static XrResult WINAPI wine_xrGetAudioInputDeviceGuidOculus(XrInstance instance, wchar_t buffer[])
{
WINE_TRACE("%p, %p\n", instance, buffer);
return ((wine_XrInstance *)instance)->funcs.p_xrGetAudioInputDeviceGuidOculus(((wine_XrInstance *)instance)->instance, buffer);
}
static XrResult WINAPI wine_xrGetAudioOutputDeviceGuidOculus(XrInstance instance, wchar_t buffer[])
{
WINE_TRACE("%p, %p\n", instance, buffer);
return ((wine_XrInstance *)instance)->funcs.p_xrGetAudioOutputDeviceGuidOculus(((wine_XrInstance *)instance)->instance, buffer);
}
static XrResult WINAPI wine_xrGetControllerModelKeyMSFT(XrSession session, XrPath topLevelUserPath, XrControllerModelKeyStateMSFT *controllerModelKeyState)
{
WINE_TRACE("%p, 0x%s, %p\n", session, wine_dbgstr_longlong(topLevelUserPath), controllerModelKeyState);
@ -290,6 +335,47 @@ XrResult WINAPI wine_xrGetReferenceSpaceBoundsRect(XrSession session, XrReferenc
return xrGetReferenceSpaceBoundsRect(((wine_XrSession *)session)->session, referenceSpaceType, bounds);
}
static XrResult WINAPI wine_xrGetSceneComponentsMSFT(XrSceneMSFT scene, const XrSceneComponentsGetInfoMSFT *getInfo, XrSceneComponentsMSFT *components)
{
WINE_TRACE("%p, %p, %p\n", scene, getInfo, components);
return ((wine_XrSceneMSFT *)scene)->wine_scene_observer_msft->wine_session->wine_instance->funcs.p_xrGetSceneComponentsMSFT(((wine_XrSceneMSFT *)scene)->scene_msft, getInfo, components);
}
static XrResult WINAPI wine_xrGetSceneComputeStateMSFT(XrSceneObserverMSFT sceneObserver, XrSceneComputeStateMSFT *state)
{
WINE_TRACE("%p, %p\n", sceneObserver, state);
return ((wine_XrSceneObserverMSFT *)sceneObserver)->wine_session->wine_instance->funcs.p_xrGetSceneComputeStateMSFT(((wine_XrSceneObserverMSFT *)sceneObserver)->scene_observer_msft, state);
}
static XrResult WINAPI wine_xrGetSceneMeshBuffersMSFT(XrSceneMSFT scene, const XrSceneMeshBuffersGetInfoMSFT *getInfo, XrSceneMeshBuffersMSFT *buffers)
{
#if defined(USE_STRUCT_CONVERSION)
XrResult result;
XrSceneMeshBuffersGetInfoMSFT_host getInfo_host;
WINE_TRACE("%p, %p, %p\n", scene, getInfo, buffers);
convert_XrSceneMeshBuffersGetInfoMSFT_win_to_host(getInfo, &getInfo_host);
result = ((wine_XrSceneMSFT *)scene)->wine_scene_observer_msft->wine_session->wine_instance->funcs.p_xrGetSceneMeshBuffersMSFT(((wine_XrSceneMSFT *)scene)->scene_msft, &getInfo_host, buffers);
return result;
#else
WINE_TRACE("%p, %p, %p\n", scene, getInfo, buffers);
return ((wine_XrSceneMSFT *)scene)->wine_scene_observer_msft->wine_session->wine_instance->funcs.p_xrGetSceneMeshBuffersMSFT(((wine_XrSceneMSFT *)scene)->scene_msft, getInfo, buffers);
#endif
}
static XrResult WINAPI wine_xrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, const XrSerializedSceneFragmentDataGetInfoMSFT *getInfo, uint32_t countInput, uint32_t *readOutput, uint8_t *buffer)
{
WINE_TRACE("%p, %p, %u, %p, %p\n", scene, getInfo, countInput, readOutput, buffer);
return ((wine_XrSceneMSFT *)scene)->wine_scene_observer_msft->wine_session->wine_instance->funcs.p_xrGetSerializedSceneFragmentDataMSFT(((wine_XrSceneMSFT *)scene)->scene_msft, getInfo, countInput, readOutput, buffer);
}
static XrResult WINAPI wine_xrGetSwapchainStateFB(XrSwapchain swapchain, XrSwapchainStateBaseHeaderFB *state)
{
WINE_TRACE("%p, %p\n", swapchain, state);
return ((wine_XrSwapchain *)swapchain)->wine_session->wine_instance->funcs.p_xrGetSwapchainStateFB(((wine_XrSwapchain *)swapchain)->swapchain, state);
}
XrResult WINAPI wine_xrGetSystemProperties(XrInstance instance, XrSystemId systemId, XrSystemProperties *properties)
{
WINE_TRACE("%p, 0x%s, %p\n", instance, wine_dbgstr_longlong(systemId), properties);
@ -332,6 +418,12 @@ static XrResult WINAPI wine_xrLocateHandJointsEXT(XrHandTrackerEXT handTracker,
return ((wine_XrHandTrackerEXT *)handTracker)->wine_session->wine_instance->funcs.p_xrLocateHandJointsEXT(((wine_XrHandTrackerEXT *)handTracker)->hand_tracker, locateInfo, locations);
}
static XrResult WINAPI wine_xrLocateSceneComponentsMSFT(XrSceneMSFT scene, const XrSceneComponentsLocateInfoMSFT *locateInfo, XrSceneComponentLocationsMSFT *locations)
{
WINE_TRACE("%p, %p, %p\n", scene, locateInfo, locations);
return ((wine_XrSceneMSFT *)scene)->wine_scene_observer_msft->wine_session->wine_instance->funcs.p_xrLocateSceneComponentsMSFT(((wine_XrSceneMSFT *)scene)->scene_msft, locateInfo, locations);
}
XrResult WINAPI wine_xrLocateSpace(XrSpace space, XrSpace baseSpace, XrTime time, XrSpaceLocation *location)
{
WINE_TRACE("%p, %p, 0x%s, %p\n", space, baseSpace, wine_dbgstr_longlong(time), location);
@ -386,6 +478,12 @@ static XrResult WINAPI wine_xrSetColorSpaceFB(XrSession session, const XrColorSp
return ((wine_XrSession *)session)->wine_instance->funcs.p_xrSetColorSpaceFB(((wine_XrSession *)session)->session, colorspace);
}
static XrResult WINAPI wine_xrSetEnvironmentDepthEstimationVARJO(XrSession session, XrBool32 enabled)
{
WINE_TRACE("%p, %u\n", session, enabled);
return ((wine_XrSession *)session)->wine_instance->funcs.p_xrSetEnvironmentDepthEstimationVARJO(((wine_XrSession *)session)->session, enabled);
}
static XrResult WINAPI wine_xrSetInputDeviceActiveEXT(XrSession session, XrPath interactionProfile, XrPath topLevelPath, XrBool32 isActive)
{
WINE_TRACE("%p, 0x%s, 0x%s, %u\n", session, wine_dbgstr_longlong(interactionProfile), wine_dbgstr_longlong(topLevelPath), isActive);
@ -458,6 +556,12 @@ static XrResult WINAPI wine_xrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, c
return ((wine_XrHandTrackerEXT *)handTracker)->wine_session->wine_instance->funcs.p_xrUpdateHandMeshMSFT(((wine_XrHandTrackerEXT *)handTracker)->hand_tracker, updateInfo, handMesh);
}
static XrResult WINAPI wine_xrUpdateSwapchainFB(XrSwapchain swapchain, const XrSwapchainStateBaseHeaderFB *state)
{
WINE_TRACE("%p, %p\n", swapchain, state);
return ((wine_XrSwapchain *)swapchain)->wine_session->wine_instance->funcs.p_xrUpdateSwapchainFB(((wine_XrSwapchain *)swapchain)->swapchain, state);
}
XrResult WINAPI wine_xrWaitFrame(XrSession session, const XrFrameWaitInfo *frameWaitInfo, XrFrameState *frameState)
{
WINE_TRACE("%p, %p, %p\n", session, frameWaitInfo, frameState);
@ -477,6 +581,7 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrAttachSessionActionSets", &wine_xrAttachSessionActionSets},
{"xrBeginFrame", &wine_xrBeginFrame},
{"xrBeginSession", &wine_xrBeginSession},
{"xrComputeNewSceneMSFT", &wine_xrComputeNewSceneMSFT},
{"xrConvertTimeToWin32PerformanceCounterKHR", &wine_xrConvertTimeToWin32PerformanceCounterKHR},
{"xrConvertWin32PerformanceCounterToTimeKHR", &wine_xrConvertWin32PerformanceCounterToTimeKHR},
{"xrCreateAction", &wine_xrCreateAction},
@ -486,6 +591,8 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrCreateHandTrackerEXT", &wine_xrCreateHandTrackerEXT},
{"xrCreateInstance", &wine_xrCreateInstance},
{"xrCreateReferenceSpace", &wine_xrCreateReferenceSpace},
{"xrCreateSceneMSFT", &wine_xrCreateSceneMSFT},
{"xrCreateSceneObserverMSFT", &wine_xrCreateSceneObserverMSFT},
{"xrCreateSession", &wine_xrCreateSession},
{"xrCreateSpatialAnchorMSFT", &wine_xrCreateSpatialAnchorMSFT},
{"xrCreateSpatialAnchorSpaceMSFT", &wine_xrCreateSpatialAnchorSpaceMSFT},
@ -493,10 +600,13 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrCreateSwapchain", &wine_xrCreateSwapchain},
{"xrCreateVulkanDeviceKHR", &wine_xrCreateVulkanDeviceKHR},
{"xrCreateVulkanInstanceKHR", &wine_xrCreateVulkanInstanceKHR},
{"xrDeserializeSceneMSFT", &wine_xrDeserializeSceneMSFT},
{"xrDestroyAction", &wine_xrDestroyAction},
{"xrDestroyActionSet", &wine_xrDestroyActionSet},
{"xrDestroyHandTrackerEXT", &wine_xrDestroyHandTrackerEXT},
{"xrDestroyInstance", &wine_xrDestroyInstance},
{"xrDestroySceneMSFT", &wine_xrDestroySceneMSFT},
{"xrDestroySceneObserverMSFT", &wine_xrDestroySceneObserverMSFT},
{"xrDestroySession", &wine_xrDestroySession},
{"xrDestroySpace", &wine_xrDestroySpace},
{"xrDestroySpatialAnchorMSFT", &wine_xrDestroySpatialAnchorMSFT},
@ -510,6 +620,8 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrEnumerateEnvironmentBlendModes", &wine_xrEnumerateEnvironmentBlendModes},
{"xrEnumerateInstanceExtensionProperties", &wine_xrEnumerateInstanceExtensionProperties},
{"xrEnumerateReferenceSpaces", &wine_xrEnumerateReferenceSpaces},
{"xrEnumerateReprojectionModesMSFT", &wine_xrEnumerateReprojectionModesMSFT},
{"xrEnumerateSceneComputeFeaturesMSFT", &wine_xrEnumerateSceneComputeFeaturesMSFT},
{"xrEnumerateSwapchainFormats", &wine_xrEnumerateSwapchainFormats},
{"xrEnumerateSwapchainImages", &wine_xrEnumerateSwapchainImages},
{"xrEnumerateViewConfigurationViews", &wine_xrEnumerateViewConfigurationViews},
@ -518,6 +630,8 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrGetActionStateFloat", &wine_xrGetActionStateFloat},
{"xrGetActionStatePose", &wine_xrGetActionStatePose},
{"xrGetActionStateVector2f", &wine_xrGetActionStateVector2f},
{"xrGetAudioInputDeviceGuidOculus", &wine_xrGetAudioInputDeviceGuidOculus},
{"xrGetAudioOutputDeviceGuidOculus", &wine_xrGetAudioOutputDeviceGuidOculus},
{"xrGetControllerModelKeyMSFT", &wine_xrGetControllerModelKeyMSFT},
{"xrGetControllerModelPropertiesMSFT", &wine_xrGetControllerModelPropertiesMSFT},
{"xrGetControllerModelStateMSFT", &wine_xrGetControllerModelStateMSFT},
@ -530,6 +644,11 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrGetInstanceProperties", &wine_xrGetInstanceProperties},
{"xrGetOpenGLGraphicsRequirementsKHR", &wine_xrGetOpenGLGraphicsRequirementsKHR},
{"xrGetReferenceSpaceBoundsRect", &wine_xrGetReferenceSpaceBoundsRect},
{"xrGetSceneComponentsMSFT", &wine_xrGetSceneComponentsMSFT},
{"xrGetSceneComputeStateMSFT", &wine_xrGetSceneComputeStateMSFT},
{"xrGetSceneMeshBuffersMSFT", &wine_xrGetSceneMeshBuffersMSFT},
{"xrGetSerializedSceneFragmentDataMSFT", &wine_xrGetSerializedSceneFragmentDataMSFT},
{"xrGetSwapchainStateFB", &wine_xrGetSwapchainStateFB},
{"xrGetSystem", &wine_xrGetSystem},
{"xrGetSystemProperties", &wine_xrGetSystemProperties},
{"xrGetViewConfigurationProperties", &wine_xrGetViewConfigurationProperties},
@ -542,6 +661,7 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrGetVulkanInstanceExtensionsKHR", &wine_xrGetVulkanInstanceExtensionsKHR},
{"xrLoadControllerModelMSFT", &wine_xrLoadControllerModelMSFT},
{"xrLocateHandJointsEXT", &wine_xrLocateHandJointsEXT},
{"xrLocateSceneComponentsMSFT", &wine_xrLocateSceneComponentsMSFT},
{"xrLocateSpace", &wine_xrLocateSpace},
{"xrLocateViews", &wine_xrLocateViews},
{"xrPathToString", &wine_xrPathToString},
@ -552,6 +672,7 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrRequestExitSession", &wine_xrRequestExitSession},
{"xrResultToString", &wine_xrResultToString},
{"xrSetColorSpaceFB", &wine_xrSetColorSpaceFB},
{"xrSetEnvironmentDepthEstimationVARJO", &wine_xrSetEnvironmentDepthEstimationVARJO},
{"xrSetInputDeviceActiveEXT", &wine_xrSetInputDeviceActiveEXT},
{"xrSetInputDeviceLocationEXT", &wine_xrSetInputDeviceLocationEXT},
{"xrSetInputDeviceStateBoolEXT", &wine_xrSetInputDeviceStateBoolEXT},
@ -564,6 +685,7 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrSyncActions", &wine_xrSyncActions},
{"xrThermalGetTemperatureTrendEXT", &wine_xrThermalGetTemperatureTrendEXT},
{"xrUpdateHandMeshMSFT", &wine_xrUpdateHandMeshMSFT},
{"xrUpdateSwapchainFB", &wine_xrUpdateSwapchainFB},
{"xrWaitFrame", &wine_xrWaitFrame},
{"xrWaitSwapchainImage", &wine_xrWaitSwapchainImage},
};
@ -588,6 +710,7 @@ static const char * const xr_extensions[] =
"XR_EXTX_overlay",
"XR_EXT_conformance_automation",
"XR_EXT_eye_gaze_interaction",
"XR_EXT_hand_joints_motion_range",
"XR_EXT_hand_tracking",
"XR_EXT_hp_mixed_reality_controller",
"XR_EXT_performance_settings",
@ -597,6 +720,8 @@ static const char * const xr_extensions[] =
"XR_EXT_win32_appcontainer_compatible",
"XR_FB_color_space",
"XR_FB_display_refresh_rate",
"XR_FB_swapchain_update_state",
"XR_FB_swapchain_update_state_vulkan",
"XR_HTC_vive_cosmos_controller_interaction",
"XR_HUAWEI_controller_interaction",
"XR_KHR_D3D11_enable",
@ -616,17 +741,24 @@ static const char * const xr_extensions[] =
"XR_KHR_win32_convert_performance_counter_time",
"XR_MND_headless",
"XR_MND_swapchain_usage_input_attachment_bit",
"XR_MSFT_composition_layer_reprojection",
"XR_MSFT_controller_model",
"XR_MSFT_first_person_observer",
"XR_MSFT_hand_interaction",
"XR_MSFT_hand_tracking_mesh",
"XR_MSFT_holographic_window_attachment",
"XR_MSFT_scene_understanding",
"XR_MSFT_scene_understanding_serialization",
"XR_MSFT_secondary_view_configuration",
"XR_MSFT_spatial_anchor",
"XR_MSFT_spatial_graph_bridge",
"XR_MSFT_unbounded_reference_space",
"XR_OCULUS_android_session_state_enable",
"XR_OCULUS_audio_device_guid",
"XR_VALVE_analog_threshold",
"XR_VARJO_composition_layer_depth_test",
"XR_VARJO_environment_depth_estimation",
"XR_VARJO_foveated_rendering",
"XR_VARJO_quad_views",
};

View File

@ -3,7 +3,7 @@
* This file is generated from OpenXR xr.xml file covered
* by the following copyright and permission notice:
*
* Copyright (c) 2017-2020 The Khronos Group Inc.
* Copyright (c) 2017-2021, The Khronos Group Inc.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
@ -29,6 +29,8 @@ XrResult WINAPI wine_xrConvertTimeToWin32PerformanceCounterKHR(XrInstance instan
XrResult WINAPI wine_xrConvertWin32PerformanceCounterToTimeKHR(XrInstance instance, const LARGE_INTEGER *performanceCounter, XrTime *time) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrCreateHandTrackerEXT(XrSession session, const XrHandTrackerCreateInfoEXT *createInfo, XrHandTrackerEXT *handTracker) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrCreateInstance(const XrInstanceCreateInfo *createInfo, XrInstance *instance);
XrResult WINAPI wine_xrCreateSceneMSFT(XrSceneObserverMSFT sceneObserver, const XrSceneCreateInfoMSFT *createInfo, XrSceneMSFT *scene) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrCreateSceneObserverMSFT(XrSession session, const XrSceneObserverCreateInfoMSFT *createInfo, XrSceneObserverMSFT *sceneObserver) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrCreateSession(XrInstance instance, const XrSessionCreateInfo *createInfo, XrSession *session);
XrResult WINAPI wine_xrCreateSpatialAnchorMSFT(XrSession session, const XrSpatialAnchorCreateInfoMSFT *createInfo, XrSpatialAnchorMSFT *anchor) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrCreateSwapchain(XrSession session, const XrSwapchainCreateInfo *createInfo, XrSwapchain *swapchain);
@ -36,6 +38,8 @@ XrResult WINAPI wine_xrCreateVulkanDeviceKHR(XrInstance instance, const XrVulkan
XrResult WINAPI wine_xrCreateVulkanInstanceKHR(XrInstance instance, const XrVulkanInstanceCreateInfoKHR *createInfo, VkInstance *vulkanInstance, VkResult *vulkanResult) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrDestroyHandTrackerEXT(XrHandTrackerEXT handTracker) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrDestroyInstance(XrInstance instance);
XrResult WINAPI wine_xrDestroySceneMSFT(XrSceneMSFT scene) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrDestroySceneObserverMSFT(XrSceneObserverMSFT sceneObserver) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrDestroySession(XrSession session);
XrResult WINAPI wine_xrDestroySpatialAnchorMSFT(XrSpatialAnchorMSFT anchor) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrDestroySwapchain(XrSwapchain swapchain);
@ -55,6 +59,14 @@ XrResult WINAPI wine_xrPollEvent(XrInstance instance, XrEventDataBuffer *eventDa
/* Private thunks */
typedef struct XrSceneMeshBuffersGetInfoMSFT_host
{
XrStructureType type;
const void *next;
uint64_t meshBufferId;
} XrSceneMeshBuffersGetInfoMSFT_host;
XrResult convert_XrInstanceCreateInfo_struct_chain(const void *next, XrInstanceCreateInfo *out_struct) DECLSPEC_HIDDEN;
void free_XrInstanceCreateInfo_struct_chain(XrInstanceCreateInfo *s) DECLSPEC_HIDDEN;
@ -67,12 +79,15 @@ struct openxr_instance_funcs
XrResult (*p_xrAttachSessionActionSets)(XrSession, const XrSessionActionSetsAttachInfo *);
XrResult (*p_xrBeginFrame)(XrSession, const XrFrameBeginInfo *);
XrResult (*p_xrBeginSession)(XrSession, const XrSessionBeginInfo *);
XrResult (*p_xrComputeNewSceneMSFT)(XrSceneObserverMSFT, const XrNewSceneComputeInfoMSFT *);
XrResult (*p_xrCreateAction)(XrActionSet, const XrActionCreateInfo *, XrAction *);
XrResult (*p_xrCreateActionSet)(XrInstance, const XrActionSetCreateInfo *, XrActionSet *);
XrResult (*p_xrCreateActionSpace)(XrSession, const XrActionSpaceCreateInfo *, XrSpace *);
XrResult (*p_xrCreateHandMeshSpaceMSFT)(XrHandTrackerEXT, const XrHandMeshSpaceCreateInfoMSFT *, XrSpace *);
XrResult (*p_xrCreateHandTrackerEXT)(XrSession, const XrHandTrackerCreateInfoEXT *, XrHandTrackerEXT *);
XrResult (*p_xrCreateReferenceSpace)(XrSession, const XrReferenceSpaceCreateInfo *, XrSpace *);
XrResult (*p_xrCreateSceneMSFT)(XrSceneObserverMSFT, const XrSceneCreateInfoMSFT *, XrSceneMSFT *);
XrResult (*p_xrCreateSceneObserverMSFT)(XrSession, const XrSceneObserverCreateInfoMSFT *, XrSceneObserverMSFT *);
XrResult (*p_xrCreateSession)(XrInstance, const XrSessionCreateInfo *, XrSession *);
XrResult (*p_xrCreateSpatialAnchorMSFT)(XrSession, const XrSpatialAnchorCreateInfoMSFT *, XrSpatialAnchorMSFT *);
XrResult (*p_xrCreateSpatialAnchorSpaceMSFT)(XrSession, const XrSpatialAnchorSpaceCreateInfoMSFT *, XrSpace *);
@ -80,9 +95,12 @@ struct openxr_instance_funcs
XrResult (*p_xrCreateSwapchain)(XrSession, const XrSwapchainCreateInfo *, XrSwapchain *);
XrResult (*p_xrCreateVulkanDeviceKHR)(XrInstance, const XrVulkanDeviceCreateInfoKHR *, VkDevice *, VkResult *);
XrResult (*p_xrCreateVulkanInstanceKHR)(XrInstance, const XrVulkanInstanceCreateInfoKHR *, VkInstance *, VkResult *);
XrResult (*p_xrDeserializeSceneMSFT)(XrSceneObserverMSFT, const XrSceneDeserializeInfoMSFT *);
XrResult (*p_xrDestroyAction)(XrAction);
XrResult (*p_xrDestroyActionSet)(XrActionSet);
XrResult (*p_xrDestroyHandTrackerEXT)(XrHandTrackerEXT);
XrResult (*p_xrDestroySceneMSFT)(XrSceneMSFT);
XrResult (*p_xrDestroySceneObserverMSFT)(XrSceneObserverMSFT);
XrResult (*p_xrDestroySession)(XrSession);
XrResult (*p_xrDestroySpace)(XrSpace);
XrResult (*p_xrDestroySpatialAnchorMSFT)(XrSpatialAnchorMSFT);
@ -95,6 +113,8 @@ struct openxr_instance_funcs
XrResult (*p_xrEnumerateDisplayRefreshRatesFB)(XrSession, uint32_t, uint32_t *, float *);
XrResult (*p_xrEnumerateEnvironmentBlendModes)(XrInstance, XrSystemId, XrViewConfigurationType, uint32_t, uint32_t *, XrEnvironmentBlendMode *);
XrResult (*p_xrEnumerateReferenceSpaces)(XrSession, uint32_t, uint32_t *, XrReferenceSpaceType *);
XrResult (*p_xrEnumerateReprojectionModesMSFT)(XrInstance, XrSystemId, XrViewConfigurationType, uint32_t, uint32_t *, XrReprojectionModeMSFT *);
XrResult (*p_xrEnumerateSceneComputeFeaturesMSFT)(XrInstance, XrSystemId, uint32_t, uint32_t *, XrSceneComputeFeatureMSFT *);
XrResult (*p_xrEnumerateSwapchainFormats)(XrSession, uint32_t, uint32_t *, int64_t *);
XrResult (*p_xrEnumerateSwapchainImages)(XrSwapchain, uint32_t, uint32_t *, XrSwapchainImageBaseHeader *);
XrResult (*p_xrEnumerateViewConfigurationViews)(XrInstance, XrSystemId, XrViewConfigurationType, uint32_t, uint32_t *, XrViewConfigurationView *);
@ -103,6 +123,8 @@ struct openxr_instance_funcs
XrResult (*p_xrGetActionStateFloat)(XrSession, const XrActionStateGetInfo *, XrActionStateFloat *);
XrResult (*p_xrGetActionStatePose)(XrSession, const XrActionStateGetInfo *, XrActionStatePose *);
XrResult (*p_xrGetActionStateVector2f)(XrSession, const XrActionStateGetInfo *, XrActionStateVector2f *);
XrResult (*p_xrGetAudioInputDeviceGuidOculus)(XrInstance, wchar_t[]);
XrResult (*p_xrGetAudioOutputDeviceGuidOculus)(XrInstance, wchar_t[]);
XrResult (*p_xrGetControllerModelKeyMSFT)(XrSession, XrPath, XrControllerModelKeyStateMSFT *);
XrResult (*p_xrGetControllerModelPropertiesMSFT)(XrSession, XrControllerModelKeyMSFT, XrControllerModelPropertiesMSFT *);
XrResult (*p_xrGetControllerModelStateMSFT)(XrSession, XrControllerModelKeyMSFT, XrControllerModelStateMSFT *);
@ -112,6 +134,15 @@ struct openxr_instance_funcs
XrResult (*p_xrGetInstanceProperties)(XrInstance, XrInstanceProperties *);
XrResult (*p_xrGetOpenGLGraphicsRequirementsKHR)(XrInstance, XrSystemId, XrGraphicsRequirementsOpenGLKHR *);
XrResult (*p_xrGetReferenceSpaceBoundsRect)(XrSession, XrReferenceSpaceType, XrExtent2Df *);
XrResult (*p_xrGetSceneComponentsMSFT)(XrSceneMSFT, const XrSceneComponentsGetInfoMSFT *, XrSceneComponentsMSFT *);
XrResult (*p_xrGetSceneComputeStateMSFT)(XrSceneObserverMSFT, XrSceneComputeStateMSFT *);
#if defined(USE_STRUCT_CONVERSION)
XrResult (*p_xrGetSceneMeshBuffersMSFT)(XrSceneMSFT, const XrSceneMeshBuffersGetInfoMSFT_host *, XrSceneMeshBuffersMSFT *);
#else
XrResult (*p_xrGetSceneMeshBuffersMSFT)(XrSceneMSFT, const XrSceneMeshBuffersGetInfoMSFT *, XrSceneMeshBuffersMSFT *);
#endif
XrResult (*p_xrGetSerializedSceneFragmentDataMSFT)(XrSceneMSFT, const XrSerializedSceneFragmentDataGetInfoMSFT *, uint32_t, uint32_t *, uint8_t *);
XrResult (*p_xrGetSwapchainStateFB)(XrSwapchain, XrSwapchainStateBaseHeaderFB *);
XrResult (*p_xrGetSystem)(XrInstance, const XrSystemGetInfo *, XrSystemId *);
XrResult (*p_xrGetSystemProperties)(XrInstance, XrSystemId, XrSystemProperties *);
XrResult (*p_xrGetViewConfigurationProperties)(XrInstance, XrSystemId, XrViewConfigurationType, XrViewConfigurationProperties *);
@ -124,6 +155,7 @@ struct openxr_instance_funcs
XrResult (*p_xrGetVulkanInstanceExtensionsKHR)(XrInstance, XrSystemId, uint32_t, uint32_t *, char *);
XrResult (*p_xrLoadControllerModelMSFT)(XrSession, XrControllerModelKeyMSFT, uint32_t, uint32_t *, uint8_t *);
XrResult (*p_xrLocateHandJointsEXT)(XrHandTrackerEXT, const XrHandJointsLocateInfoEXT *, XrHandJointLocationsEXT *);
XrResult (*p_xrLocateSceneComponentsMSFT)(XrSceneMSFT, const XrSceneComponentsLocateInfoMSFT *, XrSceneComponentLocationsMSFT *);
XrResult (*p_xrLocateSpace)(XrSpace, XrSpace, XrTime, XrSpaceLocation *);
XrResult (*p_xrLocateViews)(XrSession, const XrViewLocateInfo *, XrViewState *, uint32_t, uint32_t *, XrView *);
XrResult (*p_xrPathToString)(XrInstance, XrPath, uint32_t, uint32_t *, char *);
@ -134,6 +166,7 @@ struct openxr_instance_funcs
XrResult (*p_xrRequestExitSession)(XrSession);
XrResult (*p_xrResultToString)(XrInstance, XrResult, char[]);
XrResult (*p_xrSetColorSpaceFB)(XrSession, const XrColorSpaceFB);
XrResult (*p_xrSetEnvironmentDepthEstimationVARJO)(XrSession, XrBool32);
XrResult (*p_xrSetInputDeviceActiveEXT)(XrSession, XrPath, XrPath, XrBool32);
XrResult (*p_xrSetInputDeviceLocationEXT)(XrSession, XrPath, XrPath, XrSpace, XrPosef);
XrResult (*p_xrSetInputDeviceStateBoolEXT)(XrSession, XrPath, XrPath, XrBool32);
@ -146,6 +179,7 @@ struct openxr_instance_funcs
XrResult (*p_xrSyncActions)(XrSession, const XrActionsSyncInfo *);
XrResult (*p_xrThermalGetTemperatureTrendEXT)(XrSession, XrPerfSettingsDomainEXT, XrPerfSettingsNotificationLevelEXT *, float *, float *);
XrResult (*p_xrUpdateHandMeshMSFT)(XrHandTrackerEXT, const XrHandMeshUpdateInfoMSFT *, XrHandMeshMSFT *);
XrResult (*p_xrUpdateSwapchainFB)(XrSwapchain, const XrSwapchainStateBaseHeaderFB *);
XrResult (*p_xrWaitFrame)(XrSession, const XrFrameWaitInfo *, XrFrameState *);
XrResult (*p_xrWaitSwapchainImage)(XrSwapchain, const XrSwapchainImageWaitInfo *);
};
@ -156,12 +190,15 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrAttachSessionActionSets) \
USE_XR_FUNC(xrBeginFrame) \
USE_XR_FUNC(xrBeginSession) \
USE_XR_FUNC(xrComputeNewSceneMSFT) \
USE_XR_FUNC(xrCreateAction) \
USE_XR_FUNC(xrCreateActionSet) \
USE_XR_FUNC(xrCreateActionSpace) \
USE_XR_FUNC(xrCreateHandMeshSpaceMSFT) \
USE_XR_FUNC(xrCreateHandTrackerEXT) \
USE_XR_FUNC(xrCreateReferenceSpace) \
USE_XR_FUNC(xrCreateSceneMSFT) \
USE_XR_FUNC(xrCreateSceneObserverMSFT) \
USE_XR_FUNC(xrCreateSession) \
USE_XR_FUNC(xrCreateSpatialAnchorMSFT) \
USE_XR_FUNC(xrCreateSpatialAnchorSpaceMSFT) \
@ -169,9 +206,12 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrCreateSwapchain) \
USE_XR_FUNC(xrCreateVulkanDeviceKHR) \
USE_XR_FUNC(xrCreateVulkanInstanceKHR) \
USE_XR_FUNC(xrDeserializeSceneMSFT) \
USE_XR_FUNC(xrDestroyAction) \
USE_XR_FUNC(xrDestroyActionSet) \
USE_XR_FUNC(xrDestroyHandTrackerEXT) \
USE_XR_FUNC(xrDestroySceneMSFT) \
USE_XR_FUNC(xrDestroySceneObserverMSFT) \
USE_XR_FUNC(xrDestroySession) \
USE_XR_FUNC(xrDestroySpace) \
USE_XR_FUNC(xrDestroySpatialAnchorMSFT) \
@ -184,6 +224,8 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrEnumerateDisplayRefreshRatesFB) \
USE_XR_FUNC(xrEnumerateEnvironmentBlendModes) \
USE_XR_FUNC(xrEnumerateReferenceSpaces) \
USE_XR_FUNC(xrEnumerateReprojectionModesMSFT) \
USE_XR_FUNC(xrEnumerateSceneComputeFeaturesMSFT) \
USE_XR_FUNC(xrEnumerateSwapchainFormats) \
USE_XR_FUNC(xrEnumerateSwapchainImages) \
USE_XR_FUNC(xrEnumerateViewConfigurationViews) \
@ -192,6 +234,8 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrGetActionStateFloat) \
USE_XR_FUNC(xrGetActionStatePose) \
USE_XR_FUNC(xrGetActionStateVector2f) \
USE_XR_FUNC(xrGetAudioInputDeviceGuidOculus) \
USE_XR_FUNC(xrGetAudioOutputDeviceGuidOculus) \
USE_XR_FUNC(xrGetControllerModelKeyMSFT) \
USE_XR_FUNC(xrGetControllerModelPropertiesMSFT) \
USE_XR_FUNC(xrGetControllerModelStateMSFT) \
@ -201,6 +245,11 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrGetInstanceProperties) \
USE_XR_FUNC(xrGetOpenGLGraphicsRequirementsKHR) \
USE_XR_FUNC(xrGetReferenceSpaceBoundsRect) \
USE_XR_FUNC(xrGetSceneComponentsMSFT) \
USE_XR_FUNC(xrGetSceneComputeStateMSFT) \
USE_XR_FUNC(xrGetSceneMeshBuffersMSFT) \
USE_XR_FUNC(xrGetSerializedSceneFragmentDataMSFT) \
USE_XR_FUNC(xrGetSwapchainStateFB) \
USE_XR_FUNC(xrGetSystem) \
USE_XR_FUNC(xrGetSystemProperties) \
USE_XR_FUNC(xrGetViewConfigurationProperties) \
@ -213,6 +262,7 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrGetVulkanInstanceExtensionsKHR) \
USE_XR_FUNC(xrLoadControllerModelMSFT) \
USE_XR_FUNC(xrLocateHandJointsEXT) \
USE_XR_FUNC(xrLocateSceneComponentsMSFT) \
USE_XR_FUNC(xrLocateSpace) \
USE_XR_FUNC(xrLocateViews) \
USE_XR_FUNC(xrPathToString) \
@ -223,6 +273,7 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrRequestExitSession) \
USE_XR_FUNC(xrResultToString) \
USE_XR_FUNC(xrSetColorSpaceFB) \
USE_XR_FUNC(xrSetEnvironmentDepthEstimationVARJO) \
USE_XR_FUNC(xrSetInputDeviceActiveEXT) \
USE_XR_FUNC(xrSetInputDeviceLocationEXT) \
USE_XR_FUNC(xrSetInputDeviceStateBoolEXT) \
@ -235,6 +286,7 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrSyncActions) \
USE_XR_FUNC(xrThermalGetTemperatureTrendEXT) \
USE_XR_FUNC(xrUpdateHandMeshMSFT) \
USE_XR_FUNC(xrUpdateSwapchainFB) \
USE_XR_FUNC(xrWaitFrame) \
USE_XR_FUNC(xrWaitSwapchainImage)

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
@ stdcall xrNegotiateLoaderRuntimeInterface(ptr ptr) wine_xrNegotiateLoaderRuntimeInterface
@ stdcall __wineopenxr_GetVulkanInstanceExtensions(ptr)
@ stdcall __wineopenxr_GetVulkanDeviceExtensions(ptr)
@ stdcall __wineopenxr_GetVulkanInstanceExtensions(long ptr ptr)
@ stdcall __wineopenxr_GetVulkanDeviceExtensions(long ptr ptr)

File diff suppressed because it is too large Load Diff