Commit Graph

337 Commits

Author SHA1 Message Date
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
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
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 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
Nikolay Sivov 7b6918f680 d3d10/effect: Use correct vertex shader element when returning input signature.
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-15 20:57:00 +02:00
Nikolay Sivov d515387005 d3d10/effect: Remove buffer type argument from object creation helper.
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-15 20:56:56 +02:00
Nikolay Sivov 69ae2cc7e7 d3d10/effect: Use SamplerState.Texture when setting shader resources.
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-15 20:56:53 +02:00
Nikolay Sivov c0e2138ed7 d3d10/effect: Use destination index when setting array property element.
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-15 20:56:42 +02:00
Nikolay Sivov 64df3c61a5 d3d10/effect: Pick up resources from elements when shader variable arrays are used.
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-15 20:56:39 +02:00
Nikolay Sivov 920afea8cd d3d10/effect: Add a helper to return array element.
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-15 20:56:36 +02:00
Nikolay Sivov f68f88e276 d3d10/effect: Remove unused arguments from shader resources helper.
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-15 20:56:33 +02:00
Nikolay Sivov 84eeeec433 d3d10/effect: Do not use internal value types.
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-15 20:56:20 +02:00