Release 1.14.

This commit is contained in:
Henri Verbeet 2024-11-21 12:00:00 +01:00
parent 1f09f4fb3a
commit 5c00766eff
Notes: Henri Verbeet 2024-11-21 12:37:30 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1269
16 changed files with 968 additions and 388 deletions

1191
ANNOUNCE

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@ Alistair Leslie-Hughes
Andrew Eikum Andrew Eikum
Andrey Gusev Andrey Gusev
Anna (navi) Figueiredo Gomes Anna (navi) Figueiredo Gomes
Arkadiusz Hiler
Atharva Nimbalkar Atharva Nimbalkar
Biswapriyo Nath Biswapriyo Nath
Brendan Shanks Brendan Shanks
@ -15,6 +16,7 @@ Elizabeth Figura
Ethan Lee Ethan Lee
Evan Tang Evan Tang
Fabian Maurer Fabian Maurer
Feifan He
Florian Weimer Florian Weimer
Francisco Casas Francisco Casas
Francois Gouget Francois Gouget

View File

@ -1,3 +1,130 @@
# What's new in vkd3d 1.14 (21 November 2024)
### libvkd3d
- Depth bounds can be changed dynamically using the OMSetDepthBounds() method
of the ID3D12GraphicsCommandList1 interface.
- The new VKD3D_CAPS_OVERRIDE environment variable can be used to override the
value of capabilities like the maximum feature level and resource binding
tier reported to applications.
### libvkd3d-shader
- New features for the HLSL source type:
- Interstage I/O variable packing matches d3dcompiler/fxc more closely.
- The following intrinsic functions are supported:
- dst()
- f32tof16()
- mad()
- modf()
- sincos()
- discard support for shader model 1-3 target profiles.
- The SV_SampleIndex input semantic for fragment shaders.
- The SV_GroupIndex input semantic for compute shaders.
- The earlydepthstencil function attribute.
- Constant folding of expressions like x && c and x || c, where c is a
constant.
- Preprocessor support for namespaces in macro identifiers. I.e., syntax
like #define NAME1::NAME2::NAME3 1 works as intended now.
- Structure inheritance. Multiple inheritance is not supported.
- Register assignments for unused constant buffers are allowed to overlap
register assignments for used constant buffers.
- Instruction count reflection data for shader model 4+ target profiles.
This data is contained in the STAT DXBC section, and can be queried with
the GetDesc() method of the ID3D11ShaderReflection and
ID3D12ShaderReflection interfaces. Note that the ID3D12ShaderReflection
implementation provided by vkd3d-utils does not currently correctly report
this information.
- unorm and snorm resource format modifiers. For example,
Texture2D<unorm float4> t;
- Parser support for ByteAddressBuffer resources, as well as their
Load()/Load2()/Load3()/Load4() methods.
- Parser support for RWByteAddressBuffer resources, as well as their
Store()/Store2()/Store3()/Store4() methods.
- Parser support for the compile keyword, as well as the CompileShader()
and ConstructGSWithSO() intrinsic functions. Actual compilation of
embedded shaders is not implemented yet, but parser support is sufficient
for allowing compilation of HLSL sources containing this syntax to succeed
when targetting shader target profiles like vs_5_0 or ps_5_0.
- Initial support for tessellation shaders. Only the most trivial shaders
are supported in this release. Perhaps most notably, both InputPatch and
OutputPatch are not implemented yet.
- The new fx source type can be used in combination with the d3d-asm
target type to disassemble binary effects.
- More complete support for fx_2_0 binary effect output, including support for
annotations, default values, as well as object initialiser data used for e.g.
string, texture, and shader objects.
- A significant number of instructions have been implemented for the
experimental GLSL target. The GLSL output currently targets version 4.40
without extensions, but the intention is to make this configurable in a
future release of vkd3d.
- Experimental support for Metal Shading Language (MSL) output, enabled by
building vkd3d with the -DVKD3D_SHADER_UNSUPPORTED_MSL preprocessor
option. The current release is only able to compile the most basic shaders
when targetting MSL. Being an experimental feature, both the ABI and API may
change in future releases; the feature may even go away completely.
Nevertheless, we hope our users find this feature useful, and welcome
feedback and contributions.
- Shader code generation for various legacy fixed-function features, including
clip planes, point sizes, and point sprites. This is mainly relevant for
executing shader model 1-3 sources in modern target environments like
Vulkan, because those target environments do not implement equivalent
fixed-function features.
- The amount of shader validation done by the internal validator has been
greatly extended. The validator is enabled by the force_validation option,
specified through the VKD3D_SHADER_CONFIG environment variable.
- New interfaces:
- The VKD3D_SHADER_COMPILE_OPTION_DOUBLE_AS_FLOAT_ALIAS flag specifies that
the double type behaves as an alias for the float type in HLSL sources
with shader model 1-3 target profiles.
- The VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32_VEC4 enumeration value
specifies that a shader parameter contains a 4-dimensional vector of
32-bit floating-point data.
- The VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_MASK shader parameter specifies
which clip planes are enabled.
- The VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_[0-7] shader parameters specify
the corresponding clip planes.
- The VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE shader parameter specifies the
point size to output when the source shader does not explicitly output a
point size.
- The VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MIN shader parameter specifies
the minimum point size to clamp point size outputs to.
- The VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MAX shader parameter specifies
the maximum point size to clamp point size outputs to.
- The VKD3D_SHADER_PARAMETER_NAME_POINT_SPRITE shader parameter specifies
whether texture coordinate inputs in fragment shaders should be replaced
with point coordinates.
- The VKD3D_SHADER_SOURCE_FX source type specifies binary Direct3D effects.
- The VKD3D_SHADER_TARGET_MSL target type specifies Metal Shading Language
shaders.
### libvkd3d-utils
- The GetDesc() method of the ID3D12ShaderReflection interface returned by
D3DReflect() returns shader version information.
- New interfaces:
- D3DCompile2VKD3D() is a variant of D3DCompile2() that allows targeting the
behaviour of a specific d3dcompiler version.
### vkd3d-compiler
- The --alias-double-as-float option specifies that the double type
behaves as an alias for the float type in HLSL sources with shader model
1-3 target profiles.
- The fx source type specifies binary Direct3D effects.
- The msl target type specifies Metal Shading Language shaders.
# What's new in vkd3d 1.13 (29 August 2024) # What's new in vkd3d 1.13 (29 August 2024)
### libvkd3d ### libvkd3d

View File

@ -392,7 +392,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 12:0:11 libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 13:0:12
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
@ -427,7 +427,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 14:0:13 libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 15:0:14
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
@ -440,7 +440,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 6:2:5 libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 7:0:6
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

2
commits Normal file
View File

@ -0,0 +1,2 @@
-
0dc07f5cce72cce47b1a2787a910aeb5edc2a65e vkd3d-shader: Silence a spurious -Wmaybe-uninitialized in vsir_program_insert_alpha_test().

View File

@ -1,5 +1,5 @@
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_INIT([vkd3d],[1.13]) AC_INIT([vkd3d],[1.14])
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_13 #define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_14
#include "config.h" #include "config.h"
#include <vkd3d.h> #include <vkd3d.h>
#include <vkd3d_utils.h> #include <vkd3d_utils.h>

View File

@ -98,6 +98,7 @@ enum vkd3d_api_version
VKD3D_API_VERSION_1_11, VKD3D_API_VERSION_1_11,
VKD3D_API_VERSION_1_12, VKD3D_API_VERSION_1_12,
VKD3D_API_VERSION_1_13, VKD3D_API_VERSION_1_13,
VKD3D_API_VERSION_1_14,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION), VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION),
}; };

View File

@ -56,6 +56,7 @@ enum vkd3d_shader_api_version
VKD3D_SHADER_API_VERSION_1_11, VKD3D_SHADER_API_VERSION_1_11,
VKD3D_SHADER_API_VERSION_1_12, VKD3D_SHADER_API_VERSION_1_12,
VKD3D_SHADER_API_VERSION_1_13, VKD3D_SHADER_API_VERSION_1_13,
VKD3D_SHADER_API_VERSION_1_14,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION), VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION),
}; };

View File

@ -3235,7 +3235,7 @@ static void fx_4_parse_shader_initializer(struct fx_parser *parser, unsigned int
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_13}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_14},
}; };
switch (object_type) switch (object_type)

View File

@ -250,7 +250,7 @@ enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval_indexed(enum vkd3d
#define VKD3D_SPIRV_VERSION_1_0 0x00010000 #define VKD3D_SPIRV_VERSION_1_0 0x00010000
#define VKD3D_SPIRV_VERSION_1_3 0x00010300 #define VKD3D_SPIRV_VERSION_1_3 0x00010300
#define VKD3D_SPIRV_GENERATOR_ID 18 #define VKD3D_SPIRV_GENERATOR_ID 18
#define VKD3D_SPIRV_GENERATOR_VERSION 13 #define VKD3D_SPIRV_GENERATOR_VERSION 14
#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

@ -271,7 +271,7 @@ HRESULT WINAPI D3DCompile2VKD3D(const void *data, SIZE_T data_size, const char *
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_13; option->value = VKD3D_SHADER_API_VERSION_1_14;
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;
@ -435,7 +435,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_13}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_14},
}; };
TRACE("data %p, size %"PRIuPTR", filename %s, macros %p, include %p, preprocessed_blob %p, messages_blob %p.\n", TRACE("data %p, size %"PRIuPTR", filename %s, macros %p, include %p, preprocessed_blob %p, messages_blob %p.\n",
@ -981,7 +981,7 @@ HRESULT WINAPI D3DDisassemble(const void *data, SIZE_T data_size,
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_13}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_14},
}; };
TRACE("data %p, data_size %"PRIuPTR", flags %#x, comments %p, blob %p.\n", TRACE("data %p, data_size %"PRIuPTR", flags %#x, comments %p, blob %p.\n",

View File

@ -2281,7 +2281,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_13}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_14},
{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},
{VKD3D_SHADER_COMPILE_OPTION_FEATURE, feature_flags_compile_option(device)}, {VKD3D_SHADER_COMPILE_OPTION_FEATURE, feature_flags_compile_option(device)},
@ -2336,7 +2336,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_13}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_14},
{VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)}, {VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)},
}; };
@ -4015,7 +4015,7 @@ static int compile_hlsl_cs(const struct vkd3d_shader_code *hlsl, struct vkd3d_sh
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_13}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_14},
}; };
info.type = VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO; info.type = VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO;

View File

@ -870,7 +870,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_13); add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_14);
if (options.target_type == VKD3D_SHADER_TARGET_SPIRV_BINARY if (options.target_type == VKD3D_SHADER_TARGET_SPIRV_BINARY
|| options.target_type == VKD3D_SHADER_TARGET_SPIRV_TEXT) || options.target_type == VKD3D_SHADER_TARGET_SPIRV_TEXT)
add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_FEATURE, add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_FEATURE,

View File

@ -550,7 +550,7 @@ static bool compile_shader(struct gl_runner *runner, ID3DBlob *blob, struct vkd3
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_13}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_14},
{VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN, {VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN,
VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT}, VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT},
{VKD3D_SHADER_COMPILE_OPTION_FEATURE, shader_runner_caps_get_feature_flags(&runner->caps)}, {VKD3D_SHADER_COMPILE_OPTION_FEATURE, shader_runner_caps_get_feature_flags(&runner->caps)},

View File

@ -312,7 +312,7 @@ static bool compile_d3d_code(struct vulkan_shader_runner *runner,
int ret; int ret;
options[0].name = VKD3D_SHADER_COMPILE_OPTION_API_VERSION; options[0].name = VKD3D_SHADER_COMPILE_OPTION_API_VERSION;
options[0].value = VKD3D_SHADER_API_VERSION_1_13; options[0].value = VKD3D_SHADER_API_VERSION_1_14;
options[1].name = VKD3D_SHADER_COMPILE_OPTION_FEATURE; options[1].name = VKD3D_SHADER_COMPILE_OPTION_FEATURE;
options[1].value = shader_runner_caps_get_feature_flags(&runner->caps); options[1].value = shader_runner_caps_get_feature_flags(&runner->caps);