# DXVK Native
DXVK Native is a port of [DXVK](https://github.com/doitsujin/dxvk) to Linux which allows it to be used natively without Wine.
This is primarily useful for game and application ports to either avoid having to write another rendering backend, or to help with port bringup during development.
[Release builds](https://github.com/Joshua-Ashton/dxvk-native/releases) are built using the Steam Runtime.
### How does it work?
DXVK Native replaces certain Windows-isms with a platform and framework-agnostic replacement, for example, `HWND`s can become `SDL_Window*`s, etc.
All it takes to do that is to add another WSI backend.
DXVK Native comes with a slim set of Windows header definitions required for D3D9/11 and the MinGW headers for D3D9/11.
In most cases, it will end up being plug and play with your renderer, but there may be certain teething issues such as:
- `__uuidof(type)` is supported, but `__uuidof(variable)` is not supported. Use `__uuidof_var(variable)` instead.
DXVK Native also has some performance tweaks for D3D9, disabling float emulation and some validation.
This is configurable in `d3d9_config.h`.
## Games/Projects Using DXVK Native
- [Portal 2](https://store.steampowered.com/app/620/Portal_2/) (Valve - Windows & Linux)
- [Left 4 Dead 2](https://store.steampowered.com/app/550/Left_4_Dead_2/) (Valve - Windows & Linux)
- [Ys VIII, Ys IX](https://stadia.google.com/games) (PH3 Games - Stadia)
- [Perimeter](https://github.com/KranX/Perimeter) (Linux)
- [Momentum Mod](https://momentum-mod.org/) (Linux)
- [Portal 2: Community Edition](https://store.steampowered.com/app/440000/Portal_2_Community_Edition/) (Linux)
## Build instructions
### Requirements:
- A C++17 compiler (eg. GCC, Clang, MSVC)
- [Meson](https://mesonbuild.com/) build system (at least version 0.46)
- [glslang](https://github.com/KhronosGroup/glslang) compiler
### Steam Runtime
DXVK Native can be built in the Steam Runtime using `docker`.
If you don't care about this, simply skip this section.
To build in a Steam Runtime docker, simply `cd` to the DXVK directory and run:
for 32-bit:
`docker run -e USER=$USER -e USERID=$UID -it --rm -v $(pwd):/dxvk-native registry.gitlab.steamos.cloud/steamrt/scout/sdk/i386 /bin/bash`
for 64-bit:
`docker run -e USER=$USER -e USERID=$UID -it --rm -v $(pwd):/dxvk-native registry.gitlab.steamos.cloud/steamrt/scout/sdk /bin/bash`
### Building the library
Inside the DXVK directory, run either:
On your host machine:
```
./package-native.sh master /your/target/directory --no-package
```
With Steam Runtime:
```
./package-native-steamrt.sh master /your/target/directory --no-package
```
This will create a folder dxvk-native-master in /your/target/directory which will contain a the libraries and tests.
In order to preserve the build directories and symbols for development, pass `--dev-build` to the script.
### HUD
The `DXVK_HUD` environment variable controls a HUD which can display the framerate and some stat counters. It accepts a comma-separated list of the following options:
- `devinfo`: Displays the name of the GPU and the driver version.
- `fps`: Shows the current frame rate.
- `frametimes`: Shows a frame time graph.
- `submissions`: Shows the number of command buffers submitted per frame.
- `drawcalls`: Shows the number of draw calls and render passes per frame.
- `pipelines`: Shows the total number of graphics and compute pipelines.
- `memory`: Shows the amount of device memory allocated and used.
- `gpuload`: Shows estimated GPU load. May be inaccurate.
- `version`: Shows DXVK version.
- `api`: Shows the D3D feature level used by the application.
- `compiler`: Shows shader compiler activity
- `samplers`: Shows the current number of sampler pairs used *[D3D9 Only]*
- `scale=x`: Scales the HUD by a factor of `x` (e.g. `1.5`)
Additionally, `DXVK_HUD=1` has the same effect as `DXVK_HUD=devinfo,fps`, and `DXVK_HUD=full` enables all available HUD elements.
### Frame rate limit
The `DXVK_FRAME_RATE` environment variable can be used to limit the frame rate. A value of `0` uncaps the frame rate, while any positive value will limit rendering to the given number of frames per second. Alternatively, the configuration file can be used.
### Device filter
Some applications do not provide a method to select a different GPU. In that case, DXVK can be forced to use a given device:
- `DXVK_FILTER_DEVICE_NAME="Device Name"` Selects devices with a matching Vulkan device name, which can be retrieved with tools such as `vulkaninfo`. Matches on substrings, so "VEGA" or "AMD RADV VEGA10" is supported if the full device name is "AMD RADV VEGA10 (LLVM 9.0.0)", for example. If the substring matches more than one device, the first device matched will be used.
**Note:** If the device filter is configured incorrectly, it may filter out all devices and applications will be unable to create a D3D device.
### State cache
DXVK caches pipeline state by default, so that shaders can be recompiled ahead of time on subsequent runs of an application, even if the driver's own shader cache got invalidated in the meantime. This cache is enabled by default, and generally reduces stuttering.
The following environment variables can be used to control the cache:
- `DXVK_STATE_CACHE=0` Disables the state cache.
- `DXVK_STATE_CACHE_PATH=/some/directory` Specifies a directory where to put the cache files. Defaults to the current working directory of the application.
### Debugging
The following environment variables can be used for **debugging** purposes.
- `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` Enables Vulkan debug layers. Highly recommended for troubleshooting rendering issues and driver crashes. Requires the Vulkan SDK to be installed on the host system.
- `DXVK_LOG_LEVEL=none|error|warn|info|debug` Controls message logging.
- `DXVK_LOG_PATH=/some/directory` Changes path where log files are stored. Set to `none` to disable log file creation entirely, without disabling logging.
- `DXVK_CONFIG_FILE=/xxx/dxvk.conf` Sets path to the configuration file.
- `DXVK_PERF_EVENTS=1` Enables use of the VK_EXT_debug_utils extension for translating performance event markers.
没有合适的资源?快使用搜索试试~ 我知道了~
D3D9,11 但它在 Linux 上本地运行!.zip

共656个文件
h:318个
cpp:222个
frag:25个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 100 浏览量
2024-11-27
10:12:21
上传
评论
收藏 1.69MB ZIP 举报
温馨提示
DXVK 原生DXVK Native 是DXVK到 Linux的移植,允许它无需 Wine 即可本地使用。这主要用于游戏和应用程序端口,以避免必须编写另一个渲染后端,或者帮助在开发过程中启动端口。发布版本是使用 Steam Runtime 构建的。它是如何工作的?DXVK Native 用与平台和框架无关的替代品取代了某些 Windows 主义,例如HWNDs 可以变成SDL_Window*s 等等。只需添加另一个 WSI 后端即可做到这一点。DXVK Native 附带一组 D3D9/11 所需的 Windows 标头定义和 D3D9/11 的 MinGW 标头。在大多数情况下,它最终会与您的渲染器即插即用,但可能会存在某些初期问题,例如__uuidof(type)受支持,但__uuidof(variable)不受支持。请__uuidof_var(variable)改用。DXVK Native 还针对 D3D9 进行了一些性能调整,禁用了浮点模拟和一些验证。这可以在 中进行配置d3d9_config.h。使用 DXVK Native 的游戏/项目
资源推荐
资源详情
资源评论


























收起资源包目录





































































































共 656 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论


赵闪闪168
- 粉丝: 1733
- 资源: 6939

下载权益

C知道特权

VIP文章

课程特权

开通VIP
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- C#上位机控制ABB六轴机器人运动——使用RobotStudio 6.08版本.pdf
- C#上位机开发源码:基于RS485通讯ModbusRtu协议的项目源代码.pdf
- C#上位机信捷XD系列Modbus485通信实例:简单易懂自己写程序.pdf
- C#上位机与汇川全系列PLC的ModbusTCP通信实例源码:通讯类封装与参数修改案例.pdf
- C#上位机与欧姆龙Fins TCP通信以太网通讯实例源码:基于VS2015以上版本实现PLC数据读写.pdf
- C#上位机与欧姆龙Host Link通信串口通讯实例:基于VS2015以上版本的源码实践.pdf
- C#上位机与三菱、西门子PLC通讯源码:支持OPC DA与罗克韦尔Modbus TCP协议的测试画面.pdf
- C#上位机与三菱PLC通讯源码:基于MC协议的实现.pdf
- C#上位机与三菱、西门子PLC通讯源码:支持OPC DA、罗克韦尔及Modbus TCP协议的测试画面.pdf
- C#上位机与台达DVP系列Modbus 485通信实例:简单易懂程序示例.pdf
- C#上位机与台达PLC通信项目:基于Modbus TCP协议的完整程序框架(VS2019开发,含halcon视觉检测功能).pdf
- C#上位机与西门子PLC的S7NET协议网口通信实践:涵盖S7-200smart、S7-1200、S7-1500的例子及实测有效程序.pdf
- C#上位机与西门子PLC通信实现伺服控制与数字量控制的源代码及PLC测试程序.pdf
- C#上位机源代码:采集西门子200smart温度数据并显示波形曲线及报警提示,每天生成Excel报表的全套源代码.pdf
- C#上位机与西门子PLC通讯教程:数据读取、存储数据库、报表查询及报警历史功能实现.pdf
- C#实现OPC、DCS数据读取及多种转发方式的数据传输.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
