1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00
Commit Graph

581 Commits

Author SHA1 Message Date
Zebediah Figura
beb1bbb78c d3dcompiler/tests: Add more tests for SM4 constant packing.
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-09-01 18:40:12 +02:00
Zebediah Figura
23cc300372 d3dcompiler: Iterate through the instruction list in reverse in free_instr_list() (Valgrind).
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>
2020-08-10 21:27:41 +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
Paul Gofman
2acdde92e8 d3dcompiler/tests: Test bound resources' reflection for sm5.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-08-10 21:27:04 +02:00
Paul Gofman
d95920e8d6 d3dcompiler: Fail parsing reflection data for sm51 in versions below 47.
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-08-10 21:27:02 +02:00
Paul Gofman
85e0a09cce d3dcompiler: Parse register space and range id for sm51 in d3dcompiler_parse_rdef().
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-08-10 21:27:00 +02:00
Matteo Bruni
8928a41750 d3dcompiler: Don't link to dxguid or uuid.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 18:26:18 +02:00
Zebediah Figura
644dbf0644 d3dcompiler: Store the loop body directly in the hlsr_ir_loop structure.
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-07-08 07:50:03 +02:00
Zebediah Figura
0a9f2d8b0a d3dcompiler: Store the "then" and "else" instruction lists directly in the hlsl_ir_if structure.
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-07-08 07:49:56 +02:00
Zebediah Figura
2ccf1db285 d3dcompiler: Allow hlsl_ir_constant to contain only scalar and vector constants.
We only emit scalar constants at parse time, and while there's certainly an
advantage to vectorizing constant instructions, there's not much point in
having hlsl_ir_constant hold matrices. Matrices should be lowered to vector
operations first.

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-07-08 07:49:50 +02:00
Zebediah Figura
6bae008f55 d3dcompiler/tests: Check the reflection type of bool variables.
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-07-08 07:49:45 +02:00
Zebediah Figura
8bd5fe3001 d3dcompiler: Track def-use chains for anonymous nodes.
This is useful for replacing one instruction with another of a different type,
which is useful for some optimizations such as constant folding.

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-07-02 18:12:57 +02:00
Zebediah Figura
d60b126b24 d3dcompiler: Print the data type when dumping IR.
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-29 09:23:20 +02:00
Zebediah Figura
56be9dde92 d3dcompiler: Rename make_simple_assignment() to new_simple_assignment().
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-29 09:23:17 +02:00
Zebediah Figura
7260f978f3 d3dcompiler: Add the node to the instruction list in new_expr().
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-29 09:23:15 +02:00
Zebediah Figura
6083b1dd39 d3dcompiler: Create the expression in append_binop().
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-29 09:23:12 +02:00
Zebediah Figura
251c8546b5 d3dcompiler: Pass the instruction list to implicit_conversion().
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-23 10:11:17 +02:00
Zebediah Figura
9b3e6b1971 d3dcompiler: Add the assignment node to the instruction list in make_assignment().
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-23 10:11:14 +02:00
Zebediah Figura
95ef2fa578 d3dcompiler: Append the instruction to its list in new_return().
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-23 10:11:11 +02:00
Zebediah Figura
548f763f99 d3dcompiler: Pass an instruction list to the load creation 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>
2020-06-23 10:10:27 +02:00
Zebediah Figura
142be50629 d3dcompiler: Prepend static initializers to the function body.
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-23 10:10:21 +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
a9e720e54f d3dcompiler: Factor out hlsl_ir_var allocation.
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-17 17:32:08 +02:00
Zebediah Figura
610baeac56 d3dcompiler/tests: Add a simple test for global variable initializers.
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-17 17:32:06 +02:00
Zebediah Figura
549fa04cbd d3dcompiler/tests: Add a couple of extra tests for struct declaration syntax.
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-17 17:32:04 +02:00
Zebediah Figura
f26a58a61b d3dcompiler/tests: Add a test for struct field semantics.
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-17 17:32:02 +02:00
Matteo Bruni
2d79e04bfe d3dcompiler: Print float constants with more precision.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 17:16:26 +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
fdb3db5275 d3dcompiler: Check for missing return value semantics on the entry point.
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:03:05 +02:00
Zebediah Figura
d5486b6bb5 d3dcompiler: Allow hlsl_ir_constant to contain only numeric types.
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:03:03 +02:00
Zebediah Figura
d5a4364f44 d3dcompiler: Emit constructors as sequences of stores to a synthetic variable.
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:03:01 +02:00
Zebediah Figura
10601d9ac5 d3dcompiler: Cache vector types.
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:02:57 +02:00
Zebediah Figura
9c985e703b d3dcompiler: Use the cached scalar type in expr_common_type() where possible.
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:01:06 +02:00
Zebediah Figura
93f3b062fd d3dcompiler/tests: Add a test for struct assignment.
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-08 21:01:33 +02:00
Zebediah Figura
3b66245922 d3dcompiler: Use hlsl_report_message() where possible.
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-05 16:54:35 +02:00
Zebediah Figura
f114a0a8e6 d3dcompiler: Fix matrix dimension declaration for matrix<...> syntax.
Addendum to 4952bcfa4c.

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-05 16:54:35 +02:00
Zebediah Figura
1dcfb01b29 d3dcompiler: Coerce the RHS before unwrapping swizzles.
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-05 16:54:35 +02:00
Zebediah Figura
24a4f52bbf d3dcompiler: Remove a redundant check for writemasks on non-numeric types.
This can only happen if a swizzle is emitted on a non-numeric type, but this is
checked when emitting swizzles.

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-05 16:54:35 +02:00
Zebediah Figura
9ba2bb0f3b d3dcompiler: Fix up the swizzle data type when unwrapping it from the assignment LHS.
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-05 16:54:35 +02:00
Zebediah Figura
513f0def41 d3dcompiler: Write to the function return value using a separate instruction.
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-03 22:55:55 +02:00
Zebediah Figura
2b77cfb7be d3dcompiler: Also check the type class when checking for void.
As of 867fe22346, non-void types may have a base_type of HLSL_TYPE_VOID.

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-03 22:55:49 +02:00
Zebediah Figura
c7b90bf348 d3dcompiler: Pass the semantic and location parameters to new_func_decl().
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-03 22:55:40 +02:00
Zebediah Figura
5900f00148 d3dcompiler: Create assignment instructions more directly in struct_var_initializer().
In particular so that we can remove the need for creating a load instruction,
which besides being unnecessary was also never added to any instruction lists.

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-03 22:55:31 +02:00
Zebediah Figura
7fc0b9a6bd d3dcompiler: Don't add a record deref to the instruction list twice.
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-03 22:55:27 +02:00
Zebediah Figura
2449ff4b8f d3dcompiler: Store some builtin types in the hlsl_ctx structure.
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-03 22:55:18 +02:00
Zebediah Figura
09fcfe27ac d3dcompiler: Rename HLSL_IR_DEREF to HLSL_IR_LOAD.
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-01 22:10:28 +02:00
Zebediah Figura
323be6c515 d3dcompiler: Store derefs as an offset to a variable.
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-01 22:10:28 +02:00
Zebediah Figura
d46065d1f3 d3dcompiler: Do not store matrix and vector indexes as deref instructions.
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-05-19 21:32:46 +02:00
Zebediah Figura
0d9ddc4372 d3dcompiler: Synthesize a variable when indexing a non-deref node.
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-05-19 21:32:43 +02:00
Zebediah Figura
749e6be4d6 d3dcompiler: Synthesize a variable when subscripting a non-deref node.
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-05-19 21:32:41 +02:00
Zebediah Figura
2dc666c9df d3dcompiler: Add a helper to initialize the hlsl_ir_node structure.
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-05-01 22:03:16 +02:00
Zebediah Figura
d9db4beb3b d3dcompiler: Set the x-dimension for struct types.
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-04-30 21:01:11 +02:00
Zebediah Figura
c6c0601396 d3dcompiler: Set the dimensions for array types.
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-04-30 21:01:09 +02:00
Zebediah Figura
aa333c63fc d3dcompiler: Respect arrays in struct fields.
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-04-30 21:01:07 +02:00
Zebediah Figura
867fe22346 d3dcompiler: Set the struct base type to HLSL_TYPE_VOID.
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-04-30 21:01:05 +02:00
Zebediah Figura
4952bcfa4c d3dcompiler: Fix matrix dimension declaration and access.
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-04-30 21:01:02 +02:00
Zebediah Figura
53e6b328f6 d3dcompiler: Avoid using the lookahead token for location.
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>
2020-04-17 11:46:31 +02:00
Zebediah Figura
2573e698ff d3dcompiler: Make printed IR a bit more readable.
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>
2020-04-17 11:46:28 +02:00
Zebediah Figura
9f75e917cb d3dcompiler/tests: Add some tests for matrix majority.
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-04-14 11:19:08 +02:00
Zebediah Figura
5f18f9f75a d3dcompiler: Calculate the register size of types.
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-04-14 11:18:23 +02:00
Zebediah Figura
f82b44748a d3dcompiler: Always set the matrix majority for declaration types.
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-04-14 11:18:20 +02:00
Zebediah Figura
d05ee3674e d3dcompiler: Check for multiple matrix majority keywords on typedefs.
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-04-14 11:18:15 +02:00
Zebediah Figura
0340b0b044 d3dcompiler: Compute liveness ranges for anonymous nodes.
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-04-01 20:58:38 +02:00
Zebediah Figura
2738e5d2b8 d3dcompiler: Compute liveness ranges for variables.
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-04-01 20:58:36 +02:00
Zebediah Figura
443b0e3efd d3dcompiler: Index instructions for liveness ranges.
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-04-01 20:58:30 +02:00
Zebediah Figura
810d385b9e d3dcompiler: Move some declarations to bytecodewriter.c.
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-27 21:16:23 +01:00
Zebediah Figura
cbb4a86218 d3dcompiler: Introduce an array_reserve() helper.
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-27 21:16:23 +01:00
Zebediah Figura
5ba51ef26c d3dcompiler: Get rid of the "len" parameter to write_declarations().
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-27 21:16:23 +01:00
Zebediah Figura
e04d149de8 d3dcompiler: Get rid of the init_*_dx9_writer() helpers.
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-27 21:16:23 +01:00
Paul Gofman
2c8c06054e d3dcompiler: Use stricmp() instead of _strnicmp(..., -1).
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:12 +01:00
Zebediah Figura
8ea5b759ef d3dcompiler: Store a pointer to the bwriter_shader structure inside the bc_writer structure.
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-25 22:30:40 +01:00
Zebediah Figura
5a73777e32 d3dcompiler: Store the shader version using separate integer fields.
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 20:31:18 +01: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
Zebediah Figura
b52497c53f d3dcompiler: Get rid of the "dxversion" argument to create_writer().
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
Zebediah Figura
e0948524f2 d3dcompiler: Fix the location for a warning.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.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
Zebediah Figura
aaa625217b d3dcompiler: Ensure that the lhs of an assignment is reducible to a variable.
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-19 22:09:33 +01:00
Zebediah Figura
18b8393ff9 d3dcompiler/tests: Add more tests for swizzles.
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-19 22:09:33 +01:00
Zebediah Figura
8ea8eb20a4 d3dcompiler: Rename HLSL_MODIFIERS_COMPARISON_MASK to HLSL_MODIFIERS_MAJORITY_MASK and use it in more places.
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-19 22:09:32 +01:00
Zebediah Figura
f9ce3c7c7a d3dcompiler: Move modifer processing up out of the struct_spec rules.
So that storage classes will be stored in the relevant hlsl_ir_var instead of in
the type.

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-19 22:09:32 +01:00
Zebediah Figura
a82ec54862 d3dcompiler: Rename HLSL_MODIFIER_{IN, OUT} to HLSL_STORAGE_{IN, OUT}.
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-19 22:09:32 +01:00
Zebediah Figura
756ed811c7 d3dcompiler: Apply type modifiers to the hlsl_type.
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-13 20:09:30 +01:00
Zebediah Figura
afd3a1e388 d3dcompiler: Fail if modifiers are applied to a function.
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-13 20:09:30 +01:00
Zebediah Figura
eb4fc30463 d3dcompiler: Don't add the default matrix majority attribute to variables.
This is a type modifier, and thus does not make a lot of sense on a variable.

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-13 20:09:30 +01:00
Zebediah Figura
7f39f2bae0 d3dcompiler/tests: Add a test for SM4 constant buffers.
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-13 20:09:30 +01:00
Zebediah Figura
150aa98501 d3dcompiler/tests: Add some tests for d3d9 constant tables.
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-13 20:09:30 +01:00
Zebediah Figura
54387427b0 d3dcompiler: Separate out an hlsl_deref structure and store it in hlsl_ir_assignment directly.
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-12 21:18:19 +01:00
Zebediah Figura
bdbf0b43b7 d3dcompiler: Unwrap swizzles from the left-hand side of an assignment.
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-12 21:18:18 +01:00
Zebediah Figura
e886c03680 d3dcompiler/tests: Add more tests for swizzles.
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-12 21:18:18 +01:00
Zebediah Figura
49f64d05f3 d3dcompiler: Don't pass a writemask to make_assignment().
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-12 21:18:18 +01:00
Zebediah Figura
0e95c3faa2 d3dcompiler: Parse array types.
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-12 21:18:18 +01:00
Zebediah Figura
eb63713f60 d3dcompiler: Pass a struct source_location to create_loop().
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-06 22:47:35 +01:00
Zebediah Figura
55a3fb90d0 d3dcompiler: Pass a struct source_location to check_invalid_matrix_modifiers().
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-06 22:47:32 +01:00
Zebediah Figura
0d47e9bde4 d3dcompiler: Clarify error messages related to misplaced type modifiers.
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-06 22:47:30 +01:00
Zebediah Figura
3048fb9064 d3dcompiler: Pass a struct source_location to add_func_parameter().
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-06 22:47:27 +01:00
Zebediah Figura
eef3e3dacd d3dcompiler: Pass a struct source_location to hlsl_report_message().
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-06 22:47:25 +01:00
Zebediah Figura
77fe277a62 d3dcompiler: Return a struct source_location from set_location().
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-06 22:47:22 +01:00
Zebediah Figura
1947f7fb80 d3dcompiler: Don't set the node type for return instructions.
Essentially just because it doesn't make sense to do so; a return instruction
is not an expression usable as a source to other instructions.

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-03 14:20:26 +01:00
Zebediah Figura
09b2e42e92 d3dcompiler: Verify a returned value against the function's type and cast it if necessary.
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-03 14:20:25 +01:00
Zebediah Figura
60f78a1476 d3dcompiler: Check for implicit type compatibility in implicit_conversion().
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-03 14:20:25 +01:00
Zebediah Figura
e597b9e555 d3dcompiler: Parse return statements without a value.
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-03 14:20:25 +01:00
Zebediah Figura
8b08fec5e3 d3dcompiler/tests: Add some more tests for return statements.
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-03 14:20:25 +01:00
Zebediah Figura
1cea81d104 d3dcompiler/tests: Add a test for the comma operator.
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-02-28 16:39:02 +01:00
Zebediah Figura
8ce03e2055 d3dcompiler/tests: Port some tests to shader model 4.
In particular, port those for which there is an interesting difference in
code generation.

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-02-28 16:39:02 +01:00
Zebediah Figura
6f80956146 d3dcompiler/tests: Rewrite to use a separate d3d9 device for each test.
This brings the d3dcompiler tests more in line with existing d3d9 tests, and
allows potentially running the tests in parallel.

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-02-28 16:39:02 +01:00
Matteo Bruni
d09962a472 d3dcompiler: Get rid of now unused BWRITERVS_SWIZZLE_{SHIFT, MASK}.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-25 23:43:18 +01:00
Matteo Bruni
d4682017d6 d3dcompiler/tests: Make test_reflection_constant_buffer() work on d3d10.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 21:23:13 +01:00
Matteo Bruni
4e8ec8a6e0 d3dcompiler: Free variable definitions data on allocation errors.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 21:23:13 +01:00
Zebediah Figura
81a7da48b9 d3dcompiler: Get rid of the unused "subexpressions" field of struct hlsl_ir_expr.
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-02-16 20:48:33 +01:00
Zebediah Figura
0778e81787 d3dcompiler: Parse the comma operator.
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-02-16 20:48:30 +01:00
Zebediah Figura
efec4f90aa d3dcompiler: Handle loops in free_instr().
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-02-16 20:48:27 +01:00
Zebediah Figura
c5aa0feec7 d3dcompiler: Return an instruction list instead of a single instruction from nodes representing expressions.
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-02-16 20:48:22 +01:00
Zebediah Figura
1aa2beab73 d3dcompiler: Dump loops.
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-02-11 19:46:24 +01:00
Zebediah Figura
05182695f2 d3dcompiler: Use wine_dbg_printf() to dump HLSL IR.
So that we don't print function names.

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-02-11 19:46:21 +01:00
Zebediah Figura
e6f89bcb04 d3dcompiler: Dump flattened IR more accurately.
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-02-11 19:46:18 +01:00
Zebediah Figura
a43974a6d4 d3dcompiler: Store the swizzle unshifted.
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-02-11 19:45:57 +01:00
Matteo Bruni
d367c9aeff d3dcompiler/tests: Load the correct d3dcompiler DLL in the asm tests.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Matteo Bruni
20b52b61c6 d3dcompiler/tests: Load the correct d3dcompiler DLL in the HLSL tests.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Zebediah Figura
ae274b25e2 d3dcompiler/tests: Load d3dx9_36.dll dynamically.
Windows 7 Professional ships d3dcompiler_47 by default, but no version of d3dx9.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47894
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>
2020-01-03 20:58:18 +01:00
Matteo Bruni
276d970e07 d3dcompiler/tests: Fix parameter desc test on d3d10.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Sven Baars
e0143194c2 d3dcompiler/tests: Fix a copy-paste error.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:02:59 +01:00
Sven Baars
a63a98c388 d3dcompiler/tests: Fix some d3dcompiler_47 test failures on Windows 8.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 22:05:00 +01:00
Matteo Bruni
1559f6013c d3d10/tests: Add reflection test.
Share and reuse most of the d3dcompiler test.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 21:05:59 +01:00
Matteo Bruni
6889a0c3a0 d3dcompiler/tests: Clean up test_reflection_desc_ps_output() a bit.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 21:05:48 +01:00
Connor McAdams
44e65ebd7c d3dcompiler: Implement ID3D10ShaderReflectionConstantBuffer GetVariableByName() method.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 21:05:44 +01:00
Connor McAdams
a812c1a5ef d3dcompiler: Implement ID3D10ShaderReflectionConstantBuffer GetVariableByIndex() method.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 21:05:42 +01:00
Connor McAdams
c232519076 d3dcompiler: Implement ID3D10ShaderReflectionVariable GetType() method.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 21:05:40 +01:00
Connor McAdams
a3b6d5646d d3dcompiler: Implement ID3D10ShaderReflectionType.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 21:05:37 +01:00
Connor McAdams
98e240c6a6 d3dcompiler: Partially implement ID3D10ShaderReflectionVariable.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 17:31:46 +01:00
Connor McAdams
e5b2ee6fd8 d3dcompiler: Implement d3d10 GetConstantBufferByName().
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 17:31:44 +01:00
Connor McAdams
13a5a3cadc d3dcompiler: Implement d3d10 GetConstantBufferByIndex().
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 17:31:41 +01:00
Connor McAdams
14002a796d d3dcompiler: Partially implement ID3D10ShaderReflectionConstantBuffer.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 17:31:39 +01:00
Connor McAdams
6b6f8d5c2f d3dcompiler: Implement d3d10 reflection GetResourceBindingDesc() method.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 17:31:36 +01:00
Connor McAdams
d8ff297052 d3dcompiler: Implement d3d10 reflection Get{Input, Output}ParameterDesc() methods.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 17:31:33 +01:00
Matteo Bruni
27bf34bb51 d3dcompiler/tests: Add a small test for MinPrecision.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Matteo Bruni
f14962e55d d3dcompiler/tests: Add d3dcompiler_47 tests.
Share the code with the existing d3dcompiler_43 tests.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Matteo Bruni
9fd08dbff6 d3dcompiler: Fix a couple of failure return values in >= 46 D3DReflect().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 21:39:40 +01:00
Matteo Bruni
d6c6fc455d d3dcompiler: Initialize MinPrecision when it exists.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 21:39:40 +01:00
Matteo Bruni
4ed07d8586 d3dcompiler: Always expect D3D_COMPILER_VERSION to be defined.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 21:39:40 +01:00
Connor McAdams
5c708c857e d3dcompiler: Implement d3d10 reflection GetDesc() method.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 16:03:36 +01:00
Connor McAdams
0ffd0cab01 d3dcompiler: Init reflection data in D3D10ReflectShader().
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 16:03:34 +01:00
Connor McAdams
981403e50f d3dcompiler: Move d3d10 reflection stubs into d3dcompiler.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 16:03:31 +01:00
Zebediah Figura
bf31a900d1 d3dcompiler: Get rid of the "node" field from struct hlsl_ir_var.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-14 17:41:01 +02:00
Zebediah Figura
32fd9ff479 d3dcompiler: Get rid of the "node" field from struct hlsl_ir_function_decl.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-14 17:41:01 +02:00
Zebediah Figura
cf5ccf29a9 d3dcompiler: Introduce a new_binary_expr() helper.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 01:26:41 +02:00
Zebediah Figura
b899965615 d3dcompiler: Introduce a new_unary_expr() helper.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 01:26:41 +02:00
Zebediah Figura
b89f027bc1 d3dcompiler: Use new_cast() in implicit_conversion().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 01:26:41 +02:00
Zebediah Figura
fbc9ff506c d3dcompiler: Parse initializer lists using a variable-size array.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 01:26:41 +02:00
Zebediah Figura
cfa7f3a3f5 d3dcompiler: Use the documented YYABORT macro.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 01:26:41 +02:00
Matteo Bruni
5e8ded1646 d3dcompiler/tests: Trace the test index in test_fail() checks.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 20:38:46 +02:00