# DXVK

**DXVK** 是一个基于 Vulkan 的 Direct3D 8、9、10 和 11 翻译层，它在运行时将 Direct3D 调用转换为 Vulkan 操作，使为微软 DirectX 图形 API 构建的 3D 应用程序能够通过 [Wine](https://www.edgepedia.org/zh/wine-software) 在 Linux 上运行。<sup>[1](https://github.com/doitsujin/dxvk)</sup> 它由 菲利普·雷博勒（Philip Rebohle）于 2017 年作为一个业余项目发起，自 2018 年起，他正式参与 Valve 的 Proton 图形栈的工作。<sup>[2](https://github.com/doitsujin)</sup><sup> • </sup><sup>[3](https://www.winehq.org/pipermail/wine-devel/2019-January/138023.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 用途 | 将 Direct3D 8/9/10/11 翻译为 Vulkan，使 Windows 3D 应用程序能通过 Wine 在 Linux 上运行<sup>[1](https://github.com/doitsujin/dxvk)</sup> |
| 作者 | 菲利普·雷博勒（GitHub：doitsujin）；2017 年启动项目，自 2018 年起参与 Proton 图形栈工作<sup>[2](https://github.com/doitsujin)</sup> |
| 在 Proton 中的角色 | 被 Valve 的 Steam Play（Proton）用于 Direct3D 9-11 游戏，Direct3D 12 则由 VKD3D-Proton 单独处理<sup>[4](https://static.sched.com/hosted_files/osseu2023/83/steamos-and-linux-oss-eu-2023.pdf)</sup> |
| 驱动要求（3.x） | 需要支持 Vulkan 1.4 的驱动；最低版本包括 AMD RADV 25.0、Nvidia 专有驱动 575.51.02、NVK 25.1 和 Intel ANV 25.1<sup>[5](https://github.com/doitsujin/dxvk/wiki/Driver-support)</sup> |
| 旧版回退 | 1.10.3 版是最新的旧版发行版，仅需支持 Vulkan 1.1 的驱动<sup>[5](https://github.com/doitsujin/dxvk/wiki/Driver-support)</sup> |
| 原生模式 | DXVK Native 无需 Wine 即可运行，内置面向 SDL3、SDL2 和 GLFW 的 WSI 后端<sup>[6](https://github.com/PersonForever/dxvk)</sup> |
| 许可证 | Zlib 许可证<sup>[1](https://github.com/doitsujin/dxvk)</sup> |

## 工作原理

DXVK 在 Vulkan 之上实现了 Direct3D 8、9、10 和 11 API（以及 Windows 图形基础设施层 DXGI）。游戏链接的是 DXVK 的 DLL 而非 Wine 提供的 DLL，每个 Direct3D 调用都被翻译为等效的 Vulkan 操作，包括着色器翻译。以 DirectX 字节码编写的着色器被编译为 SPIR-V，即 Vulkan 的着色器格式。<sup>[1](https://github.com/doitsujin/dxvk)</sup><sup> • </sup><sup>[7](https://github.com/doitsujin/dxvk/releases)</sup>

某些 Direct3D 功能在 Vulkan 中没有直接对应项，需要模拟。固定功能管线曾让 D3D8 和 D3D9 游戏无需着色器即可渲染，此前是通过根据管线状态即时生成着色器代码来模拟的；在《虚幻竞技场 2004》等游戏中，这会导致即使长时间游玩后仍出现明显的卡顿。DXVK 现在将固定功能管线实现为一对超级着色器（ubershader），并在游戏设置不同固定功能配置时于后台编译优化变体。<sup>[7](https://github.com/doitsujin/dxvk/releases)</sup>

着色器编译交由工作线程处理，这缩短了《[往日不再](https://www.edgepedia.org/zh/days-gone)》和《最终幻想 XIV》等游戏的启动时间，并在某些情况下减少了卡顿。DXVK 自有的已编译着色器中间表示缓存在磁盘上，位于 Wine 前缀的 `AppData/Local` 目录内，路径可通过 `DXVK_SHADER_CACHE_PATH` 环境变量配置。<sup>[7](https://github.com/doitsujin/dxvk/releases)</sup>

## 安装与配置

要将发行包安装到 Wine 前缀中，需将 64 位 DLL 复制到前缀的 `system32` 目录，将 32 位 DLL 复制到 `syswow64`（对于纯 32 位前缀则复制到 `system32`），然后使用 `winecfg` 为 `d3d8`、`d3d9`、`d3d10core`、`d3d11` 和 `dxgi` 添加原生 DLL 覆盖。Steam Play、Lutris、Bottles 和 Heroic Launcher 等工具在启用后会代劳此设置。<sup>[1](https://github.com/doitsujin/dxvk)</sup> Debian 软件包提供 `dxvk-setup` 工具，用于向 Wine 前缀安装 DXVK 或从中卸载 DXVK。<sup>[8](https://manpages.debian.org/unstable/dxvk/dxvk-setup.1.en.html)</sup>

`DXVK_HUD` 环境变量控制一个屏幕显示，可显示帧率、帧时间图表、GPU 名称与驱动版本、绘制调用与管线数量、内存占用及其他计数器；`DXVK_HUD=full` 启用所有可用元素。设置 `DXVK_HUD=1` 等同于 `devinfo,fps`。<sup>[1](https://github.com/doitsujin/dxvk)</sup>

需要特殊处理的应用可通过配置文件 `dxvk.conf` 进行调整，该文件默认从工作目录加载，也可通过 `DXVK_CONFIG_FILE` 指定路径。选项可通过 `[app.exe]` 段限制为仅对单个可执行文件生效，不影响其他应用。项目文档警告称，覆盖默认值通常没有必要，且可能引发问题。<sup>[9](https://github.com/doitsujin/dxvk/wiki/Configuration)</sup>

项目 README 提醒，在多人游戏中操作 Direct3D 库可能被视为作弊，并可能导致账号封禁，包括含有多人成分的单人游戏。<sup>[1](https://github.com/doitsujin/dxvk)</sup>

## DXVK Native

DXVK Native 是一个无需 Wine 即可原生运行的变体。它面向游戏和应用移植者，目的要么是避免再写一个渲染后端，要么是在开发期间帮助移植版本运行起来。它用平台无关的构造替换 Windows 特有的构造；例如，`HWND` 可以变为 `SDL_Window*`。必须通过 `DXVK_WSI_DRIVER` 环境变量显式选择窗口系统集成后端，内置选项有 `SDL3`、`SDL2` 和 `GLFW`。发行版构建使用 Steam Runtime 构建。<sup>[6](https://github.com/PersonForever/dxvk)</sup> 原生构建已被用于已发行的游戏：《[反恐精英：全球攻势](https://www.edgepedia.org/zh/counter-strike-global-offensive)》在 Linux 上的 Vulkan 支持就是由 DXVK-Native 将游戏的 Direct3D 调用映射到 Vulkan 实现的。<sup>[10](https://www.phoronix.com/review/cs-go-vulkan)</sup>

## 驱动与系统要求

DXVK 3.x 要求驱动支持 Vulkan 1.4 并暴露一组必需的扩展，包括 `VK_EXT_depth_clip_enable`、`VK_KHR_maintenance5`、`VK_KHR_maintenance6`、`VK_EXT_robustness2` 和 `VK_EXT_transform_feedback`。驱动必须暴露至少 256 字节的推送常量，并支持描述符索引、8 位、16 位和 64 位整数类型以及 `scalarBlockLayout` 特性。需要 Wine 10.1 或更新版本以支持 winevulkan。<sup>[5](https://github.com/doitsujin/dxvk/wiki/Driver-support)</sup>

DXVK 3.x 在 Linux 上的最低驱动版本为 AMD RADV 25.0、Nvidia 专有驱动 575.51.02、开源 NVK 驱动 25.1 和 Intel ANV 25.1。项目指出，NVK 虽受支持，但在许多情况下性能不及专有驱动。较旧的 AMD GCN 显卡（Radeon HD 7xxx 及部分 R9 2xx/3xx 显卡）尽管截至 Mesa 26.1 仍未宣称支持 Vulkan 1.4，但依然可以工作。使用较旧硬件或驱动的用户可使用旧版 1.10.3 发行版，它仅需 Vulkan 1.1。<sup>[5](https://github.com/doitsujin/dxvk/wiki/Driver-support)</sup>

可选扩展可改善体验但并非必需：`VK_KHR_present_wait` 启用正确的帧延迟控制，`VK_EXT_graphics_pipeline_library` 减少着色器编译卡顿，`VK_EXT_descriptor_heap` 提供更高效的资源绑定模型。<sup>[5](https://github.com/doitsujin/dxvk/wiki/Driver-support)</sup>

## 在 Proton 与 Linux 游戏栈中的应用

DXVK 是 Valve 的 Proton（Steam Play 的兼容工具）的核心组件。Proton 默认使用 DXVK 进行 Direct3D 9、10 和 11 渲染，而 Direct3D 12 由 VKD3D-Proton 处理，这是一个独立的 Direct3D 12 到 Vulkan 实现。<sup>[4](https://static.sched.com/hosted_files/osseu2023/83/steamos-and-linux-oss-eu-2023.pdf)</sup><sup> • </sup><sup>[11](https://github.com/ValveSoftware/Proton)</sup> 用户可通过设置 `PROTON_USE_WINED3D` 环境变量回退到 Wine 基于 OpenGL 的 wined3d 渲染器，而非 DXVK。<sup>[11](https://github.com/ValveSoftware/Proton)</sup> Proton 的更新日志指出，DXVK 在此被构建为原生 Linux 库，项目称这带来了小幅性能提升和更轻松的调试。<sup>[12](https://github.com/ValveSoftware/Proton/wiki/Changelog)</sup>

DXVK 并非 Wine 本身的一部分；Wine 自有的 Direct3D 9、10 和 11 实现是 wined3d，而 DXVK 是一个可叠加在 Wine 之上的独立项目。<sup>[13](https://forum.winehq.org/viewtopic.php?p=136946&sid=3dbe8e9fa270db53dbbac09415d1b837)</sup> 在 2018 年的一次采访中，雷博勒将项目的目标描述为帮助那些为游戏而双系统启动或运行虚拟机的用户迁移到 Linux 作为其主要游戏平台。<sup>[14](https://www.gamingonlinux.com/2018/09/an-interview-with-the-developer-of-dxvk-part-of-what-makes-valves-steam-play-tick/)</sup>

## 近期发展

3.0 版用 dxbc-spirv 库替换了所有受支持着色器模型的旧着色器翻译代码，修复了因游戏依赖未定义行为或 FXC（微软的旧版着色器编译器）生成无效代码而导致的渲染问题。同一版本将 Vulkan 1.4 支持设为必需，并指出 AMD 面向 RDNA1 和 RDNA2 GPU 的 Windows 驱动不再获得功能更新且存在性能问题，建议受影响的用户留在 DXVK 2.x 或迁移到 Linux。<sup>[7](https://github.com/doitsujin/dxvk/releases)</sup>

3.0.2 版新增了挂起调试模式 `DXVK_DEBUG=hang`，帮助缩小对产生 `VK_ERROR_DEVICE_LOST` 错误的 GPU 挂起和驱动崩溃发生位置的排查范围，并规避了每帧创建新 DXGI 工厂的游戏中的性能退化问题。<sup>[7](https://github.com/doitsujin/dxvk/releases)</sup> 3.x 系列还在支持的驱动上默认采用 `VK_EXT_descriptor_heap` 扩展，弃用了 DXVK 2.7 引入的描述符缓冲区绑定模型；在 Nvidia 驱动上，该功能需要 595.84 或更新版本。<sup>[7](https://github.com/doitsujin/dxvk/releases)</sup>

## References

1. [doitsujin/dxvk README, GitHub](https://github.com/doitsujin/dxvk)
2. [doitsujin (Philip Rebohle), GitHub profile](https://github.com/doitsujin)
3. [wined3d/Vulkan, Wine development mailing list (January 2019)](https://www.winehq.org/pipermail/wine-devel/2019-January/138023.html)
4. [How SteamOS is contributing, Open Source Summit EU 2023](https://static.sched.com/hosted_files/osseu2023/83/steamos-and-linux-oss-eu-2023.pdf)
5. [Driver support, doitsujin/dxvk Wiki](https://github.com/doitsujin/dxvk/wiki/Driver-support)
6. [PersonForever/dxvk README (fork of doitsujin/dxvk), GitHub](https://github.com/PersonForever/dxvk)
7. [Releases, doitsujin/dxvk, GitHub](https://github.com/doitsujin/dxvk/releases)
8. [dxvk-setup(1), Debian unstable manpages](https://manpages.debian.org/unstable/dxvk/dxvk-setup.1.en.html)
9. [Configuration, doitsujin/dxvk Wiki](https://github.com/doitsujin/dxvk/wiki/Configuration)
10. [Vulkan vs. OpenGL Performance For Counter-Strike: Global Offensive, Phoronix](https://www.phoronix.com/review/cs-go-vulkan)
11. [ValveSoftware/Proton, GitHub](https://github.com/ValveSoftware/Proton)
12. [Changelog, ValveSoftware/Proton Wiki](https://github.com/ValveSoftware/Proton/wiki/Changelog)
13. [VKD3D only work for D3D12?, WineHQ Forums](https://forum.winehq.org/viewtopic.php?p=136946&sid=3dbe8e9fa270db53dbbac09415d1b837)
14. [An interview with the developer of DXVK, GamingOnLinux (2018)](https://www.gamingonlinux.com/2018/09/an-interview-with-the-developer-of-dxvk-part-of-what-makes-valves-steam-play-tick/)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Compilers, interpreters, and toolchains

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/dxvk

English original: https://www.edgepedia.org/dxvk
