Pages

Showing posts with label vkd3d. Show all posts
Showing posts with label vkd3d. Show all posts

Wednesday, September 20, 2023

vkd3d 2.10 has been released with a ton of bug fixes

This release rolls up a ton of bug fixes, game and driver workarounds, and other improvements.

Features

DirectStorage MetaCommands

We can now make use of NV_memory_decompression to implement
GPU accelerated GDeflate compression in DirectStorage.
This is demonstrated to work in Ratchet & Clank: Rift Apart.

We also worked around an NV driver bug when using the fallback GDeflate shader.
The fallback works on RADV.

Enhanced Barriers

NOTE: This isn't all that well tested because there are no games shipping with this yet to our knowledge.

Device generated commands for compute

With NV_device_generated_commands_compute we can efficiently implement
Starfield's use of ExecuteIndirect which hammers multi-dispatch COMPUTE + root parameter changes.
Previously, we would rely on a very slow workaround.

NOTE: This feature is currently only enabled on RADV due to driver issues.

Misc

  • Support Root Signature version 1.2
  • Implement Shader Model 6.7
    • Includes all SM 6.7 features like AdvancedTextureOps, WaveOpsIncludeHelperLanes
    • Caveat: Technically not Vulkan spec compliant implementation, but works fine on at least NV and RADV. Currently implemented as an opt-in option for now in case some game relies on it to work
  • Implement CreateSampler2
  • Expose inverted viewport / height feature
  • Implement RelaxedFormatCasting feature from Enhanced Barriers
  • Implement support for adjacency topologies
  • Support A8_UNORM format properly by using VK_KHR_maintenance5, allowing A8_UNORM UAVs to work correctly
  • Handle range checked index buffers correctly with VK_KHR_maintenance5

New extension use

  • VK_EXT_dynamic_rendering_unused_attachments
  • VK_KHR_maintenance5
  • VK_NV_device_generated_commands_compute

Performance

  • Batch acceleration structure builds. Massively improves build performance on at least RADV.
  • Massively improve ExecuteIndirect performance when using COMPUTE + root parameter changes when VK_NV_device_generated_commands_compute is enabled.

Fixes

  • Fix root signature creation from DXIL library target (DXR) blobs
  • Fix some dual source blending PSOs scenarios. Fixes Star Wars Battlefront II
  • Implement wave operations in pixel shaders more strictly according to D3D12 rules
  • Fix spurious hangs in Ashes of Singularity when using shared fences and wait-before-signal
  • Fix PSO caching bug in mesh shaders. Fixes mesh shaders in Unreal Engine 5
  • Fix udiv remainder in DXBC, which fixed some Xenia bugs
  • Fix query heap tracking bug that was exposed by NV Streamline
  • Various DXIL -> SPIR-V fixes as usual
  • Rewrote descriptor set layouts to be more robust against application bugs
    • Motivated by Armored Core VI bug (see below)
    • Native D3D12 drivers are also robust against these application bugs :(

Workarounds

  • Workaround bad ReBAR performance in Age of Wonders 4
  • Remove workaround for KHR_present_wait on NV 535+ drivers
  • Workaround Starfield memory corruption issue where it does not correctly query for 4 KiB alignment
  • Disable ReBAR usage on Halo Infinite to workaround very poor CPU performance
  • Workaround Street Fighter 6 bug causing spurious GPU hangs
    • Also appears to have worked around GPU hangs in Resident Evil 2
  • Workaround Armored Core VI bug causing GPU hang on Balteus fight in chapter 1
  • Workaround "firefly" glitches in Resident Evil 4 caused by dubious min16float usage
  • Workaround "firefly" glitches in Monster Hunter Rise caused by dubious shader requiring particular precise math
  • Workaround Unreal Engine 5 breaking if mesh shaders are exposed, but not barycentrics
  • Workaround NV driver bug with TIMESTAMP query heaps that could cause spurious GPU hangs
  • Workaround broken CFG code generation in Xenia's DXBC emitter

 Link to vkd3d source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today. 

Tuesday, December 27, 2022

vkd3d-proton version 2.8 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.

 

 

This release rolls up some significant new developments before the holidays.

VK_EXT_descriptor_buffer support

This extension is significant in that it removes a ton of CPU overhead.
We already had most of this in place on RADV and Steam Deck,
but this will allow NVIDIA, Intel, Turnip, and other AMD driver implementations to hit the same optimal code paths.
GPU bound performance increases slightly since we can also remove some shader code that was required to workaround lack of descriptor buffers.

New extension requirements

To support descriptor buffers in the code base, these features are now required instead of optional.
Note that these features are widely supported already and is not expected to cause any problems.
If an implementation could support v2.7, it will support v2.8.

  • VK_KHR_buffer_device_address
  • VK_KHR_push_descriptor

Rewritten support for host accessible images

The entire API feature was rewritten from scratch to support more implementations and edge cases without
a lot of per-application hacks and workarounds.
As the most extreme example of weird API usage, Guardians of the Galaxy should (finally) run well on NVIDIA.

Rewritten swap chain

To most users, this change should be transparent.

  • Allow more precise control on latency and frame pacing with VK_KHR_present_wait.
    • mesa-git supports this along with NVIDIA.
    • VKD3D_SWAPCHAIN_LATENCY_FRAMES=n allows user to force a specific amount of latency.
    • Implementation of DXGI latency fences is now correct.
  • Reduce CPU overhead on the main thread that presents to swap chain.
  • Fixes a spurious hang in Hitman III where game relies on asynchronous present in order to not lock up.
  • Win32 specific DXGI code is handled by DXVK. A DXVK build from Experimental or later is required for this to work.
    This allows a native Linux implementation of vkd3d-proton, including swap chain.
  • When VK_KHR_present_wait is not supported, behavior should be 1:1 with old implementation.

NOTE: The old swapchain implementation is still in the repository, and is expected to be removed in the next release.
For now, VKD3D_CONFIG=swapchain_legacy can be used to triage any potential issues with the new one.

NOTE: A driver crash was observed on NVIDIA 525.x drivers when running in some PRIME configurations.
For now, we disable use of present_wait on these drivers.

Fixes and workarounds

  • Workaround GPU hangs in Spiderman Remastered: Miles Morales (same issue as the original).
  • Fix rendering bug with gun damage in Borderlands 3 on RADV.
  • Refactor how resizable BAR is used. GPUs with 4 GiB and lower will no longer attempt to use resizable BAR,
    which can avoid some out-of-memory situations.
  • Fix GPU hang in Age of Empires IV.
  • Fix some minor issues in mesh shader implementation.
  • Fix some issues preventing RE: Village from booting on Arc.
  • Some last minute frenzied fixes for Witcher 3 next-gen update.
    • All features except RT appears to work on RADV.
    • Hairworks is known to crash GPU on NVIDIA. More investigation is needed to root cause.
    • Some RT effects work on NVIDIA, others don't:
      • GI is reported to work.
      • AO crashes GPU. More investigation is needed to root cause.

Implement minor missing D3D12 features

An obscure feature was stubbed out and forgotten until now.
ID3D12Device1::SetEventOnMultipleFenceCompletion() is now implemented.

Also, implement SetEventOn(Multiple)FenceCompletion for shared D3D12 fences.
Fixes a regression in Gears 5 causing lockup on boot.

Link to source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.
 

Thursday, October 27, 2022

vkd3d-proton version 2.7 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.


This release rolls up a massive amount of work since the Steam Deck launch in late February
with mostly features and fixes.

Heightened driver requirements

Newer extensions are now required.

  • VK_KHR_dynamic_rendering
  • VK_EXT_extended_dynamic_state
  • VK_EXT_extended_dynamic_state2 (no optional features required)
  • VK_KHR_maintenance4

KHR_dynamic_rendering in particular requires Mesa 22.0 or NVIDIA 510 series, which should have
propagated to distributions a long time ago at this point.

NOTE: Proton 7.0 stable series will stick to v2.6 to avoid the hard driver requirement bump.
Proton Experimental and any future stable beyond 7.0 will stick to v2.7 and later.

KHR_dynamic_rendering fixes many previously unsolvable issues, but it required a rewrite,
and it was deemed impractical to support both legacy and modern paths.

Improved pipeline cache

v2.6 introduced support for pipeline libraries, but only for games which made correct use of the D3D12 API.
To improve the situation across the board,
vkd3d-proton now implements an internal "magic" disk cache to enable SPIR-V caching for all games.
It is possible to disable the magic cache and let applications manage the ID3D12PipelineLibrary itself if desired.

To further reduce on-disk footprint of the magic cache, we also make use of VK_EXT_shader_module_identifier
to reduce the vkd3d-proton cache by >95%, since there is no need to store actual SPIR-V data on-disk.

Optimizations

Mostly a lot of minor things this release.

  • Slightly improve GPU performance for depth render passes.
  • Improve GPU performance for certain floating-point images where UAV usage was enabled.
  • Improve GPU performance for certain use cases of WriteBufferImmediate().
  • Improve GPU performance for certain access patterns of root descriptors.
  • Improve GPU performance for back-to-back buffer-image copies.
  • Improve GPU performance when allocating large zero-cleared resources and heaps.
  • Misc things here and there to reduce overhead.

New D3D12 features

Mesh shaders

VK_EXT_mesh_shader is required for this. Directly compatible with D3D12.

Advanced ExecuteIndirect

Uses VK_NV_device_generated_commands. Supported by both RADV and NVIDIA. Allows Halo Infinite to run.

DXR 1.1

Implement some missing features from DXR 1.1:

  • AddToStateObject()
  • ExecuteIndirect trace rays
  • Various complex RTPSO features
  • DXIL subobject parsing
  • Misc query features

With these fixes in place, e.g. Cyberpunk 2077 DXR works. VK_KHR_raytracing_maintenance1 is required for some features.

NOTE: VKD3D_CONFIG=dxr11 is required to enable DXR 1.1 for now.

Shared resources

Basic shared resources and fences are now supported when running on Proton. Allows interop with DXVK.
Special thanks to Derek Lesho (@Guy1524) for implementation.

SV_Barycentrics

SM 6.1 barycentrics are now exposed through VK_KHR_fragment_shader_barycentric.

Preliminary HDR support

vkd3d-proton can take advantage of HDR now, assuming the system itself supports it.

Game fixes and workarounds

  • Fix random GPU hangs in Hitman 3.
  • Fix crash in Redout 2.
  • Fix random GPU hang in F1 2021.
  • Fix random flicker in Guardians of the Galaxy.
  • Update some API checks required by latest AgilitySDK runtime features. Fix crash in F1 2022.
  • Add various workarounds for game bugs in Halo Infinite.
  • Add workaround for amdgpu kernel issue for certain games using imported host memory and multiple Vulkan devices.
  • Workaround glitched rendering in F1 2020 due to game bug.
  • Workaround certain games that violate placed resource API w.r.t. subresource initialization.
    Spiderman Remastered and Lost Judgment are affected. More games will likely surface.

DXIL support

Countless bug fixes for games released since last release. Too many to enumerate individually.

Misc

  • Improve compatibility with Intel ANV driver.
  • Improve correctness of GetFrameLatencyWaitableObject().
  • Add BLOB PIX decoding.
  • Improve stability when minimizing and alt-tabbing in and out of fullscreen in some games.
  • Preparation for MIT re-license is underway.

Stronger debugging facilities

  • For developers and power users, a breadcrumbs functionality is added to greatly aid GPU hang debugging.
    Requires either VK_AMD_buffer_marker or VK_NV_device_diagnostic_checkpoints.
  • When capturing with RenderDoc, cached host memory is enabled by default to speed up capture and improve stability.
  • Improve shader replacement system ease-of-use.

Link to source code


Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

 

Wednesday, June 22, 2022

Vkd3d 1.4 Released

The Wine team is proud to announce that release 1.4 of vkd3d, the Direct3D to Vulkan translation library, is now available.

This release contains improvements that are listed in the release notes. The main highlights are:

  • Many improvements to the HLSL compiler.
  • A new descriptor heap implementation using the VK_EXT_descriptor_indexing extension.
  • A new fence implementation using the VK_KHR_timeline_semaphore extension.

The source is available here.

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Friday, March 4, 2022

vkd3d-proton version 2.6 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.

 

It has been a long while since 2.5, and this release rolls up a lot of fixes, features and optimizations.

Fixes

  • Fix black screen rendering bug in Horizon Zero Dawn after latest game updates.
  • Fix crashes on startup in Final Fantasy VII: Remake and Warframe.
  • Fix crashes in Guardians of the Galaxy when interacting with certain game objects.
  • Fix hang on game shutdown in Elden Ring.
  • Fix broken geometry rendering in Age of Empires: IV.

Optimization

  • Improve generated shader code for vectorized load-store operations in DXIL.
  • Greatly reduce CPU overhead for descriptor copy operations,
    which is a key contributor to CPU overhead in D3D12.

Features

Pipeline library rewrite

Support D3D12 pipeline libraries better where we can now also cache
generated SPIR-V from DXBC/DXIL.
Massively reduces subsequent load times in Monster Hunter: Rise,
and helps other titles like Guardian of the Galaxy and Elden Ring.
Also lays the groundwork for internal driver caches down the line for games which do not use this API.
Also, deduplicates binary blobs for reduced disk size requirements.

Shader models

Shader model 6.6 is now fully implemented. This includes support for:

  • ResourceDescriptorHeap[] direct access
  • 64-bit atomics
  • IsHelperLane()
  • Compute shader derivatives
  • WaveSize attribute
  • Packed math intrinsics

Minor features

  • Handle API feature MinResourceLODClamp correctly if VK_EXT_image_view_min_lod is supported.
  • Expose CastFullyTypedFormat feature.
  • Expose some advanced shader features on Intel related to UAV formats (VK_KHR_format_feature_flags2).
  • Support COLOR -> STENCIL copies.

Workarounds

  • Workaround DEATHLOOP not emitting synchronization commands correctly. Fixes menu flicker on RADV.
  • Workaround quirky API usage in Elden Ring. Removes many kinds of stutter and chug when traversing the scenery.
  • Workaround certain environments failing to create Vulkan device if some VK_NVX_* extensions are enabled.
  • Workaround glitched foliage rendering in Horizon Zero Dawn after latest game updates.
  • Workaround some questionable UE4 shaders causing glitched rendering on RADV.

Note on future Vulkan driver requirements

2.6 is expected to be the last vkd3d-proton release before we require some newer Vulkan extensions.
VK_KHR_dynamic_rendering and VK_EXT_extended_dynamic_state
(and likely dynamic_state_2 as well) will be required.

VK_KHR_dynamic_rendering in particular requires up-to-date drivers and the legacy render pass path
will be abandoned in favor of it. Supporting both paths at the same time is not practical.
Moving to VK_KHR_dynamic_rendering allows us to fix some critical flaws with the legacy API
which caused potential shader compilation stutters and extra CPU overhead.

Link to source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Wednesday, March 2, 2022

Vkd3d 1.3 Released

The Wine team is proud to announce that release 1.3 of vkd3d, the Direct3D to Vulkan translation library, is now available.

This release contains improvements that are listed in the release notes. The main highlights are:

  • Initial HLSL compilation support.
  • Shader model 5.1 descriptor array support.
  • Support for disassembling Direct3D shaders.

The source is available here.

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Thursday, July 8, 2021

vkd3d-proton version 2.4 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.

 


This is a release which focuses on performance and bug-fixes.

Performance

  • Improve swapchain latency and frame pacing by up to one frame.
  • Optimize lookup of format info.
  • Avoid potential pipeline compilation stutter in certain scenarios.
  • Rewrite how we handle image layouts for color and depth-stencil targets.
    Allows us to remove a lot of dumb
    barriers giving significant GPU-bound performance improvements.
    ~15%-20% GPU bound uplift in Horizon Zero Dawn,
    ~10% in Death Stranding,
    and 5%-10% improvements in many other titles.

Features

  • Enable support for sparse 3D textures (tiled resources tier 3).

Bug fixes and workarounds

  • Various bug fixes in DXIL.
  • Fix weird bug where sun would pop through walls in RE: Village.
  • Workaround game bug in Cyberpunk 2077 where certain locales would render a black screen.
  • Fix various bugs (in benchmark and in vkd3d-proton) allowing GravityMark to run.
  • Improve robustness against certain app bugs related to NULL descriptors.
  • Fix bug with constant FP64 vector handling in DXBC.
  • Fix bug where Cyberpunk 2077 inventory screen could spuriously hang GPU on RADV.
  • Add workaround for Necromunda: Hired Gun where character models would render random garbage on RADV.
  • Fix bug in Necromunda: Hired Gun causing random screen flicker.
  • Fix windowed mode tracking when leaving fullscreen. Fix Alt-Tab handling in Horizon Zero Dawn.
  • Temporary workaround for SRV ResourceMinLODClamp. Fix black ground rendering in DIRT 5.
    The overbright HDR rendering in DIRT 5 sadly persists however :(
  • Implement fallback maximum swapchain latency correctly.

Development features

Various features which are useful for developers were added to aid debugging.

  • Descriptor QA can instrument shaders in runtime for GPU-assisted validation.
    Performance is good enough (> 40 FPS) that games are actually playable in this mode.
    See README for details.
  • Allow forcing off CONCURRENT queue, and using EXCLUSIVE queue.
    Not valid, but can be useful as a speed hack on Polaris when single_queue is not an option
    and for testing driver behavior differences.

Link to source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Tuesday, April 27, 2021

vkd3d-proton version 2.3.1 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.

 


 This is a minor bugfix release to address some issues solved shortly after the last release.

Fixes

  • Improved support for older Wine and Vulkan Loader versions.
  • Fix blocky shadows in Horizon Zero Dawn.
  • Fix the install script failing on Wine installs not built with upstream vkd3d.
  • Fix minor dxil translation issues.

Link to source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Thursday, April 22, 2021

vkd3d-proton version 2.3 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.

 


This release adds support for more D3D12 features and greatly improves GPU bound performance
in many scenarios.

Features

Early DXR 1.0 support

VK_KHR_raytracing is used to enable cross-vendor ray-tracing support.
The implementation is WIP, but it is good enough to run some real content.

As of writing, only the NVIDIA driver works correctly.
It is expected AMD RDNA2 GPUs will work when working drivers are available
(amdgpu-pro 21.10 is known to not work).

Games which are expected to work include:

  • Control (appears to be fully working)
  • Ghostrunner (seems to work, not exhaustively tested)

To enable DXR support, VKD3D_CONFIG=dxr %command% should be used when launching game.
Certain games may be unstable if DXR is enabled by default.

Conservative rasterization

Full support (tier 3) for conservative rasterization was added.

Variable rate shading

Full support (tier 2) for variable rate shading was added.

Command list bundles

Allows Kingdom Hearts remaster to get past the errors, unsure if game fully works yet.

Write Watch and APITrace

Support for D3D12_HEAP_FLAG_ALLOW_WRITE_WATCH has been added.
This means APITraces of titles can now be captured.

Performance

  • Improve GPU bound performance in RE2 by up to 20% on NVIDIA.
  • Enable async compute queues. Greatly improves GPU performance and frame pacing in many titles.
    Horizon Zero Dawn and Death Stranding see exceptional gains with this fix,
    due to how the engines work. GPU utilization should now reach ~100%.
    For best results, AMD Navi+ GPUs are recommended, but Polaris and earlier still
    see great results. It is possible to disable this path, if for whatever reason
    multiple queues are causing issues. See README.
  • Optimize bindless constant buffer GPU-bound performance on NVIDIA if certain API code paths are used.
  • Optimize sparse binding CPU overhead.
  • TRACE logging calls are disabled by default on release builds.

Fixes and workarounds

  • Fix various DXIL bugs.
  • Be more robust against broken pipeline creation API calls.
    Avoids driver crashes in Forza Horizon 4.
  • Workaround some buggy shaders in F1 2020.
  • Fix bugs if depth bounds test is used in certain ways.
  • Fix a read out-of-bounds in UpdateTileMappings.
  • Fix SV_ClipDistance and SV_CullDistance in Hull Shaders.

Link to source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Saturday, February 20, 2021

vkd3d-proton version 2.2 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.

 


This release is mostly a maintenance release which fixes bugs and regressions.
It also unblocks significant future feature development.

Workaround removals

  • Replace old force_bindless_texel_buffer workaround with
    a more correct and performant implementation.
    Death Stranding and Cyberpunk 2077 (and probably other games as well) do the right thing by default without the hack now.
  • Remove old workaround disable_query_optimization for occlusion queries which was enabled for AC: Valhalla,
    and is now replaced by a correct and efficient implementation.

Cyberpunk 2077 status

From recent testing on our end, it is unknown at this time if VK_VALVE_mutable_descriptor_type is still required for
Cyberpunk 2077. Manual testing hasn't been able to trigger a GPU hang.
The memory allocation rewrite in 2.2 can plausibly work around some of the bugs that VK_VALVE_mutable_descriptor_type fixed by accident.
The bugs in question could also have been fixed since release day, but we cannot prove this since the bug is completely random in nature.

Regression fixes

  • Fix regression in Horizon Zero Dawn for screen space reflections on water surfaces.

Stability fixes

  • Greatly improve stability on Polaris or older cards for certain titles.
    Crashes which used to happen in Horizon Zero Dawn and Death Stranding seem to have disappeared
    after the memory allocation rewrite.
    GPU memory usage should decrease on these cards as well.
  • DIRT 5 can get in-game now due to DXIL fixes, but is not yet playable.

New features

  • Add support for Variable Rate Shading tier 1.

Future development

DXR is not yet supported, but has seen a fair bit of background work.

  • Basic DXR pipelines can be created successfully.
  • Memory allocation rewrite in 2.2 unblocks further DXR development.

Link to source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Monday, December 14, 2020

vkd3d-proton version 2.1 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.

 


This release fixes various bugs (mostly workarounds) and improves GPU-bound performance.

New games added to "expected to work" list:

  • The Division (was working already in 2.0, but missing from list)
  • AC: Valhalla (*)

(*): Game requires full D3D12 sparse texture support to work.
Currently only works on NVIDIA drivers.
RADV status remains unknown until support for this feature lands in Mesa.

New games added to "kinda works, but expect a lot of jank" list:

  • Cyberpunk 2077 (**)

(**): Currently only runs correctly on AMD hardware with RADV and VK_VALVE_mutable_descriptor_type.
As of game version 1.03, this requires the latest Mesa Git build.
The game has some fatal bugs where it relies on undefined behavior with descriptor management
which this extension works around by accident.
The game will start and run on NVIDIA, but just like what happens without the extension on AMD,
the GPU will randomly hang, making the game effectively unplayable.
A game update to fix this bug would likely make the game playable on NVIDIA as well.
Game version 1.04 changed some behavior, and support for this game will likely fluctuate over time as future patches come in.

Bug fixes and workarounds:

  • Fix various implementation bugs which caused AC: Valhalla to not work.
  • Work around game bug in Death Stranding where accessing map could cause corrupt rendering.
    (Several games appear to have the same kind of application bug.)
  • Fix corrupt textures in Horizon Zero Dawn benchmark.
  • Fix SM 6.0 wave-op detection for Horizon Zero Dawn and DIRT 5.
  • Work around GPU hangs in certain situations where games do not use D3D12 correctly,
    but native D3D12 drivers just render wrong results rather than hang the system.
  • Fix invalid SPIR-V generated by FP64 code.
  • Fix crash with minimized windows in certain cases.

Performance:

  • ~15% GPU-bound uplift in Ghostrunner. Might help UE4 titles in general.
  • Slightly improve GPU bound performance when fully GPU bound on both AMD and NVIDIA.
  • Slightly improve GPU bound performance on RADV in various titles.
  • Reduce multi-threaded CPU overhead for certain D3D12 API usage patterns.
  • Add support for VK_VALVE_mutable_descriptor_type which
    improves CPU overhead, memory bloat, and avoids potential memory management thrashing on RADV.
    Also avoids GPU hangs in certain situations where games misuse the D3D12 API.

Misc:

  • Implement DXGI_PRESENT_TEST.
  • Fix log spam when DXGI_PRESENT_ALLOW_TEARING is used.

Link to source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Saturday, November 7, 2020

vkd3d-proton version 2.0 has been released

VKD3D-Proton is a fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan. The project serves as the development effort for Direct3D 12 support in Proton.

 


This initial release supports D3D12 Feature Level 12.0 and Shader Model 6.0 (DXIL).

Games expected to work include:

  • Control
  • Death Stranding
  • Devil May Cry 5
  • Ghostrunner
  • Horizon Zero Dawn
  • Metro Exodus
  • Monster Hunter World
  • Resident Evil 2 / 3

Please refer to the README for supported driver versions.

Link to source code

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

 

Tuesday, September 22, 2020

Vkd3d 1.2 Released

 he Wine team is proud to announce that release 1.2 of vkd3d, the Direct3D to Vulkan translation library, is now available.

This release contains improvements that are listed in the release notes. The main highlights are:

  • Availability of libvkd3d-shader as a public library.
  • Support for tessellation shaders.
  • Version 1.1 root signatures.
  • Stream output support.

The source is available here.

What's new in vkd3d 1.2
=======================


*** libvkd3d

- Newly implemented Direct3D 12 features:
  - Multi-sampling.
  - Reserved resources.
  - Instance data step rates. This requires the
    VK_EXT_vertex_attribute_divisor extension.
  - `Private data' APIs for all interfaces.
  - Shader-resource view component mappings.
  - Indirect indexed draws.
  - Indirect draws with a count buffer. This requires the
    VK_KHR_draw_indirect_count extension.
  - Stream output and stream output queries. This requires the
    VK_EXT_transform_feedback extension.
  - Predicated/conditional rendering.
  - Primitive restart.
  - Depth rendering without a pixel shader.
  - Depth clipping. This requires the VK_EXT_depth_clip_enable extension.
  - Rasteriser discard.
  - Dual-source blending.
  - Mapping placed resources.
  - The ReadFromSubresource() and WriteToSubresource() ID3D12Resource methods.
  - Simultaneous access to resources from multiple queues.
  - Null-views. I.e., views without an underlying resource.
  - Several more feature support queries.

- New interfaces:
  - vkd3d_serialize_versioned_root_signature() and
    vkd3d_create_versioned_root_signature_deserializer() provide support for
    versioned root signatures.
  - The vkd3d_application_info structure extends the
    vkd3d_instance_create_info structure, and can be used to pass information
    about the application to libvkd3d. It is analogous to the
    VkApplicationInfo structure in Vulkan. Its `api_version' field should be
    set to the version of the libvkd3d API that the application targets.
  - The vkd3d_optional_device_extensions_info structure extends the
    vkd3d_device_create_info structure, and can be used to pass a list of
    device extensions to enable only when available to libvkd3d. It is
    analogous to the vkd3d_optional_instance_extensions_info structure for
    instance extensions.

- New environment variables:
  - VKD3D_CONFIG can be used to set options that change the behaviour of
    libvkd3d.
  - VKD3D_TEST_BUG can be used to disable bug_if() conditions in the test
    suite.
  - VKD3D_TEST_FILTER can be used to control which tests are run.
  - VKD3D_VULKAN_DEVICE can be used to override the Vulkan physical device
    used by vkd3d.
  See the README for more detailed descriptions and how to use these.

- When the VK_KHR_dedicated_allocation extension is available, dedicated
  allocations may be used for committed resources.

- When the VK_KHR_image_format_list extension is available, it will be used to
  inform the driver about the view formats that a particular mutable Vulkan
  image can be used with. This improves performance on some Vulkan
  implementations.

- When the VK_EXT_debug_marker extension is available, object names set with
  the ID3D12Object SetName() method will be propagated to the underlying
  Vulkan objects.

- Unordered-access view clears are supported on more formats. Previously these
  were limited to integer formats for texture resources, and single component
  integer formats for buffer resources.

- When the D24_UNORM_S8_UINT format is not supported by the Vulkan
  implementation, the D32_SFLOAT_S8_UINT format will be used instead to
  implement the D24_UNORM_S8_UINT and related DXGI formats. This is required
  because the DXGI D24_UNORM_S8_UINT format is mandatory, while the Vulkan
  D24_UNORM_S8_UINT format is optional.

- Various bug fixes.


*** libvkd3d-shader

- libvkd3d-shader is now available as a public instead of an internal library.

- New features:
  - Tessellation shaders.
  - Root signature version 1.1 serialisation, deserialisation, and conversion.
  - Multi-sample masks.
  - Per-sample shading.
  - Early depth/stencil test.
  - Conservative depth output.
  - Dual-source blending.
  - Stream output.
  - Viewport arrays.

- Support for OpenGL SPIR-V target environments. This allows SPIR-V produced
  by libvkd3d-shader to be used with GL_ARB_gl_spirv. This includes support
  for OpenGL atomic counters and combined samplers.

- Preliminary support for shader model 5.1 shaders. This is still a work in
  progress. Notably, support for resource arrays is not yet implemented.

- When the SPV_EXT_demote_to_helper_invocation is available, it will be used
  to implement the `discard' shader instruction instead of using SpvOpKill. In
  particular, this ensures the `deriv_rtx' and `deriv_rty' instruction return
  accurate results after a (conditional) `discard' instruction.

- Support for using SPIR-V specialisation constants for shader parameters.

- Support for more shader instructions:
  - bufinfo,
  - eval_centroid,
  - eval_sample_index,
  - ld2ms,
  - sample_b,
  - sample_d,
  - sample_info,
  - samplepos.

- When built against SPIRV-Tools, libvkd3d-shader can produce SPIR-V shaders
  in text form.

- libvkd3d-shader now has its own environment variable (VKD3D_SHADER_DEBUG) to
  control debug output.

- Various shader translation fixes.


*** vkd3d-compiler

- When supported by libvkd3d-shader, text form SPIR-V is available as a target
  format, in addition to the existing binary form SPIR-V target format.

- Input from standard input, and output to standard output is supported.


*** libvkd3d-utils

- To specify the libvkd3d API version to use when creating vkd3d instances,
  define VKD3D_UTILS_API_VERSION to the desired version before including
  vkd3d_utils.h. If VKD3D_UTILS_API_VERSION is not explicitly defined,
  VKD3D_API_VERSION_1_0 will be used.

- Support for versioned root signatures is provided by the
  D3D12SerializeVersionedRootSignature() and
  D3D12CreateVersionedRootSignatureDeserializer() entry points.


*** build

- The minimum required version of Vulkan-Headers and SPIRV-Headers for this
  release is version 1.1.113.

- The minimum required version of widl for this release is version 3.20.

- If doxygen is available, it will be used to build API documentation. By
  default, documentation will be generated in HTML and PDF formats.

- If debug logs are not required or desired, defining VKD3D_NO_TRACE_MESSAGES
  and VKD3D_NO_DEBUG_MESSAGES will prevent them from being included in the
  build. For example, a release build may want to configure with
  `CPPFLAGS="-DNDEBUG -DVKD3D_NO_TRACE_MESSAGES -DVKD3D_NO_DEBUG_MESSAGES"'.

- Microsoft Windows is now a supported target platform. To create a build for
  Windows, either cross-compile by configuring with an appropriate --host
  option like for example `--host=x86_64-w64-mingw32', or build on Windows
  itself using an environment like MSYS2 or Cygwin.

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.