The Wine project has released version 1.13 of the vkd3d package, which implements Direct3D 12 through call translation to the Vulkan graphics API. The package includes libvkd3d libraries with Direct3D 12 implementation, libvkd3d-shader with a translator for shader models 4 and 5, and libvkd3d-utils with functions to simplify the porting of Direct3D 12 applications, as well as a set of demonstration examples, including the porting of glxgears to Direct3D 12. The project's code is distributed under the LGPLv2.1 license.
The libvkd3d library supports most of the capabilities of Direct3D 12, including graphics and compute tools, command queues and command lists, descriptors and heap descriptors, root signatures, unordered access, samplers, command signatures, root constants, indirect drawing, and Clear*() and Copy*() methods. The libvkd3d-shader implements the translation of shader model bytecode to the SPIR-V intermediate representation. Vertex, pixel, tessellation, compute, and simple geometry shaders are supported, including serialization and deserialization of root signatures. Arithmetic, atomic, and bitwise operations, comparison and data flow control instructions, sample, gather, and load instructions, and unordered access operations (UAV, Unordered Access View) are implemented from shader instructions.
In the new version:
- The HLSL compiler now supports loop unrolling (an optimization that replaces cyclic operations with several consecutive code copies to more efficiently utilize the processor cache and reduce branching).
- Support has been added for an effects compiler for certain state objects of shader model 4.
- Support has been provided for the types of shader model 4: BlendState, ComputeShader, DomainShader, GeometryShader, HullShader, DepthStencilState, and RasterizerState, as well as for the functions OMSetRenderTargets(), SetBlendState(), SetComputeShader(), SetDomainShader(), SetGeometryShader(), SetHullShader(), SetPixelShader(), SetVertexShader(), SetDepthStencilState(), and SetRasterizerState().
- The shader compiler implements support for parsing and storing initialization values in various formats for global variables, function parameters, and annotations.
- Support for register space of shader model 5.1 has been added.
- Built-in functions tex1D(), tex2D(), tex3D(), texCUBE(), asint(), f16tof32(), faceforward(), GetRenderTargetSampleCount(), rcp(), tex2Dbias(), tex1Dgrad(), tex2Dgrad(), tex3Dgrad(), and texCUBEgrad() have been implemented.
- An ID3D12CommandList6 interface has been added to libvkd3d, enabling the creation of textures whose compression occurs at the level of individual blocks (for example, 4×4 pixel blocks are compressed separately).
- Support for the vkd3d_shader_parameter_info structure and parameters VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32, VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_FUNC, VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_REF, VKD3D_SHADER_PARAMETER_NAME_FLAT_INTERPOLATION, and VKD3D_SHADER_PARAMETER_TYPE_BUFFER has been added.
Source: opennet.ru
