-- v2: Release 1.9. vkd3d-shader/d3dbc: Translate sm1 fragment outputs to system values. vkd3d-shader/dxbc: Map sm4 fragment outputs to system values based on their name. vkd3d-shader: Add definitions for more fragment output system values.
From: Zebediah Figura zfigura@codeweavers.com
It was originally intended that this structure could hold other information about the next stage which compilation might depend on. For example, compilation to GLSL needs to know the type of the next shader in some circumstances.
That was never actualized, and since the API is fixed at this point for 1.9, it makes the most sense to rename the structure to match its actual scope.
The documentation was written and arranged to imply that the structure would hold other information about the next shader than the varying map; this is changed accordingly as well. --- include/vkd3d_shader.h | 40 +++++++++++++++++++--------------------- libs/vkd3d-shader/ir.c | 18 +++++++++--------- 2 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index fc2c1257d..7c45d410a 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -91,10 +91,10 @@ enum vkd3d_shader_structure_type */ VKD3D_SHADER_STRUCTURE_TYPE_SCAN_SIGNATURE_INFO, /** - * The structure is a vkd3d_shader_next_stage_info structure. + * The structure is a vkd3d_shader_varying_map_info structure. * \since 1.9 */ - VKD3D_SHADER_STRUCTURE_TYPE_NEXT_STAGE_INFO, + VKD3D_SHADER_STRUCTURE_TYPE_VARYING_MAP_INFO,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_STRUCTURE_TYPE), }; @@ -1690,7 +1690,7 @@ struct vkd3d_shader_scan_signature_info * Describes the mapping of a output varying register in a shader stage, * to an input varying register in the following shader stage. * - * This structure is used in struct vkd3d_shader_next_stage_info. + * This structure is used in struct vkd3d_shader_varying_map_info. */ struct vkd3d_shader_varying_map { @@ -1708,15 +1708,21 @@ struct vkd3d_shader_varying_map };
/** - * A chained structure which describes the next shader in the pipeline. + * A chained structure which describes how output varyings in this shader stage + * should be mapped to input varyings in the next stage. * - * This structure is optional, and should only be provided if there is in fact - * another shader in the pipeline. + * This structure is optional. It should not be provided if there is no shader + * stage. * However, depending on the input and output formats, this structure may be * necessary in order to generate shaders which correctly match each other. - * If the structure or its individual fields are not provided, vkd3d-shader - * will generate shaders which may be correct in isolation, but are not - * guaranteed to correctly match each other. + * + * If this structure is absent, vkd3d-shader will map varyings from one stage + * to another based on their register index. + * For Direct3D shader model 3.0, such a default mapping will be incorrect + * unless the registers are allocated in the same order, and hence this + * field is necessary to correctly match inter-stage varyings. + * This mapping may also be necessary under other circumstances where the + * varying interface does not match exactly. * * This structure is passed to vkd3d_shader_compile() and extends * vkd3d_shader_compile_info. @@ -1725,9 +1731,9 @@ struct vkd3d_shader_varying_map * * \since 1.9 */ -struct vkd3d_shader_next_stage_info +struct vkd3d_shader_varying_map_info { - /** Must be set to VKD3D_SHADER_STRUCTURE_TYPE_NEXT_STAGE_INFO. */ + /** Must be set to VKD3D_SHADER_STRUCTURE_TYPE_VARYING_MAP_INFO. */ enum vkd3d_shader_structure_type type; /** Optional pointer to a structure containing further parameters. */ const void *next; @@ -1741,14 +1747,6 @@ struct vkd3d_shader_next_stage_info * If this shader stage outputs a varying that is not consumed by the next * shader stage, that varying should be absent from this array. * - * If this field is absent, vkd3d-shader will map varyings from one stage - * to another based on their register index. - * For Direct3D shader model 3.0, such a default mapping will be incorrect - * unless the registers are allocated in the same order, and hence this - * field is necessary to correctly match inter-stage varyings. - * This mapping may also be necessary under other circumstances where the - * varying interface does not match exactly. - * * This mapping may be constructed by vkd3d_shader_build_varying_map(). */ const struct vkd3d_shader_varying_map *varying_map; @@ -1830,7 +1828,7 @@ VKD3D_SHADER_API const enum vkd3d_shader_target_type *vkd3d_shader_get_supported * following chained structures: * - vkd3d_shader_hlsl_source_info * - vkd3d_shader_interface_info - * - vkd3d_shader_next_stage_info + * - vkd3d_shader_varying_map_info * - vkd3d_shader_scan_descriptor_info * - vkd3d_shader_scan_signature_info * - vkd3d_shader_spirv_domain_shader_target_info @@ -2273,7 +2271,7 @@ VKD3D_SHADER_API void vkd3d_shader_free_scan_signature_info(struct vkd3d_shader_ * Build a mapping of output varyings in a shader stage to input varyings in * the following shader stage. * - * This mapping should be used in struct vkd3d_shader_next_stage_info to + * This mapping should be used in struct vkd3d_shader_varying_map_info to * compile the first shader. * * \param output_signature The output signature of the first shader. diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 6d7c89653..d2bfb933e 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -86,14 +86,14 @@ static void shader_instruction_eliminate_phase_instance_id(struct vkd3d_shader_i }
static const struct vkd3d_shader_varying_map *find_varying_map( - const struct vkd3d_shader_next_stage_info *next_stage, unsigned int signature_idx) + const struct vkd3d_shader_varying_map_info *varying_map, unsigned int signature_idx) { unsigned int i;
- for (i = 0; i < next_stage->varying_count; ++i) + for (i = 0; i < varying_map->varying_count; ++i) { - if (next_stage->varying_map[i].output_signature_index == signature_idx) - return &next_stage->varying_map[i]; + if (varying_map->varying_map[i].output_signature_index == signature_idx) + return &varying_map->varying_map[i]; }
return NULL; @@ -103,15 +103,15 @@ static enum vkd3d_result remap_output_signature(struct vkd3d_shader_parser *pars const struct vkd3d_shader_compile_info *compile_info) { struct shader_signature *signature = &parser->shader_desc.output_signature; - const struct vkd3d_shader_next_stage_info *next_stage; + const struct vkd3d_shader_varying_map_info *varying_map; unsigned int i;
- if (!(next_stage = vkd3d_find_struct(compile_info->next, NEXT_STAGE_INFO))) + if (!(varying_map = vkd3d_find_struct(compile_info->next, VARYING_MAP_INFO))) return VKD3D_OK;
for (i = 0; i < signature->element_count; ++i) { - const struct vkd3d_shader_varying_map *map = find_varying_map(next_stage, i); + const struct vkd3d_shader_varying_map *map = find_varying_map(varying_map, i); struct signature_element *e = &signature->elements[i];
if (map) @@ -137,9 +137,9 @@ static enum vkd3d_result remap_output_signature(struct vkd3d_shader_parser *pars } }
- for (i = 0; i < next_stage->varying_count; ++i) + for (i = 0; i < varying_map->varying_count; ++i) { - if (next_stage->varying_map[i].output_signature_index >= signature->element_count) + if (varying_map->varying_map[i].output_signature_index >= signature->element_count) { vkd3d_shader_parser_error(parser, VKD3D_SHADER_ERROR_VSIR_NOT_IMPLEMENTED, "Aborting due to not yet implemented feature: "
From: Zebediah Figura zfigura@codeweavers.com
--- include/vkd3d_shader.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 7c45d410a..892d44404 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -1464,8 +1464,24 @@ enum vkd3d_shader_sysval_semantic VKD3D_SHADER_SV_TESS_FACTOR_TRIINT = 0x0e, VKD3D_SHADER_SV_TESS_FACTOR_LINEDET = 0x0f, VKD3D_SHADER_SV_TESS_FACTOR_LINEDEN = 0x10, - /** Render target; SV_Target in Direct3D shader model 6 shaders. \since 1.9 */ + /** Render target; SV_Target in Direct3D. \since 1.9 */ VKD3D_SHADER_SV_TARGET = 0x40, + /** Depth; SV_Depth in Direct3D. \since 1.9 */ + VKD3D_SHADER_SV_DEPTH = 0x41, + /** Sample mask; SV_Coverage in Direct3D. \since 1.9 */ + VKD3D_SHADER_SV_COVERAGE = 0x42, + /** + * Depth, which is guaranteed to be greater than or equal to the current + * depth; SV_DepthGreaterEqual in Direct3D. \since 1.9 + */ + VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL = 0x43, + /** + * Depth, which is guaranteed to be less than or equal to the current + * depth; SV_DepthLessEqual in Direct3D. \since 1.9 + */ + VKD3D_SHADER_SV_DEPTH_LESS_EQUAL = 0x44, + /** Stencil reference; SV_StencilRef in Direct3D. \since 1.9 */ + VKD3D_SHADER_SV_STENCIL_REF = 0x45,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SYSVAL_SEMANTIC), };
From: Zebediah Figura zfigura@codeweavers.com
--- libs/vkd3d-shader/dxbc.c | 23 +++++++++++++++++++++++ tests/vkd3d_shader_api.c | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index cedc3da4a..1cb00688c 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -321,6 +321,26 @@ int vkd3d_shader_parse_dxbc(const struct vkd3d_shader_code *dxbc, return ret; }
+/* Shader Model 6 shaders use these special values in the output signature, + * but Shader Model 4/5 just use VKD3D_SHADER_SV_NONE. Normalize to SM6. */ +static enum vkd3d_shader_sysval_semantic map_fragment_output_sysval(const char *name) +{ + if (!ascii_strcasecmp(name, "sv_target")) + return VKD3D_SHADER_SV_TARGET; + if (!ascii_strcasecmp(name, "sv_depth")) + return VKD3D_SHADER_SV_DEPTH; + if (!ascii_strcasecmp(name, "sv_coverage")) + return VKD3D_SHADER_SV_COVERAGE; + if (!ascii_strcasecmp(name, "sv_depthgreaterequal")) + return VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL; + if (!ascii_strcasecmp(name, "sv_depthlessequal")) + return VKD3D_SHADER_SV_DEPTH_LESS_EQUAL; + if (!ascii_strcasecmp(name, "sv_stencilref")) + return VKD3D_SHADER_SV_STENCIL_REF; + + return VKD3D_SHADER_SV_NONE; +} + static int shader_parse_signature(const struct vkd3d_shader_dxbc_section_desc *section, struct vkd3d_shader_message_context *message_context, struct shader_signature *s) { @@ -401,6 +421,9 @@ static int shader_parse_signature(const struct vkd3d_shader_dxbc_section_desc *s case TAG_OSGN: case TAG_OSG1: case TAG_OSG5: + if (e[i].sysval_semantic == VKD3D_SHADER_SV_NONE) + e[i].sysval_semantic = map_fragment_output_sysval(e[i].semantic_name); + /* Fall through. */ case TAG_PCSG: case TAG_PSG1: e[i].used_mask = e[i].mask & ~e[i].used_mask; diff --git a/tests/vkd3d_shader_api.c b/tests/vkd3d_shader_api.c index ea53c81d0..3182fe0df 100644 --- a/tests/vkd3d_shader_api.c +++ b/tests/vkd3d_shader_api.c @@ -566,8 +566,8 @@ static void test_scan_signatures(void)
static const struct vkd3d_shader_signature_element ps1_outputs[] = { - {"sv_target", 2, 0, VKD3D_SHADER_SV_NONE, VKD3D_SHADER_COMPONENT_FLOAT, 2, 0xf, 0xf}, - {"sv_depth", 0, 0, VKD3D_SHADER_SV_NONE, VKD3D_SHADER_COMPONENT_FLOAT, ~0u, 0x1, 0x1}, + {"sv_target", 2, 0, VKD3D_SHADER_SV_TARGET, VKD3D_SHADER_COMPONENT_FLOAT, 2, 0xf, 0xf}, + {"sv_depth", 0, 0, VKD3D_SHADER_SV_DEPTH, VKD3D_SHADER_COMPONENT_FLOAT, ~0u, 0x1, 0x1}, };
static const char ps2_source[] =
From: Zebediah Figura zfigura@codeweavers.com
--- libs/vkd3d-shader/d3dbc.c | 6 +++--- tests/vkd3d_shader_api.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libs/vkd3d-shader/d3dbc.c b/libs/vkd3d-shader/d3dbc.c index d5104ae9b..1fd5ab244 100644 --- a/libs/vkd3d-shader/d3dbc.c +++ b/libs/vkd3d-shader/d3dbc.c @@ -597,7 +597,7 @@ static bool add_signature_element_from_register(struct vkd3d_shader_sm1_parser * case VKD3DSPR_TEMP: if (sm1->p.shader_version.type == VKD3D_SHADER_TYPE_PIXEL && sm1->p.shader_version.major == 1 && !register_index) - return add_signature_element(sm1, true, "COLOR", 0, VKD3D_SHADER_SV_NONE, 0, is_dcl, mask); + return add_signature_element(sm1, true, "COLOR", 0, VKD3D_SHADER_SV_TARGET, 0, is_dcl, mask); return true;
case VKD3DSPR_INPUT: @@ -641,11 +641,11 @@ static bool add_signature_element_from_register(struct vkd3d_shader_sm1_parser *
case VKD3DSPR_COLOROUT: return add_signature_element(sm1, true, "COLOR", register_index, - VKD3D_SHADER_SV_NONE, register_index, is_dcl, mask); + VKD3D_SHADER_SV_TARGET, register_index, is_dcl, mask);
case VKD3DSPR_DEPTHOUT: return add_signature_element(sm1, true, "DEPTH", 0, - VKD3D_SHADER_SV_NONE, register_index, is_dcl, 0x1); + VKD3D_SHADER_SV_DEPTH, register_index, is_dcl, 0x1);
case VKD3DSPR_RASTOUT: switch (register_index) diff --git a/tests/vkd3d_shader_api.c b/tests/vkd3d_shader_api.c index 3182fe0df..106bc21c4 100644 --- a/tests/vkd3d_shader_api.c +++ b/tests/vkd3d_shader_api.c @@ -587,7 +587,7 @@ static void test_scan_signatures(void)
static const struct vkd3d_shader_signature_element ps2_outputs[] = { - {"COLOR", 0, 0, VKD3D_SHADER_SV_NONE, VKD3D_SHADER_COMPONENT_FLOAT, 0, 0xf, 0xf}, + {"COLOR", 0, 0, VKD3D_SHADER_SV_TARGET, VKD3D_SHADER_COMPONENT_FLOAT, 0, 0xf, 0xf}, };
static const char ps3_source[] = @@ -609,8 +609,8 @@ static void test_scan_signatures(void)
static const struct vkd3d_shader_signature_element ps3_outputs[] = { - {"COLOR", 0, 0, VKD3D_SHADER_SV_NONE, VKD3D_SHADER_COMPONENT_FLOAT, 0, 0xf, 0xf}, - {"DEPTH", 0, 0, VKD3D_SHADER_SV_NONE, VKD3D_SHADER_COMPONENT_FLOAT, 0, 0x1, 0x1}, + {"COLOR", 0, 0, VKD3D_SHADER_SV_TARGET, VKD3D_SHADER_COMPONENT_FLOAT, 0, 0xf, 0xf}, + {"DEPTH", 0, 0, VKD3D_SHADER_SV_DEPTH, VKD3D_SHADER_COMPONENT_FLOAT, 0, 0x1, 0x1}, };
static const char ps4_source[] =
From: Henri Verbeet hverbeet@codeweavers.com
--- ANNOUNCE | 136 +++++++++++++++------------- AUTHORS | 2 + Makefile.am | 6 +- configure.ac | 2 +- demos/demo_xcb.h | 2 +- include/vkd3d.h | 1 + include/vkd3d_shader.h | 1 + libs/vkd3d-shader/spirv.c | 2 +- libs/vkd3d-utils/vkd3d_utils_main.c | 4 +- libs/vkd3d/state.c | 4 +- programs/vkd3d-compiler/main.c | 2 +- 11 files changed, 88 insertions(+), 74 deletions(-)
diff --git a/ANNOUNCE b/ANNOUNCE index 86d654d27..286ca0b21 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -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.
This release contains improvements that are listed in the release notes below. The main highlights are:
- - Support for still many more HLSL features and intrinsics. - - Performance improvements to vkd3d descriptor updates. + - Yet more improvements to the HLSL compiler. + - A new utility to inspect the contents of DXBC blobs. - Miscellaneous bug fixes.
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:
@@ -21,73 +21,83 @@ for the complete list.
----------------------------------------------------------------
-What's new in vkd3d 1.8 +What's new in vkd3d 1.9 =======================
*** 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. +- Copying between depth/stencil and colour formats in + ID3D12GraphicsCommandList::CopyResource() is supported. +- The ID3D12Fence1 interface is supported.
*** 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: - - 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: - - D3DCOLORtoUBYTE4() - - any() - - asfloat() - - ddx() and ddy() - - fmod() - - log(), log2(), and log10() - - sign() - - trunc() - - The SampleBias(), SampleCmp(), SampleCmpLevelZero(), and SampleGrad() - texture object methods are implemented. - - Support for the case-insensitive variants of the "vector" and "matrix" - data types. - - 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. - -- More improvements to HLSL support for the Direct3D shader model 1/2/3 - profiles. - -- The section alignment of DXBC blobs produced by - vkd3d_shader_serialize_dxbc() matches those produced by d3dcompiler more - closely. - -- The "main" function for shaders produced by the SPIR-V target is always - terminated, even when the source was a TPF shader without explicit "ret" - instruction. - -- Relative addressing of shader input registers is supported by SPIR-V - targets. + - clip() + - ddx_coarse() and ddy_coarse() + - ddx_fine() and ddy_fine() + - tex1D(), tex2D(), texCUBE(), and tex3D() + - Constant folding support for more expression types. In particular: + - comparison operators + - floating-point min() and max() + - logical `and' and `or' + - dot products + - square roots + - logarithms + - Support for multi-sample texture object declarations without explicit + sample counts in shader model 4.1 and later shaders. + - Support for using constant expressions as sample counts in multi-sample + texture object declarations. + - Support for variable initialisers using variables declared earlier in the + same declaration list. E.g., `float a = 1, b = a, c = b + 1;'. + - The GetDimensions() texture object method is implemented. + - Matrix swizzles are implemented. + - Parser support for if-statement attributes like `[branch]' and + `[flatten]'. + - Support for the `inline' function modifier. + +- Previously, vkd3d_shader_compile() would in some cases return VKD3D_OK + despite compilation failing when targeting legacy Direct3D bytecode. These + cases have been fixed. + +- Various HLSL preprocessor fixes for edge cases related to stringification. + +- SPIR-V target support for the `linear noperspective centroid' input + interpolation mode. + +- New interfaces: + - 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. diff --git a/AUTHORS b/AUTHORS index 6d4f0e061..2dc8e8c36 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,5 @@ Alexandre Julliard +Alistair Leslie-Hughes Andrew Eikum Andrey Gusev Atharva Nimbalkar @@ -9,6 +10,7 @@ Conor McCarthy David Gow Derek Lesho Ethan Lee +Evan Tang Fabian Maurer Francisco Casas Francois Gouget diff --git a/Makefile.am b/Makefile.am index d20e92725..744e46127 100644 --- a/Makefile.am +++ b/Makefile.am @@ -292,7 +292,7 @@ libvkd3d_shader_la_SOURCES = \ libs/vkd3d-shader/vkd3d_shader_main.c \ 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_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 if HAVE_LD_VERSION_SCRIPT 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/vulkan_procs.h 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@ if HAVE_LD_VERSION_SCRIPT 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_private.h 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@ if HAVE_LD_VERSION_SCRIPT libvkd3d_utils_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-utils/vkd3d_utils.map diff --git a/configure.ac b/configure.ac index 213ab22ee..52d233a42 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.69]) -AC_INIT([vkd3d],[1.8]) +AC_INIT([vkd3d],[1.9])
AC_CONFIG_AUX_DIR([bin]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/demos/demo_xcb.h b/demos/demo_xcb.h index f71e89f69..6eb3dc933 100644 --- a/demos/demo_xcb.h +++ b/demos/demo_xcb.h @@ -19,7 +19,7 @@
#define VK_NO_PROTOTYPES #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 <vkd3d.h> #include <vkd3d_utils.h> diff --git a/include/vkd3d.h b/include/vkd3d.h index 3adce97be..ef426898a 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -77,6 +77,7 @@ enum vkd3d_api_version VKD3D_API_VERSION_1_6, VKD3D_API_VERSION_1_7, VKD3D_API_VERSION_1_8, + VKD3D_API_VERSION_1_9,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION), }; diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 892d44404..01356ce39 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -50,6 +50,7 @@ enum vkd3d_shader_api_version VKD3D_SHADER_API_VERSION_1_6, VKD3D_SHADER_API_VERSION_1_7, VKD3D_SHADER_API_VERSION_1_8, + VKD3D_SHADER_API_VERSION_1_9,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION), }; diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 95f6914ac..8285b56a1 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -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_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)
struct vkd3d_spirv_stream diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 7a13d6caa..b0c025f46 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -210,7 +210,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
option = &options[0]; 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.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[] = { - {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", diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 7ae46c862..0b92cffcd 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1959,7 +1959,7 @@ static HRESULT create_shader_stage(struct d3d12_device *device,
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_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[] = { - {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)}, };
diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index 3341e037c..61e8d48a2 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -782,7 +782,7 @@ int main(int argc, char **argv) if (!options.explicit_colour && !getenv("NO_COLOUR") && !getenv("NO_COLOR") && has_colour(output)) 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_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.next = &hlsl_source_info;
This merge request was approved by Henri Verbeet.
Should be good to go now.