1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-11 01:24:12 +01:00
This commit is contained in:
Philip Rebohle 2018-02-12 08:52:45 +01:00
commit 82d324384c
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 42 additions and 15 deletions

View File

@ -10,8 +10,8 @@ For binary releases, see the [releases](https://github.com/doitsujin/dxvk/releas
### Requirements: ### Requirements:
- [wine-staging](https://wine-staging.com/) for Vulkan support - [wine-staging](https://wine-staging.com/) for Vulkan support
- [Meson](http://mesonbuild.com/) build system - [Meson](http://mesonbuild.com/) build system (at least 0.43)
- [MinGW64](http://mingw-w64.org/) compiler and headers - [MinGW64](http://mingw-w64.org/) compiler and headers (requires threading support)
- [glslang](https://github.com/KhronosGroup/glslang) front end and validator - [glslang](https://github.com/KhronosGroup/glslang) front end and validator
### Building DLLs ### Building DLLs
@ -63,3 +63,14 @@ In addition to the DLLs, the following standalone programs are included in the p
- `dxbc-compiler`: Compiles a DXBC shader to SPIR-V. - `dxbc-compiler`: Compiles a DXBC shader to SPIR-V.
- `dxbc-disasm`: Disassembles a DXBC shader. Requires native `d3dcompiler_47.dll`. - `dxbc-disasm`: Disassembles a DXBC shader. Requires native `d3dcompiler_47.dll`.
- `hlsl-compiler`: Compiles a HLSL shader to DXBC. Requires native `d3dcompiler_47.dll`. - `hlsl-compiler`: Compiles a HLSL shader to DXBC. Requires native `d3dcompiler_47.dll`.
## Troubleshooting
DXVK requires threading support from your mingw-w64 build environment. If you
are missing this, you may see "error: 'mutex' is not a member of 'std'". On
Debian, this can usually be resolved by using the posix alternate, which
supports threading. For example, choose the posix alternate from these
commands (use i686 for 32-bit):
```
update-alternatives --config x86_64-w64-mingw32-gcc
update-alternatives --config x86_64-w64-mingw32-g++
```

View File

@ -16,7 +16,7 @@ else
wine=wine wine=wine
fi fi
quite=false quiet=false
assume= assume=
function ask { function ask {
@ -72,36 +72,48 @@ else
fi fi
fi fi
unix_sys_path="$($wine winepath -u 'C:\windows\system32')" unix_sys_path="$($wine winepath -u 'C:\windows\system32')"
if [ $? -ne 0 ]; then
exit 1
fi
ret=0 ret=0
function removeOverride { function removeOverride {
echo -n ' [1/2] Removing override... ' echo -n ' [1/2] Removing override... '
wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d builtin /f local out
if [ ! $? ]; then out=$(wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d builtin /f 2>&1)
if [ $? -ne 0 ]; then
echo -e "\\e[1;31m$out\\e[0m"
exit 1 exit 1
fi fi
echo -e "$(sed -e 's|\r||g' <<< "\\e[1;32m$out\\e[0m.")"
local dll="$unix_sys_path/$1.dll" local dll="$unix_sys_path/$1.dll"
echo -n ' [2/2] Removing link... ' echo -n ' [2/2] Removing link... '
if [ -h "$dll" ]; then if [ -h "$dll" ]; then
rm "$dll" out=$(rm "$dll" 2>&1)
if [ "$?" == "0" ]; then if [ $? -eq 0 ]; then
echo "Done." echo -e '\e[1;32mDone\e[0m.'
else else
ret=2 ret=2
echo -e "\\e[1;31m$out\\e[0m"
fi fi
else else
echo "'$dll' is not a link or doesn't exist." echo -e "\\e[1;33m'$dll' is not a link or doesn't exist\\e[0m."
ret=2 ret=2
fi fi
} }
function checkOverride { function checkOverride {
echo -n ' [1/2] Checking override... ' echo -n ' [1/2] Checking override... '
local ovr="$(wine reg query 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1)" echo -en '\e[1;31m'
if [ ! $? ]; then local ovr
ovr="$(wine reg query 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1)"
if [ $? -ne 0 ]; then
echo -en '\e[1;0m'
exit 1 exit 1
fi fi
echo -en '\e[1;0m'
if [[ $ovr == *native* ]] && ! [[ $ovr == *builtin,native* ]]; then if [[ $ovr == *native* ]] && ! [[ $ovr == *builtin,native* ]]; then
echo -e '\e[1;32mOK\e[0m.' echo -e '\e[1;32mOK\e[0m.'
else else
@ -119,16 +131,20 @@ function checkOverride {
function createOverride { function createOverride {
echo -n ' [1/2] Creating override... ' echo -n ' [1/2] Creating override... '
wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f local out
if [ ! $? ]; then out=$(wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f 2>&1)
if [ $? -ne 0 ]; then
echo -e "\\e[1;31m$out\\e[0m"
exit 1 exit 1
fi fi
echo -e "$(sed -e 's|\r||g' <<< "\\e[1;32m$out\\e[0m.")"
echo -n " [2/2] Creating link to $1.dll... " echo -n " [2/2] Creating link to $1.dll... "
ln -sf "$dlls_dir/$1.dll" "$unix_sys_path/$1.dll" ln -sf "$dlls_dir/$1.dll" "$unix_sys_path/$1.dll"
if [ $? ]; then if [ $? -eq 0 ]; then
echo "Done." echo -e '\e[1;32mDone\e[0m.'
else else
ret=2 ret=2
echo -e "\\e[1;31m$out\\e[0m"
fi fi
} }