Commit Graph

460 Commits

Author SHA1 Message Date
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 0587b0eb9c d3d10: Use read_u32() implementation from d3dcompiler.
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 b5d610ca37 d3d10: 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
Matteo Bruni 812ab92877 d3d10: Get rid of a comment.
It's become more confusing than helpful I feel like.

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 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
Henri Verbeet 2afd69d156 d3d10: Store the type fields in parse_fx10_type() as uint32_t.
In particular, d3d10_variable_type() takes an integer flags pointer.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Henri Verbeet ee01c2022f d3d10: Return the read value from read_dword().
This makes it consistent with d3dcompiler after commit
e6961f6e16.

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 61d5e8fd1c d3d10/tests: Add a test with fx_4_1 binary.
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:11:41 +01:00
Fabian Maurer e2d7f37814 d3d10/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:35 +01:00
Nikolay Sivov f0cb616fd9 d3d10/effect: Fix index access in GetBlendState().
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-25 13:31:17 +01:00
Nikolay Sivov bf89b610d3 d3d10/effect: Fix index access in GetDepthStencilState().
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-25 13:31:11 +01:00
Nikolay Sivov 2149beff79 d3d10/effect: Fix index access in GetRasterizerState().
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-25 13:31:08 +01:00
Nikolay Sivov 9fc481c3e2 d3d10/effect: Fix index access in GetSampler().
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-25 13:31:06 +01:00
Nikolay Sivov 3ec149232c d3d10/effect: Fix iteration in GetBackingStore() for rasterizer states.
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-25 13:31:02 +01:00
Nikolay Sivov 5639edd26e d3d10/effect: Fix iteration in GetBackingStore() for depth stencil states.
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-25 13:30:57 +01:00
Nikolay Sivov 50830170eb d3d10/effect: Fix iteration in GetBackingStore() for blend states.
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-20 18:16:27 +01:00
Nikolay Sivov 1f7b3283aa d3d10/effect: Fix iteration in GetBackingStore() for sampler states.
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-20 18:16:18 +01:00
Nikolay Sivov 2c665f79a7 d3d10/effect: Store state variables references in their own arrays.
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-20 18:16:13 +01:00
Nikolay Sivov a6f027fe2c d3d10/effect: Add arrays for all state variables.
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-20 18:16:08 +01:00
Nikolay Sivov 62b367fb65 d3d10/effect: Add a structure to keep shader variables references.
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-20 18:15:59 +01:00
André Zwing 867e329323 d3d10: Fix D3D10CompileEffectFromMemory spec file entry.
Signed-off-by: André Zwing <nerv@dawncrow.de>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-13 17:16:41 +01:00
Alex Henrie e17ad3d6cb d3d10/tests: Increase size of array expected_i_a in test_scalar_array_methods (cppcheck).
This array is accessed at index 5 on line 5138.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-10 11:25:49 +01:00
Matteo Bruni 921bade0da d3d10/effect: Validate preshader blob size for index expressions.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:18 +01:00
Nikolay Sivov 27584c1449 d3d10/effect: Use first element when index expression evaluates to out of bounds value.
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-12-02 20:21:00 +01:00
Nikolay Sivov 16e6be0047 d3d10/effect: Handle vector arguments in expression instructions.
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-11-23 21:02:13 +01:00
Nikolay Sivov 0f95263086 d3d10/effect: Parse through value expressions.
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-11-23 21:02:13 +01:00
Nikolay Sivov 2fd283e968 d3d10/effect: Fix freed register table pointer (Coverity).
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-11-23 13:41:15 +01:00
Nikolay Sivov 44664237c9 d3d10/effect: Fix a trace message.
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-11-19 18:31:38 +01:00
Nikolay Sivov a4fe643920 d3d10/effect: Add initial support for indexing expressions.
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-11-15 21:48:35 +01:00
Nikolay Sivov 15a3da17a7 d3d10/effect: Implement numeric pass properties updates.
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-11-02 21:53:30 +01:00
Nikolay Sivov 6e8c2921c1 d3d10/effect: Add a helper to read raw variable values.
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-11-02 21:53:30 +01:00
Nikolay Sivov b94242622f d3d10/effect: Add a helper to read numeric values.
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-11-02 21:53:30 +01:00
Nikolay Sivov 75eee80705 d3d10/effect: Handle NULL blend state assignments.
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-11-02 21:53:30 +01:00
Nikolay Sivov 62ae5db722 d3d10/effect: Handle NULL depth stencil state assignments.
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-11-02 21:53:30 +01:00
Nikolay Sivov 150796cc07 d3d10/effect: Handle D3D10_SVT_UINT type when returning numeric values.
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-11-02 21:53:30 +01:00
Nikolay Sivov 3d5f8b9869 d3d10/effect: Reduce duplication when releasing shader objects.
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-10-29 21:22:46 +02:00
Nikolay Sivov 166babb2d1 d3d10/effect: Get rid of interface pointer casts in IsValid().
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-10-29 21:22:44 +02:00
Nikolay Sivov e81ad39d87 d3d10/effect: Remove a cast in IsValid() for SRV variables.
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-10-29 21:22:13 +02:00
Nikolay Sivov 000767f92d d3d10/effect: Implement SetRawValue().
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-10-27 11:36:47 +02:00
Nikolay Sivov 3f598171be d3d10/effect: Implement GetRawValue().
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-10-27 11:36:45 +02:00
Nikolay Sivov 6839d8cba3 d3d10/effect: Implement default values handling.
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-10-27 11:36:43 +02:00
Nikolay Sivov 3a975ebcd7 d3d10/tests: Extend default values test.
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-10-27 11:36:40 +02:00
Nikolay Sivov cfd93716ef d3d10/effect: Remove interface vs implementation pointer comparsion in buffer variable's IsValid().
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-10-27 11:36:38 +02:00
Nikolay Sivov 48759a68bb d3d10/effect: Implement GetConstantBuffer().
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-10-27 11:36:36 +02:00
Matteo Bruni 5b9407db48 d3d10/effect: Create variable buffer before parsing buffer members.
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-10-27 11:36:33 +02:00
Nikolay Sivov 74e007175f d3d10/effect: Use data_size of the variable as buffer size.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-27 11:36:30 +02:00
Nikolay Sivov 59b01089a2 d3d10/effect: Fix buffer offsets for members and array elements.
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-10-27 11:36:28 +02:00
Nikolay Sivov c702e19903 d3d10/effect: Return when effect creation fails.
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-10-27 11:36:25 +02:00