Release 1.9.

This commit is contained in:
Henri Verbeet 2023-09-20 12:00:00 +02:00 committed by Alexandre Julliard
parent 9417c7cfb7
commit 90d4529f27
Notes: Alexandre Julliard 2023-09-21 22:01:59 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/356
11 changed files with 84 additions and 70 deletions

128
ANNOUNCE
View File

@ -1,16 +1,16 @@
The Wine team is proud to announce that release 1.8 of vkd3d, the Direct3D to The Wine team is proud to announce that release 1.9 of vkd3d, the Direct3D to
Vulkan translation library, is now available. Vulkan translation library, is now available.
This release contains improvements that are listed in the release notes below. This release contains improvements that are listed in the release notes below.
The main highlights are: The main highlights are:
- Support for still many more HLSL features and intrinsics. - Yet more improvements to the HLSL compiler.
- Performance improvements to vkd3d descriptor updates. - A new utility to inspect the contents of DXBC blobs.
- Miscellaneous bug fixes. - Miscellaneous bug fixes.
The source is available from the following location: The source is available from the following location:
https://dl.winehq.org/vkd3d/source/vkd3d-1.8.tar.xz https://dl.winehq.org/vkd3d/source/vkd3d-1.9.tar.xz
The current source can also be pulled directly from the git repository: The current source can also be pulled directly from the git repository:
@ -21,73 +21,83 @@ for the complete list.
---------------------------------------------------------------- ----------------------------------------------------------------
What's new in vkd3d 1.8 What's new in vkd3d 1.9
======================= =======================
*** libvkd3d *** libvkd3d
- Performance improvements have been made to the code that handles descriptor - Copying between depth/stencil and colour formats in
updates. In some applications the improvement can be quite significant. ID3D12GraphicsCommandList::CopyResource() is supported.
- The ID3D12Fence1 interface is supported.
- Host-visible descriptor heaps are persistently mapped on creation. Some
applications access resource data from the CPU after calling Unmap(), and
that's supposed to work in practice.
- 1-dimensional texture unordered-access views and shader resource views are
implemented.
- Shader resource view, unordered access view, and constant buffer view root
descriptors with NULL GPU addresses are supported.
- Direct3D 12 descriptor heap destruction is delayed until all contained
resources are destroyed.
*** libvkd3d-shader *** libvkd3d-shader
- vkd3d_shader_scan() supports retrieving descriptor information for `d3dbc'
shaders. This is one of the requirements for eventual SPIR-V generation from
`d3dbc' sources.
- New features for the HLSL source type: - New features for the HLSL source type:
- Support for the ternary conditional operator "?:".
- Support for "discard" statements.
- Support for the "packoffset" keyword.
- Support for semantics on array types.
- Support for RWBuffer loads and stores.
- Register allocation for arrays and structures of resources and samplers
is implemented.
- Support for the SV_IsFrontFace pixel shader system-value semantics.
- Support for using constant expressions as array sizes and indices.
- Support for dynamic selection of vector components.
- Support for the following intrinsic functions: - Support for the following intrinsic functions:
- D3DCOLORtoUBYTE4() - clip()
- any() - ddx_coarse() and ddy_coarse()
- asfloat() - ddx_fine() and ddy_fine()
- ddx() and ddy() - tex1D(), tex2D(), texCUBE(), and tex3D()
- fmod() - Constant folding support for more expression types. In particular:
- log(), log2(), and log10() - comparison operators
- sign() - floating-point min() and max()
- trunc() - logical `and' and `or'
- The SampleBias(), SampleCmp(), SampleCmpLevelZero(), and SampleGrad() - dot products
texture object methods are implemented. - square roots
- Support for the case-insensitive variants of the "vector" and "matrix" - logarithms
data types. - Support for multi-sample texture object declarations without explicit
- Parser support for the "unroll" loop attribute. A warning is output for sample counts in shader model 4.1 and later shaders.
"unroll" without iteration count, and an error is output when an iteration - Support for using constant expressions as sample counts in multi-sample
count is specified. Actual unrolling is not implemented yet. texture object declarations.
- Parser support for RWStructuredBuffer resources. - Support for variable initialisers using variables declared earlier in the
- Parser support for SamplerComparisonState objects. Note that outputting same declaration list. E.g., `float a = 1, b = a, c = b + 1;'.
compiled effects is not supported yet, but parsing these allows shaders - The GetDimensions() texture object method is implemented.
containing SamplerComparisonState state objects to be compiled. - Matrix swizzles are implemented.
- Parser support for if-statement attributes like `[branch]' and
`[flatten]'.
- Support for the `inline' function modifier.
- More improvements to HLSL support for the Direct3D shader model 1/2/3 - Previously, vkd3d_shader_compile() would in some cases return VKD3D_OK
profiles. despite compilation failing when targeting legacy Direct3D bytecode. These
cases have been fixed.
- The section alignment of DXBC blobs produced by - Various HLSL preprocessor fixes for edge cases related to stringification.
vkd3d_shader_serialize_dxbc() matches those produced by d3dcompiler more
closely.
- The "main" function for shaders produced by the SPIR-V target is always - SPIR-V target support for the `linear noperspective centroid' input
terminated, even when the source was a TPF shader without explicit "ret" interpolation mode.
instruction.
- Relative addressing of shader input registers is supported by SPIR-V - New interfaces:
targets. - The vkd3d_shader_scan_signature_info structure extends the
vkd3d_shader_compile_info structure, and can be used to retrieve
descriptions of `dxbc-tpf' and `d3dbc' shader inputs and outputs.
- vkd3d_shader_free_scan_signature_info() is used to free
vkd3d_shader_scan_signature_info structures.
- The VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER compile option can be
used to specify the default matrix packing order for HLSL sources.
- The vkd3d_shader_varying_map_info structure extends the
vkd3d_shader_compile_info structure, and can be used to specify a mapping
between the outputs of a shader stage and the inputs of the next shader
stage.
- vkd3d_shader_build_varying_map() is used to build a mapping between the
outputs of a shader stage and the inputs of the next shader stage.
- The VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_RAW_BUFFER flag returned as part of
the vkd3d_shader_descriptor_info structure indicates the descriptor refers
to a byte-addressed (`raw') buffer resource.
*** vkd3d-compiler
- The `--matrix-storage-order' option can used to specify the default matrix
storage order for HLSL sources.
*** vkd3d-dxbc
- vkd3d-dxbc is a new utility that can be used to inspect the contents of DXBC
blobs.

View File

@ -1,4 +1,5 @@
Alexandre Julliard Alexandre Julliard
Alistair Leslie-Hughes
Andrew Eikum Andrew Eikum
Andrey Gusev Andrey Gusev
Atharva Nimbalkar Atharva Nimbalkar
@ -9,6 +10,7 @@ Conor McCarthy
David Gow David Gow
Derek Lesho Derek Lesho
Ethan Lee Ethan Lee
Evan Tang
Fabian Maurer Fabian Maurer
Francisco Casas Francisco Casas
Francois Gouget Francois Gouget

View File

@ -292,7 +292,7 @@ libvkd3d_shader_la_SOURCES = \
libs/vkd3d-shader/vkd3d_shader_main.c \ libs/vkd3d-shader/vkd3d_shader_main.c \
libs/vkd3d-shader/vkd3d_shader_private.h libs/vkd3d-shader/vkd3d_shader_private.h
libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SHADER_SOURCE -I$(srcdir)/libs/vkd3d-shader @SPIRV_TOOLS_CFLAGS@ libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SHADER_SOURCE -I$(srcdir)/libs/vkd3d-shader @SPIRV_TOOLS_CFLAGS@
libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 7:0:6 libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 8:0:7
libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ -lm libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ -lm
if HAVE_LD_VERSION_SCRIPT if HAVE_LD_VERSION_SCRIPT
libvkd3d_shader_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map libvkd3d_shader_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map
@ -327,7 +327,7 @@ libvkd3d_la_SOURCES = \
libs/vkd3d/vkd3d_shaders.h \ libs/vkd3d/vkd3d_shaders.h \
libs/vkd3d/vulkan_procs.h libs/vkd3d/vulkan_procs.h
libvkd3d_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SOURCE libvkd3d_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SOURCE
libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 9:0:8 libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 10:0:9
libvkd3d_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la @DL_LIBS@ @PTHREAD_LIBS@ libvkd3d_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la @DL_LIBS@ @PTHREAD_LIBS@
if HAVE_LD_VERSION_SCRIPT if HAVE_LD_VERSION_SCRIPT
libvkd3d_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d/vkd3d.map libvkd3d_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d/vkd3d.map
@ -339,7 +339,7 @@ libvkd3d_utils_la_SOURCES = \
libs/vkd3d-utils/vkd3d_utils_main.c \ libs/vkd3d-utils/vkd3d_utils_main.c \
libs/vkd3d-utils/vkd3d_utils_private.h libs/vkd3d-utils/vkd3d_utils_private.h
libvkd3d_utils_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_UTILS_SOURCE libvkd3d_utils_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_UTILS_SOURCE
libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:4:3 libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:5:3
libvkd3d_utils_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la libvkd3d.la @PTHREAD_LIBS@ libvkd3d_utils_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la libvkd3d.la @PTHREAD_LIBS@
if HAVE_LD_VERSION_SCRIPT if HAVE_LD_VERSION_SCRIPT
libvkd3d_utils_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-utils/vkd3d_utils.map libvkd3d_utils_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-utils/vkd3d_utils.map

View File

@ -1,5 +1,5 @@
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_INIT([vkd3d],[1.8]) AC_INIT([vkd3d],[1.9])
AC_CONFIG_AUX_DIR([bin]) AC_CONFIG_AUX_DIR([bin])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])

View File

@ -19,7 +19,7 @@
#define VK_NO_PROTOTYPES #define VK_NO_PROTOTYPES
#define VK_USE_PLATFORM_XCB_KHR #define VK_USE_PLATFORM_XCB_KHR
#define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_8 #define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_9
#include "config.h" #include "config.h"
#include <vkd3d.h> #include <vkd3d.h>
#include <vkd3d_utils.h> #include <vkd3d_utils.h>

View File

@ -77,6 +77,7 @@ enum vkd3d_api_version
VKD3D_API_VERSION_1_6, VKD3D_API_VERSION_1_6,
VKD3D_API_VERSION_1_7, VKD3D_API_VERSION_1_7,
VKD3D_API_VERSION_1_8, VKD3D_API_VERSION_1_8,
VKD3D_API_VERSION_1_9,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION), VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION),
}; };

View File

@ -50,6 +50,7 @@ enum vkd3d_shader_api_version
VKD3D_SHADER_API_VERSION_1_6, VKD3D_SHADER_API_VERSION_1_6,
VKD3D_SHADER_API_VERSION_1_7, VKD3D_SHADER_API_VERSION_1_7,
VKD3D_SHADER_API_VERSION_1_8, VKD3D_SHADER_API_VERSION_1_8,
VKD3D_SHADER_API_VERSION_1_9,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION), VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION),
}; };

View File

@ -211,7 +211,7 @@ static inline bool register_is_constant_or_undef(const struct vkd3d_shader_regis
#define VKD3D_SPIRV_VERSION 0x00010000 #define VKD3D_SPIRV_VERSION 0x00010000
#define VKD3D_SPIRV_GENERATOR_ID 18 #define VKD3D_SPIRV_GENERATOR_ID 18
#define VKD3D_SPIRV_GENERATOR_VERSION 8 #define VKD3D_SPIRV_GENERATOR_VERSION 9
#define VKD3D_SPIRV_GENERATOR_MAGIC vkd3d_make_u32(VKD3D_SPIRV_GENERATOR_VERSION, VKD3D_SPIRV_GENERATOR_ID) #define VKD3D_SPIRV_GENERATOR_MAGIC vkd3d_make_u32(VKD3D_SPIRV_GENERATOR_VERSION, VKD3D_SPIRV_GENERATOR_ID)
struct vkd3d_spirv_stream struct vkd3d_spirv_stream

View File

@ -210,7 +210,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
option = &options[0]; option = &options[0];
option->name = VKD3D_SHADER_COMPILE_OPTION_API_VERSION; option->name = VKD3D_SHADER_COMPILE_OPTION_API_VERSION;
option->value = VKD3D_SHADER_API_VERSION_1_8; option->value = VKD3D_SHADER_API_VERSION_1_9;
compile_info.type = VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO; compile_info.type = VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO;
compile_info.next = &preprocess_info; compile_info.next = &preprocess_info;
@ -326,7 +326,7 @@ HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, const char *filename
static const struct vkd3d_shader_compile_option options[] = static const struct vkd3d_shader_compile_option options[] =
{ {
{VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_8}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_9},
}; };
TRACE("data %p, size %lu, filename %s, macros %p, include %p, preprocessed_blob %p, messages_blob %p.\n", TRACE("data %p, size %lu, filename %s, macros %p, include %p, preprocessed_blob %p, messages_blob %p.\n",

View File

@ -1959,7 +1959,7 @@ static HRESULT create_shader_stage(struct d3d12_device *device,
const struct vkd3d_shader_compile_option options[] = const struct vkd3d_shader_compile_option options[] =
{ {
{VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_8}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_9},
{VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)}, {VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)},
{VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE, 0}, {VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE, 0},
}; };
@ -2013,7 +2013,7 @@ static int vkd3d_scan_dxbc(const struct d3d12_device *device, const D3D12_SHADER
const struct vkd3d_shader_compile_option options[] = const struct vkd3d_shader_compile_option options[] =
{ {
{VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_8}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_9},
{VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)}, {VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)},
}; };

View File

@ -782,7 +782,7 @@ int main(int argc, char **argv)
if (!options.explicit_colour && !getenv("NO_COLOUR") && !getenv("NO_COLOR") && has_colour(output)) if (!options.explicit_colour && !getenv("NO_COLOUR") && !getenv("NO_COLOR") && has_colour(output))
options.formatting |= VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR; options.formatting |= VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR;
add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_FORMATTING, options.formatting); add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_FORMATTING, options.formatting);
add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_8); add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_9);
info.type = VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO; info.type = VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO;
info.next = &hlsl_source_info; info.next = &hlsl_source_info;