All Projects → jp7677 → dxvk-nvapi

jp7677 / dxvk-nvapi

Licence: MIT license
Alternative NVAPI implementation on top of DXVK.

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to dxvk-nvapi

handbrake-nvenc-docker
Handbrake GUI with Web browser and VNC access. Supports NVENC encoding
Stars: ✭ 32 (-75.94%)
Mutual labels:  nvidia
Optimizing-SGEMM-on-NVIDIA-Turing-GPUs
Optimizing SGEMM kernel functions on NVIDIA GPUs to a close-to-cuBLAS performance.
Stars: ✭ 78 (-41.35%)
Mutual labels:  nvidia
mpu
A shim driver allows in-docker nvidia-smi showing correct process list without modify anything
Stars: ✭ 27 (-79.7%)
Mutual labels:  nvidia
TailCalibX
Pytorch implementation of Feature Generation for Long-Tail Classification by Rahul Vigneswaran, Marc T Law, Vineeth N Balasubramaniam and Makarand Tapaswi
Stars: ✭ 32 (-75.94%)
Mutual labels:  nvidia
nvidia-video-codec-rs
Bindings for the NVIDIA Video Codec SDK
Stars: ✭ 24 (-81.95%)
Mutual labels:  nvidia
constant-memory-waveglow
PyTorch implementation of NVIDIA WaveGlow with constant memory cost.
Stars: ✭ 36 (-72.93%)
Mutual labels:  nvidia
NVTabular
NVTabular is a feature engineering and preprocessing library for tabular data designed to quickly and easily manipulate terabyte scale datasets used to train deep learning based recommender systems.
Stars: ✭ 797 (+499.25%)
Mutual labels:  nvidia
monkey-master
A deno tool for buying hot GPUs in JD, such as RTX3080 rx6800, a thick-skinned orange!
Stars: ✭ 180 (+35.34%)
Mutual labels:  nvidia
unity-fracture
Fracture any mesh at runtime
Stars: ✭ 634 (+376.69%)
Mutual labels:  nvidia
Install-VScode-On-TX2
How to install VScode on Nvidia TX2
Stars: ✭ 24 (-81.95%)
Mutual labels:  nvidia
faucon
NVIDIA Falcon Microprocessor Suite
Stars: ✭ 28 (-78.95%)
Mutual labels:  nvidia
dofbot-jetson nano
Yahboom DOFBOT AI Vision Robotic Arm with ROS for Jetson NANO 4GB B01
Stars: ✭ 24 (-81.95%)
Mutual labels:  nvidia
linux-l4t
Linux kernel 3.10 forked from Nvidia Linux4Tegra for the TX1. Branches for L4T 24.2.1. Also available: 23.1 (DEPRECATED), 24.1 (DEPRECATED).
Stars: ✭ 21 (-84.21%)
Mutual labels:  nvidia
tacotron2
Multispeaker & Emotional TTS based on Tacotron 2 and Waveglow
Stars: ✭ 102 (-23.31%)
Mutual labels:  nvidia
awesome-rtx
Curated collection of projects leveraging NVIDIA RTX technology (OptiX, DXR, VKR)
Stars: ✭ 73 (-45.11%)
Mutual labels:  nvidia
installROS
Install ROS Melodic on NVIDIA Jetson Development Kits
Stars: ✭ 75 (-43.61%)
Mutual labels:  nvidia
nvidia-jetson-rt
Real-Time Scheduling with NVIDIA Jetson TX2
Stars: ✭ 38 (-71.43%)
Mutual labels:  nvidia
ffmpegtoolkit
CentOS 8.x 64bit ffmpeg auto installer scripts
Stars: ✭ 62 (-53.38%)
Mutual labels:  nvidia
tensorflow-builds
Tensorflow binaries and Docker images compiled with GPU support and CPU optimizations.
Stars: ✭ 15 (-88.72%)
Mutual labels:  nvidia
hashcat-benchmark-comparison
Hashcat Benchmark Comparison
Stars: ✭ 22 (-83.46%)
Mutual labels:  nvidia

DXVK-NVAPI

Alternative NVAPI implementation on top of DXVK

This repository provides an alternative implementation of NVIDIA's NVAPI library for usage with DXVK and VKD3D-Proton. Its way of working is similar to DXVK-AGS, but adjusted and enhanced for NVAPI.

This implementation currently offers entry points for supporting the following features in applications:

  • NVIDIA DLSS for Vulkan, by supporting the relevant adapter information by querying from Vulkan.
  • NVIDIA DLSS for D3D11 and D3D12, by querying from Vulkan and forwarding the relevant calls into DXVK / VKD3D-Proton.
  • NVIDIA Reflex, by forwarding the relevant calls into LatencyFleX.
  • Several NVAPI D3D11 extensions, among others SetDepthBoundsTest and UAVOverlap, by forwarding the relevant calls into DXVK.
  • NVIDIA PhysX, by supporting entry points for querying PhysX capabilities.
  • Several GPU topology related methods for adapter and display information, by querying from DXVK and Vulkan.

While originally being developed for usage with Unreal Engine 4, most notably for Assetto Corsa Competizione, more entry points have been added over time for enabling other NVIDIA related technologies. DXVK-NVAPI does not and will never cover the complete surface of NVIDIA's NVAPI. It is not meant as a full replacement, but rather as an addition to DXVK and VKD3D-Proton to enable several GPU features.

Requirements

This implementation is supposed to be used on Linux using Wine or derivatives like Proton. Usage on Windows is discouraged. Please do not replace nvapi.dll/nvapi64.dll on Windows from NVIDIA's driver package with this version. DXVK-NVAPI uses several DXVK and VKD3D-Proton extension points, thus using DXVK (D3D11 and DXGI) is a requirement. Using Wine's D3D11 or DXGI will fail. Usage of DXVK-NVAPI is not restricted to NVIDIA GPUs, though the default behavior is to skip GPUs not running the NVIDIA proprietary driver. Some entry points offer no functionality or make no sense when a different GPU vendor is detected.

When available, DXVK-NVAPI uses NVIDIA's NVML management library to query temperature, utilization and others for NVIDIA GPUs. See wine-nvml how to add NVML support to Wine/Proton.

How to build

Like DXVK, this library is being built as a Windows DLL using MinGW, DXVK-NVAPI requires MinGW 9, MinGW 8 unfortunately has an outdated D3D12 header. Python 3 is needed for a prebuild validation script. This project uses git submodules, ensure to fetch them while or after cloning the repository.

Run:

./package-release.sh master /your/path [--enable-tests]

Alternatively DXVK-Docker provides a way for a build setup using docker/podman. Prebuilt binaries of release versions are available at https://github.com/jp7677/dxvk-nvapi/releases. GitHub Actions is set up for building development snapshots.

How to use

Using DXVK-NVAPI in Proton, Lutris or Wine requires DXVK to see the GPU as an NVIDIA GPU.

  • Spoof an NVIDIA GPU when running a non-NVIDIA GPU with dxgi.customVendorId = 10de set in a DXVK configuration file, see dxvk.conf.

Proton

Proton 6.3-6 and newer includes DXVK-NVAPI but it is disabled by default.

  • Use PROTON_ENABLE_NVAPI=1 as game launch argument in Steam to enable DXVK-NVAPI. Use additionally PROTON_HIDE_NVIDIA_GPU=0 for certain titles that don't rely on DXGI for obtaining the current GPU type.
  • Copy and replace nvapi.dll/nvapi64.dll into the dist/lib/wine/nvapi/dist/lib64/wine/nvapi folder of your Proton installation, e.g. in ~/.steam/steam/steamapps/common/Proton 7.0/ if you want to manually update the included version.

Proton 7.0-1 and older does not disable the nvapiHack in DXVK automatically when PROTON_ENABLE_NVAPI=1 is set. Additionally disable the nvapiHack in DXVK bundled with those Proton versions with dxgi.nvapiHack = False set in a DXVK configuration file, see dxvk.conf.

Lutris

DXVK-NVAPI is enabled by default since Lutris 0.5.9. It's updated automatically.

  • To use a custom version, copy a folder with that version containing x32/x64 with nvapi.dll/nvapi64.dll of corresponding architecture inside them, into ~/.local/share/lutris/runtime/dxvk-nvapi/. Edit the "DXVK-NVAPI version" field in the Lutris settings to the name of that folder.

Wine

Wine does not includes DXVK-NVAPI.

  • Copy nvapi.dll/nvapi64.dll into the syswow64/system32 folder of your x86/x64 Wine prefix.
  • Ensure that Wine uses the native version of nvapi/nvapi64, e.g. with WINEDLLOVERRIDES=nvapi,nvapi64=n.
  • Ensure that DXVK is installed in your x86/x64 Wine prefix.
  • Ensure that Wine uses DXVK's dxgi.dll, e.g. with WINEDLLOVERRIDES=dxgi=n.
  • Set DXVK_ENABLE_NVAPI=1 to disable DXVK's nvapiHack in DXVK.

DXVK 1.10 and older does not support DXVK_ENABLE_NVAPI. Disable the nvapiHack in DXVK 1.10 and older with dxgi.nvapiHack = False set in a DXVK configuration file, see dxvk.conf.

Tweaks, debugging and troubleshooting

See the DXVK-NVAPI Wiki for common issues and workarounds.

The following environment variables tweak DXVK-NVAPI's runtime behavior:

  • DXVK_NVAPI_DRIVER_VERSION lets you override the reported driver version. Valid values are numbers between 100 and 99999. Use e.g. DXVK_NVAPI_DRIVER_VERSION=47141 to report driver version 471.41.
  • DXVK_NVAPI_ALLOW_OTHER_DRIVERS, when set, lets you use DXVK-NVAPI without running an NVIDIA card on NVIDIA's proprietary driver. Useful for using D3D11 extensions on a non-NVIDIA GPU.
  • DXVK_NVAPI_LOG_LEVEL set to info prints log statements. The default behavior omits any logging. Please fill an issue if using log servery info creates log spam. There are no other log levels.
  • DXVK_NVAPI_LOG_PATH enables file logging additionally to console output and sets the path where the log file dxvk-nvapi.log should be written to. Log statements are appended to an existing file. Please remove this file once in a while to prevent excessive grow. This requires DXVK_NVAPI_LOG_LEVEL set to info.

This project provides a test suite. Run the package script with --enable-tests (see above) to build nvapi64-tests.exe. Running the tests executable without arguments queries the local system and provides system information about visible GPUs:

DXVK_LOG_LEVEL=none WINEDEBUG=-all WINEDLLOVERRIDES=dxgi,nvapi64=n wine nvapi64-tests.exe

The test executable also runs on Windows against NVIDIA's nvapi64.dll. Ensure that DXVK-NVAPI's nvapi64.dllis not present in the current PATH for this scenario.

The actual unit tests can be run with nvapi64-tests.exe [@unit-tests] to validate DXVK-NVAPI's internal implementation.

Producing a debug build and starting a debugging session with the test suite can be achieved with the following snippet:

meson --cross-file "./build-win64.txt" --buildtype "debugoptimized" -Denable_tests=True build/dev
meson compile -C build/dev

DXVK_LOG_LEVEL=none DXVK_NVAPI_LOG_LEVEL=none WINEDEBUG=-all WINEDLLOVERRIDES=nvapi64=n WINEPATH=build/dev/src winedbg --gdb build/dev/tests/nvapi64-tests.exe [@all]

Once the debug session has started, use c to start/continue execution and a.o. bt to show a proper stacktrace after a segmentation fault. Ensure to have no other native nvapi64.dll in the Wine prefix, otherwise this one gets precedence over the one found in WINEPATH.

References and inspirations

Many thanks to the corresponding authors!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].