Commit Graph

104 Commits

Author SHA1 Message Date
Henri Verbeet
5c00766eff Release 1.14. 2024-11-21 12:35:55 +01:00
Nikolay Sivov
7ae1284c16 vkd3d-compiler: Add missing 'fx' source type to the CLI output.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-17 17:32:54 +02:00
Nikolay Sivov
6801ad9b7a vkd3d-shader/fx: Introduce a parser/disassembler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-14 15:20:41 +02:00
Nikolay Sivov
799e6105a4 vkd3d-shader/d3dbc: Add an option to treat doubles as floats.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55448
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-09-23 15:26:35 +02:00
Feifan He
23ba1a5e07 vkd3d-shader: Introduce VKD3D_SHADER_TARGET_MSL. 2024-09-12 17:03:32 +02:00
Henri Verbeet
0e72aba0bc Release 1.13. 2024-08-29 12:08:46 +02:00
Henri Verbeet
36c123c005 Release 1.12. 2024-05-29 22:05:28 +02:00
Nikolay Sivov
e1e6367210 vkd3d-shader/fx: Add an option to include empty buffers in the effect binary.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-04-02 23:10:42 +02:00
Giovanni Mascellani
9047dad4bc vkd3d-compiler: Clean up the shader code in all failure paths (Valgrind). 2024-04-02 23:10:02 +02:00
Nikolay Sivov
13227f3852 vkd3d-shader: Add an option to enable child effects compilation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:41 +01:00
Giovanni Mascellani
9b0a9f63f7 vkd3d-compiler: Add an option to emit the signature when disassembling. 2024-03-07 23:08:25 +01:00
Henri Verbeet
f866fb95ad Release 1.11. 2024-03-05 20:39:45 +01:00
Henri Verbeet
5552be552b vkd3d-compiler: Compile SPIR-V shaders with the int64 and float64 features. 2024-03-04 22:34:30 +01:00
Henri Verbeet
d65f331efc configure: Build with -Wwrite-strings.
libs/vkd3d-shader/hlsl.c: In function ‘declare_predefined_types’:
libs/vkd3d-shader/hlsl.c:3408:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
         {"technique",    9},
          ^~~~~~~~~~~
...
programs/vkd3d-compiler/main.c: In function ‘parse_formatting’:
programs/vkd3d-compiler/main.c:303:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
         {"colour",  VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR},
          ^~~~~~~~
...

macOS tigetstr() takes a non-const char *, so account for that as well.
2024-02-22 22:46:29 +01:00
Giovanni Mascellani
8b11b4b37a vkd3d-compiler: Free compilation options (Valgrind). 2024-02-01 00:08:28 +01:00
Giovanni Mascellani
896fc0c2ce vkd3d-compiler: Exit the main function through a common code path. 2024-02-01 00:08:28 +01:00
Nikolay Sivov
9494b72224 vkd3d-shader: Add separate binary target type for effects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:48 +01:00
Henri Verbeet
0c33f82f72 Release 1.10. 2023-12-06 15:31:21 +01:00
Henri Verbeet
557b32a504 vkd3d-compiler: Introduce an option to specify the origin of fragment coordinates. 2023-11-09 21:14:14 +01:00
Henri Verbeet
375b3e0db3 vkd3d-compiler: Sort the options in the usage text. 2023-11-08 22:49:47 +01:00
Henri Verbeet
4c4843126e vkd3d-compiler: Slightly reword the --semantic-compat-map usage text. 2023-11-08 22:49:47 +01:00
Nikolay Sivov
c837f007e2 vkd3d-compiler: Dynamically allocate options array.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-19 23:03:25 +02:00
Nikolay Sivov
e242b46922 vkd3d-shader/tpf: Convert some of the semantic names to system values names when in compatibility mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-19 23:03:23 +02:00
Henri Verbeet
b63c853688 vkd3d-utils: Implement D3DGetBlobPart().
This was largely adapted from Wine's d3dcompiler_43, with some style
adjustments.
2023-10-18 20:58:22 +02:00
Henri Verbeet
90d4529f27 Release 1.9. 2023-09-21 19:16:32 +02:00
Nikolay Sivov
e71b2c0911 vkd3d-compiler: Add CLI option to specify default matrix packing order.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-07-24 22:41:10 +02:00
Conor McCarthy
8c7704bb78 vkd3d-compiler: Introduce a dxbc-dxil source type. 2023-06-28 21:40:36 +02:00
Henri Verbeet
771e442af1 Release 1.8. 2023-06-22 22:00:20 +02:00
Henri Verbeet
57d92a15cf Release 1.7. 2023-03-24 11:22:28 +01:00
Henri Verbeet
1eaf73147c Release 1.6. 2022-12-07 16:08:16 +01:00
Henri Verbeet
56b2f56b86 Release 1.5. 2022-09-21 16:47:49 +02:00
Henri Verbeet
9d4df5e704 Release 1.4.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-22 18:31:51 +02:00
Henri Verbeet
4093fe49bf vkd3d-compiler: Default to VKD3D_SHADER_SOURCE_HLSL when the source size is smaller than a uint32_t.
For example, when the input is an empty file. Leaving the source type as
VKD3D_SHADER_SOURCE_NONE would cause (potential) subsequent
get_source_type_info() calls to return NULL, resulting in a segmentation
fault.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-22 17:28:33 +02:00
Henri Verbeet
4728cf1286 include: Introduce a common macro for defining tags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-01 22:31:33 +01:00
Henri Verbeet
22b02ed59f vkd3d-shader: Introduce VKD3D_SHADER_COMPILE_OPTION_API_VERSION.
Analogous to vkd3d_api_version for libvkd3d.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-28 22:23:15 +01:00
Henri Verbeet
f5c4c06090 vkd3d-shader/hlsl: Respect the requested target type.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-28 22:23:13 +01:00
Giovanni Mascellani
9375950450 vkd3d-compiler: Properly forward argument validation failures.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-07 16:49:48 +01:00
Zebediah Figura
9fef9fe2bc vkd3d-compiler: Try to detect the source type by inspecting the file.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-06 11:34:02 +01:00
Zebediah Figura
47ea863535 vkd3d-compiler: Move some argument validation out of parse_command_line().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-06 11:33:57 +01:00
Zebediah Figura
1e2bcb0458 vkd3d-compiler: Print usage instructions only if --help is specified.
vkd3d-compiler is hardly the only program to print usage instructions on all
invalid invocations, but it's rather annoying to have one's whole screen wiped
due to a typo. It also makes it hard to notice the actual error messages printed
on e.g. `vkd3d-compiler -x`.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-06 11:33:41 +01:00
Henri Verbeet
f7662f9878 vkd3d-shader/sm1: Introduce a parser for the legacy D3D byte-code format.
This is largely derived from the parser in Wine/wined3d, as of wine-6.18.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 18:35:44 +02:00
Henri Verbeet
0de7a2eeb5 vkd3d-compiler: Default to monochrome output when NO_COLOUR/NO_COLOR is set.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:56:26 +02:00
Henri Verbeet
cc05e9c391 vkd3d-compiler: Mention the default target type in the help text for -b.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:56:24 +02:00
Henri Verbeet
0b293ceae7 vkd3d-compiler: Reference --print-target-types in the help text for -b.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:56:21 +02:00
Atharva Nimbalkar
0376a8b4ee vkd3d-shader: Implement VKD3D_SHADER_TARGET_GLSL.
Signed-off-by: Atharva Nimbalkar <atharvakn@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 23:16:52 +02:00
Matteo Bruni
abe7051e99 vkd3d-compiler: Update usage message for the -x option.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 20:54:30 +01:00
Matteo Bruni
5399f6fcc6 vkd3d-compiler: Set default source type before handling --print-target-types.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 20:54:25 +01:00
Matteo Bruni
9d6be9530b vkd3d-compiler: Require a profile specification when compiling HLSL sources.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 21:13:44 +01:00
Zebediah Figura
6d5fd68f1d vkd3d-compiler: Default to HLSL as a source format when preprocessing.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 20:00:29 +01:00
Zebediah Figura
10ab0ff124 vkd3d-compiler: Check whether the source format is binary when checking if the output is a tty, when preprocessing.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 20:00:26 +01:00