Release 1.8.

This commit is contained in:
Henri Verbeet 2023-06-21 12:00:00 +02:00 committed by Alexandre Julliard
parent e17ee34b92
commit 771e442af1
Notes: Alexandre Julliard 2023-06-22 22:04:01 +02:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/244
11 changed files with 80 additions and 53 deletions

107
ANNOUNCE
View File

@ -1,17 +1,16 @@
The Wine team is proud to announce that release 1.7 of vkd3d, the Direct3D to The Wine team is proud to announce that release 1.8 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 many more HLSL features and intrinsics. - Support for still many more HLSL features and intrinsics.
- Much improved support for the Direct3D shader model 1/2/3 HLSL profiles. - Performance improvements to vkd3d descriptor updates.
- Public vkd3d-shader API for parsing and serialising 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.7.tar.xz https://dl.winehq.org/vkd3d/source/vkd3d-1.8.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:
@ -22,49 +21,73 @@ for the complete list.
---------------------------------------------------------------- ----------------------------------------------------------------
What's new in vkd3d 1.7 What's new in vkd3d 1.8
======================= =======================
*** libvkd3d
- Performance improvements have been made to the code that handles descriptor
updates. In some applications the improvement can be quite significant.
- 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
- New features for the HLSL source type: - New features for the HLSL source type:
- Support for calling user-defined functions. - Support for the ternary conditional operator "?:".
- Support for array parameters to user-defined functions. - Support for "discard" statements.
- Much improved support for the Direct3D shader model 1/2/3 profiles. - Support for the "packoffset" keyword.
- Support for the SV_DispatchThreadID, SV_GroupID, and SV_GroupThreadID - Support for semantics on array types.
compute shader system-value semantics. - Support for RWBuffer loads and stores.
- Support for the optional "offset" parameter of the texture object Load() - Register allocation for arrays and structures of resources and samplers
method. is implemented.
- Support for the all() intrinsic function. - Support for the SV_IsFrontFace pixel shader system-value semantics.
- Support for the distance() intrinsic function. - Support for using constant expressions as array sizes and indices.
- Support for the exp() and exp2() intrinsic functions. - Support for dynamic selection of vector components.
- Support for the frac() intrinsic function. - Support for the following intrinsic functions:
- Support for the lit() intrinsic function. - D3DCOLORtoUBYTE4()
- Support for the reflect() intrinsic function. - any()
- Support for the sin() and cos() intrinsic functions. - asfloat()
- Support for the smoothstep() intrinsic function. - ddx() and ddy()
- Support for the sqrt() and rsqrt() intrinsic functions. - fmod()
- Support for the step() intrinsic function. - log(), log2(), and log10()
- Support for the transpose() intrinsic function. - sign()
- Support for the case-insensitive variants of the "float" and "dword" data - trunc()
types. - The SampleBias(), SampleCmp(), SampleCmpLevelZero(), and SampleGrad()
- Partial support for minimum precision data types like "min16float". These texture object methods are implemented.
are currently interpreted as their regular counterparts. - Support for the case-insensitive variants of the "vector" and "matrix"
- Improved constant propagation support, in particular to constant data types.
propagation through swizzles. - Parser support for the "unroll" loop attribute. A warning is output for
"unroll" without iteration count, and an error is output when an iteration
count is specified. Actual unrolling is not implemented yet.
- Parser support for RWStructuredBuffer resources.
- Parser support for SamplerComparisonState objects. Note that outputting
compiled effects is not supported yet, but parsing these allows shaders
containing SamplerComparisonState state objects to be compiled.
- HLSL static variables are now properly zero-initialised. - More improvements to HLSL support for the Direct3D shader model 1/2/3
profiles.
- The Direct3D shader model 4 and 5 disassembler outputs sample counts for - The section alignment of DXBC blobs produced by
multi-sampled resource declarations. vkd3d_shader_serialize_dxbc() matches those produced by d3dcompiler more
closely.
- New interfaces: - The "main" function for shaders produced by the SPIR-V target is always
- vkd3d_shader_parse_dxbc() provides support for parsing DXBC blobs. terminated, even when the source was a TPF shader without explicit "ret"
- vkd3d_shader_serialize_dxbc() provides support for serialising DXBC blobs. instruction.
- vkd3d_shader_free_dxbc() is used to free vkd3d_shader_dxbc_desc
structures, as returned by vkd3d_shader_parse_dxbc(). - Relative addressing of shader input registers is supported by SPIR-V
- The VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE compile option targets.
can be used to specify whether SPIR-V shaders targeting Vulkan
environments should write point sizes for geometry and tessellation
shaders. If left unspecified, point sizes will be written.

View File

@ -8,6 +8,7 @@ Chip Davis
Conor McCarthy Conor McCarthy
David Gow David Gow
Derek Lesho Derek Lesho
Ethan Lee
Fabian Maurer Fabian Maurer
Francisco Casas Francisco Casas
Francois Gouget Francois Gouget
@ -16,6 +17,7 @@ Hans-Kristian Arntzen
Henri Verbeet Henri Verbeet
Isabella Bosia Isabella Bosia
Jactry Zeng Jactry Zeng
Jan Sikorski
Joshua Ashton Joshua Ashton
Józef Kucia Józef Kucia
Martin Storsjö Martin Storsjö

View File

@ -283,7 +283,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 6:0:5 libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 7:0:6
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
@ -317,7 +317,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 8:0:7 libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 9:0:8
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
@ -329,7 +329,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:3:3 libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:4: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.7]) AC_INIT([vkd3d],[1.8])
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_7 #define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_8
#include "config.h" #include "config.h"
#include <vkd3d.h> #include <vkd3d.h>
#include <vkd3d_utils.h> #include <vkd3d_utils.h>

View File

@ -76,6 +76,7 @@ enum vkd3d_api_version
VKD3D_API_VERSION_1_5, VKD3D_API_VERSION_1_5,
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_FORCE_32_BIT_ENUM(VKD3D_API_VERSION), VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION),
}; };

View File

@ -49,6 +49,7 @@ enum vkd3d_shader_api_version
VKD3D_SHADER_API_VERSION_1_5, VKD3D_SHADER_API_VERSION_1_5,
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_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION), VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION),
}; };

View File

@ -201,7 +201,7 @@ enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval_indexed(enum vkd3d
#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 7 #define VKD3D_SPIRV_GENERATOR_VERSION 8
#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_7; option->value = VKD3D_SHADER_API_VERSION_1_8;
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;
@ -315,7 +315,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_7}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_8},
}; };
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

@ -1958,7 +1958,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_7}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_8},
{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},
}; };
@ -2011,7 +2011,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_7}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_8},
{VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)}, {VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)},
}; };

View File

@ -726,7 +726,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_7); add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_8);
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;