Commit Graph

536 Commits

Author SHA1 Message Date
Matteo Bruni 9400874e3c d3dcompiler: Always use vkd3d-shader's preprocessor.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:21:47 +02:00
Matteo Bruni 8a7651fd36 d3dcompiler: Set initial_filename in D3DCompile2().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:21:47 +02:00
Matteo Bruni c36a25897c d3d10: Do not accept any compute shader in D3D10ReflectShader().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-23 18:42:13 +01:00
Paul Gofman af45477392 d3dcompiler: Allow cs5.1 shaders on earlier d3dcompiler versions.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-23 18:42:13 +01:00
Paul Gofman 47b9c450c6 d3dcompiler: Implement d3dcompiler_shader_reflection_GetThreadGroupSize().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-23 18:42:13 +01:00
Zebediah Figura 6a062afb75 d3dcompiler: Implement D3DCompile2() using vkd3d_shader_compile().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51713
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 22:54:11 +01:00
Matteo Bruni b05c797a69 d3dcompiler/tests: Use hexadecimal constants in a few ok() checks.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 18:59:08 +01:00
Zebediah Figura a23192f338 d3d10: Do not define D3DReflect().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 18:59:06 +01:00
Zebediah Figura 2198235cf1 d3dcompiler: Use a single definition for both d3d10 and d3d11 reflection interfaces.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 18:59:03 +01:00
Zebediah Figura a27dfbe759 d3d10/tests: Add tests for Direct3D 10 shader reflection interfaces.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 18:58:55 +01:00
Matteo Bruni a149fd4a56 d3dcompiler: Move skip_u32_unknown() declaration to utils.h.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:44:55 +01:00
Matteo Bruni 8c29458630 d3dcompiler: Move read_u32() to a new utils.h private header.
To be able to use it from d3d10 via PARENTSRC.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:44:55 +01:00
Matteo Bruni c4273f0bbe d3dcompiler: Use more consistent integer data types.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:44:55 +01:00
Eric Pouech 576cdea0d7 d3dcompiler: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Eric Pouech 96b08eaecb d3d10: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Eric Pouech 58d20aae37 d3dcompiler/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Eric Pouech 7bba86db28 d3d10/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Nikolay Sivov d12d6b2978 d3dcompiler: Implement D3DWriteBlobToFile().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 11:10:27 +01:00
Matteo Bruni edd9d23ee1 d3dcompiler/tests: Use the relevant d3dcompiler version in blob tests.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 11:10:25 +01:00
Fabian Maurer cd7b14f1ae d3dcompiler/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:39 +01:00
Alexandre Julliard f4af3134de makefiles: Specify the bison prefix directly in the source files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 13:15:12 +01:00
Alexandre Julliard bb2d48627d d3dcompiler: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-22 11:11:28 +02:00
Matteo Bruni ae1f9899bb d3dcompiler/tests: Also accept broken HRESULT with d3dcompiler_46.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02:00
Alexandre Julliard 088a787a2c makefiles: Make -mno-cygwin the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Zebediah Figura 0ef10854c8 d3dcompiler/tests: Test include preprocessing with more functions.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-08 17:27:33 +02:00
Matteo Bruni 450d435306 d3dcompiler: Clear preprocessor lexer state after running it.
Otherwise state might leak to the next preprocessed shader.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-08 17:27:33 +02:00
Zebediah Figura 72d6654c73 d3dcompiler: Handle D3D_COMPILE_STANDARD_FILE_INCLUDE in preprocess_shader().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-08 17:27:33 +02:00
Zebediah Figura e44bd0e03f d3dcompiler_46/tests: Enable tests.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-08 17:27:32 +02:00
Zebediah Figura 910a398b72 d3dcompiler/tests: Link directly to the relevant d3dcompiler version.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-08 17:27:32 +02:00
Zebediah Figura 93a4c58897 d3dcompiler/tests: Test including an absolute path.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Zebediah Figura 85fa778f93 d3dcompiler: Rip out the HLSL compiler.
The compiler is completely non-functional as-is, and lives in libvkd3d-shader
now. When a vkd3d release is made d3dcompiler will access it via the
libvkd3d-shader public API. Accordingly there's no reason to keep it around in
wine's d3dcompiler.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 18:06:30 +02:00
Nikolay Sivov 0861b5447f d3dcompiler/tests: Add a D3DDisassemble() test with sm2 shader.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 18:06:30 +02:00
Matteo Bruni 6b58d34a62 d3dcompiler/tests: Ignore z, w components in test_struct_semantics().
Only the first two components are explicitly set from the vertex
attribute data.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51304
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 23:07:15 +02:00
Nikolay Sivov 741c73d137 d3dcompiler: Improve D3D11_SHADER_DESC returned by reflection interface.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 23:00:50 +02:00
Nikolay Sivov ff98978836 d3dcompiler: Improve d3d10_shader_reflection_GetDesc() to return missing stats.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 23:00:50 +02:00
Matteo Bruni 749da353c9 d3dcompiler: Fix typo in struct d3dcompiler_shader_reflection.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-01 18:18:17 +02:00
Jacek Caban e6961f6e16 d3dcompiler: Use return value in read_dword.
Fixes warnings like on clang with MSVC target, where enums may be signed:
dlls/d3dcompiler_43/reflection.c:1160:22: warning: passing
'D3D_PRIMITIVE *' (aka 'enum D3D_PRIMITIVE *') to parameter of type
'DWORD *' (aka 'unsigned int *') converts between pointers to integer
types with different sign [-Wpointer-sign]

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 21:05:42 +02:00
Zebediah Figura e5c50f5661 d3dcompiler/tests: Use winetest_push_context().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 18:14:07 +02:00
Alexandre Julliard 0b22f87be6 d3dcompiler: Use --prefer-native instead of DLL_WINE_PREATTACH.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 12:09:06 +01:00
Zebediah Figura 464b2dc661 d3dcompiler/tests: Avoid initializing nameless unions in designated initializers.
Old versions of gcc can't handle this.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50397
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-26 12:46:07 +01:00
Sven Baars 9f9fec1879 d3dcompiler: Fix a leak on error path (Coverity).
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 20:42:11 +02:00
Matteo Bruni 4ced409adb d3dcompiler/tests: Always expect failure in test_reflection_desc_ps_output() on d3d10.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49950
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 11:33:05 +02:00
Francois Gouget 65013aae29 d3dcompiler_43/tests: Fix the spelling of a couple of ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 12:17:42 +02:00
Paul Gofman 1690b6b475 d3dcompiler/tests: Test d3d12 interface in test_reflection_bound_resources().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-10 22:06:35 +02:00
Paul Gofman 56aeb4591b d3dcompiler: Fill texture fields in D3D11_SHADER_VARIABLE_DESC with default values.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 11:15:48 +02:00
Paul Gofman e92adb98be d3dcompiler/tests: Test d3d12 interface in test_reflection_constant_buffer().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 11:15:48 +02:00
Paul Gofman e7a499f8ef d3dcompiler: Set range id to bind point for sm < 5.1.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 11:08:32 +02:00
Paul Gofman e446aee652 d3dcompiler/tests: Test d3d12 interface in test_reflection_desc_vs().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 11:08:30 +02:00
Paul Gofman 97c4725237 d3dcompiler/tests: Add test for reflection interfaces.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 11:08:28 +02:00