Commit Graph

436 Commits

Author SHA1 Message Date
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
Nikolay Sivov 7c7a14bfc2 d3d10/tests: Use IsValid() instead of null checks.
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:05 +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
Nikolay Sivov 1bc3ca71d6 d3d10/effect: Get rid of linear search for property information.
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-13 21:57:11 +02:00
Nikolay Sivov 1050e6c60f d3d10/effect: Consolidate state objects and passes property information.
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-13 21:57:11 +02:00
Nikolay Sivov 99376ade2a d3d10/effect: Add support for constant index and anonymous shader values in assignment parsing 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-13 21:57:11 +02:00
Nikolay Sivov e37f781cc2 d3d10/effect: Handle static variable assignments for object fields in state 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-13 21:57:11 +02:00
Nikolay Sivov ab5b335c13 d3d10/effect: Use separate structure for annotations array.
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-13 21:57:11 +02:00
Nikolay Sivov b56ed5f03f d3d10/tests: Add some tests for annotations.
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-13 21:57:11 +02:00
Nikolay Sivov 63ee26f298 d3d10/effect: Use shader variable directly from pass structure on Apply().
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-13 21:57:11 +02:00
Nikolay Sivov e893e6e27b d3d10/effect: Set state block masks for 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>
2021-10-07 21:22:32 +02:00
Nikolay Sivov 47350f363a d3d10/effect: Explicitly store blend state variable.
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-07 21:22:29 +02:00
Nikolay Sivov e42720a6d8 d3d10/effect: Explicitly store depth stencil state variable.
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-07 21:22:27 +02:00
Nikolay Sivov 0c5c8fd84d d3d10/effect: Explicitly store rasterizer state variable.
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-07 21:22:24 +02:00
Nikolay Sivov 87fb9fe721 d3d10: Fix up D3D10_DST_* names.
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-07 21:22:21 +02:00
Nikolay Sivov c85e46b102 d3d10/effect: Set shader masks in ComputeStateBlockMask() for passes.
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-07 21:22:18 +02:00
Nikolay Sivov a3942ae20e d3d10/effect: Use effect variable pointers to store per-pass 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-07 21:22:15 +02:00
Nikolay Sivov 955071291c d3d10/effect: Handle NULL initializer for SamplerState.Texture field.
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-05 11:31:47 +02:00