Commit graph

59 commits

Author SHA1 Message Date
Henri Verbeet b8fe76a8b5 d3dcompiler: Store DXBC sections as vkd3d_shader_dxbc_section_desc structures. 2023-04-18 10:18:48 +02:00
Nikolay Sivov 699b52dc46 d3dcompiler: Fix bytecode buffer leaks in D3DCompile2(). 2023-03-22 09:41:20 +01:00
Nikolay Sivov 929615fa13 d3dcompiler: Always free messages string in D3DCompile2(). 2023-03-22 09:41:20 +01:00
Nikolay Sivov 5231c8c8bb d3dcompiler: Allow D3DCompile2() to succeed with null output shader blob pointer. 2023-03-22 09:41:19 +01:00
Nikolay Sivov 472d802a24 d3dcompiler: Always initialize output shader blob pointer in D3DCompile2(). 2023-03-22 09:41:18 +01:00
Nikolay Sivov 7bf58c895c d3dcompiler: Implement D3DDisassemble() using vkd3d-shader.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46649
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-30 15:38:26 +01:00
Zebediah Figura 7926253d82 d3dcompiler: Print message output with ERR() in D3DPreprocess(). 2022-11-17 21:50:39 +01:00
Zebediah Figura cee21cf3b8 d3dcompiler: Print message output with ERR() in D3DCompile2(). 2022-11-17 21:50:39 +01:00
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
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 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
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 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 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
Jactry Zeng ca301488dc d3dcompiler: Implement D3DCompileFromFile().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 21:27:36 +02:00
Jactry Zeng 87f51f2f75 d3dcompiler: Add D3D_COMPILE_STANDARD_FILE_INCLUDE support for D3DCompile2().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 21:27:26 +02:00
Matteo Bruni 7d92b1abbd d3dcompiler: Check shader for NULL.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 17:44:32 +02:00
Zebediah Figura 24c84947c8 d3dcompiler: Return an HRESULT from parse_hlsl().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 22:07:47 +02:00
Zebediah Figura 45aa147945 d3dcompiler: Get rid of the "dxversion" argument to SlWriteBytecode().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Alexandre Julliard 43df1ed406 d3dcompiler: Make varargs functions WINAPIV.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47473
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-07 08:02:55 +02:00
Alexandre Julliard c8d34ef088 d3dcompiler: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 14:59:40 +02:00
Alexandre Julliard 011b2eca46 d3dcompiler: Copy the C preprocessor source into d3dcompiler_43.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 13:33:08 +02:00
Michael Stefaniuc c91a00ce61 d3dcompiler: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:39:39 +02:00
Alistair Leslie-Hughes 5fb90db781 d3dcompiler: Add D3DLoadModule stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-04 01:03:29 +09:00
Józef Kucia c9df3cd980 d3dcompiler: Avoid '\n' in middle of TRACE() messages.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-28 16:26:51 +09:00
Sebastian Lackner e0a9ea6c68 d3dcompiler: Implement semi-stub for D3DCompile2. 2015-08-17 14:40:09 +09:00
Alistair Leslie-Hughes 1a0fc895f1 d3dcompiler: Add D3DCompileFromFile, D3DCompile2 stubs. 2015-08-17 14:40:01 +09:00
Matteo Bruni 342eec7f7d d3dcompiler/tests: Add a couple more checks for parent data values. 2014-06-25 11:36:21 +02:00
Henri Verbeet 1046aa6e48 d3dcompiler: Avoid LPCVOID. 2013-09-05 13:18:24 +02:00
Matteo Bruni 3f221611f0 d3dcompiler: Skip search of the parent include for the initial file. 2013-09-03 16:58:32 +02:00
Christian Costa af59f19461 d3dcompiler: Add trace to D3DPreprocess. 2013-05-13 11:08:43 +02:00
Christian Costa 6e77816301 d3dcompiler: Add a LUT to find compilation targets info. 2013-05-13 11:08:36 +02:00
Christian Costa 896ff53774 d3dcompiler_43: Turn FIXME into TRACE as D3DCompiler is no longer a stub. 2013-04-26 16:28:07 +02:00
Michael Stefaniuc 536bdfde27 d3dcompiler_43: Remove ERR() on HeapAlloc failure for small sizes known at compile time. 2013-02-08 10:44:36 +01:00
Matteo Bruni 5e66599737 d3dcompiler: Add a trace to D3DAssemble. 2012-10-11 21:24:34 +02:00
Matteo Bruni caf6fe0588 d3dcompiler: Stub D3DDisassemble. 2012-09-17 18:32:05 +02:00
Matteo Bruni 3d052768ab d3dcompiler: Pass the shader filename to the preprocessor. 2012-07-11 11:17:49 -05:00
Matteo Bruni b33e1ceaf2 d3dcompiler: Properly print compilation messages. 2012-07-11 11:17:35 -05:00
Matteo Bruni 45e8a644eb d3dcompiler: Parse compilation target. 2012-07-10 11:00:58 -05:00
Matteo Bruni 29ba39face d3dcompiler: Carry around both shader major and minor version. 2012-07-10 11:00:53 -05:00
Matteo Bruni 80034de243 wpp: Explicitly pass include type to the lookup callback function.
Also, always pass the parent name to the callback, d3dcompiler needs
that information.
2012-06-13 21:35:39 +02:00
Matteo Bruni 8b0d3d9f9a wpp: Invert 'type' callback parameter value, to match comment. 2012-06-13 21:35:38 +02:00
Matteo Bruni a8839cd1de d3dcompiler: Dump preprocessed shader sources. 2012-06-07 10:32:23 +02:00
Matteo Bruni 949de2e520 d3dcompiler: Add a stub parser. 2012-05-16 16:46:06 +02:00
Matteo Bruni 14ec785fc3 d3dcompiler: Partially implement D3DCompile function. 2012-05-16 16:44:47 +02:00
Matteo Bruni ddab7fcda9 d3dcompiler: Make SlWriteBytecode return the shader size. 2012-05-16 16:44:35 +02:00
Dan Kegel b732d428de d3dcompiler_43: Don't crash on long TRACE(). 2011-07-05 14:40:19 +02:00