Commit Graph

36 Commits

Author SHA1 Message Date
Henri Verbeet f08342f573 wined3d: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 09:06:58 +01:00
Henri Verbeet 7840485ac2 wined3d: Validate the SM4 token count (AFL).
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 08:44:12 +01:00
Henri Verbeet 12f5887a23 wined3d: Parse the shader version in shader_sm4_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 08:44:10 +01:00
Józef Kucia 8756369803 wined3d: Recognize dynamic linking shader instructions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-08 13:54:14 +01:00
Józef Kucia 8d48454a36 wined3d: Clean up SM1 frontend.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-25 22:05:04 +09:00
Józef Kucia 3ab205ef94 wined3d: Ignore flags for conditional SM 1-3 instructions explicitly.
This is to make sure that a regression is not introduced when the SM4+
_nz/_z modifiers are implemented for these instructions.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-25 22:04:58 +09:00
Henri Verbeet 597c4d52cc wined3d: Get rid of the redundant "output_signature" parameter to shader_set_function().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 16:19:04 +09:00
Józef Kucia 31713e39b5 wined3d: Recognize aoffimmi shader instruction modifier.
The aoffimmi stands for address offset by immediate integer.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-09 22:16:46 +09:00
Henri Verbeet e5719e9899 wined3d: Use a wined3d_string_buffer to dump the intermediate shader code.
Instead of abusing TRACE. There's probably still some room for improvement.
There may also be value in dumping things in a format that's compatible with
D3D shader assembly, but I don't think it's a priority.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-13 13:21:53 +09:00
Józef Kucia 7561f34381 wined3d: Clean up naming in shader_sm1.c.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-01 23:18:27 +09:00
Henri Verbeet 2773b27bb1 wined3d: Use unsigned mask constants in shifts. 2015-08-26 23:53:22 +09:00
Henri Verbeet 3aa9fe6bef wined3d: Record the data type of shader resources. 2014-12-03 11:14:25 +01:00
Henri Verbeet f5cef43738 wined3d: Store resource types instead of sampler types in struct wined3d_shader_reg_maps.
The difference doesn't really matter for SM1-3 since resources and samplers
are always tied together, but in SM4 they're separate.
2014-12-03 11:14:21 +01:00
Michael Stefaniuc 50a9fb579c wined3d: Remove ERR() on HeapAlloc failure for small sizes known at compile time. 2013-02-06 09:04:41 +01:00
Henri Verbeet db3bdb0a76 wined3d: Also read comments in shader_sm1_is_end(). 2012-10-22 11:43:59 +02:00
Henri Verbeet 311a1e0148 wined3d: Handle SM1 comments in the frontend. 2012-10-15 13:31:08 +02:00
Henri Verbeet 5626e165ff wined3d: Introduce a structure for shader register indices. 2012-10-15 13:31:07 +02:00
Henri Verbeet 0a17173bc2 wined3d: Introduce a union for declaration shader instruction arguments. 2012-09-17 12:28:20 +02:00
Henri Verbeet ac5c420c91 wined3d: Add type information to shader registers. 2012-09-05 11:47:59 +02:00
Henri Verbeet 42582ada00 wined3d: Read complete shader instructions at a time. 2012-09-05 11:47:55 +02:00
Henri Verbeet eefb45f333 wined3d: Properly report shader comment sizes. 2010-02-23 12:06:54 +01:00
Henri Verbeet de82b55b20 wined3d: Refuse to parse shaders with an invalid version token. 2009-10-26 11:20:39 +01:00
Henri Verbeet 92d22ce535 wined3d: Move the SM1 opcode enum to shader_sm1.c. 2009-10-06 12:02:52 +02:00
Stefan Dösinger dc45657f2c wined3d: Fix vs_2_0 sgn.
vs_2_0's sgn has two extra parameters - temporary registers for the
instruction. This patch fixes the crash of the d3d9:visual test on windows and
properly handles the vs_2_0 version of sgn.
2009-10-02 12:36:59 +02:00
Henri Verbeet c4f8845bc9 wined3d: Recognize SM4 arrays.
This is for SM4 constant buffers, which look like cb<x>[<y>]. At some later
point we should probably translate pre-SM4 constants to constant buffers.
2009-07-16 16:03:23 +02:00
Henri Verbeet 9a579a43b1 wined3d: Use the output signature to map SM4 pixel shader outputs to the appropriate register. 2009-05-11 12:43:00 +02:00
Henri Verbeet 5e473cb17f wined3d: Group register information into struct wined3d_shader_register. 2009-05-08 12:13:17 +02:00
Henri Verbeet 65622a052c wined3d: Create a struct wined3d_shader_version to store version information.
The version tokens in SM1-3 and SM4 are similar, but not the same.
2009-05-07 14:44:21 +02:00
Henri Verbeet 5c63d93e18 wined3d: Store the shader version in the frontend's private data. 2009-05-07 14:44:21 +02:00
Henri Verbeet 699eae0cf7 wined3d: Shift the writemask in the frontend. 2009-05-06 12:20:57 +02:00
Henri Verbeet 454dd2ed07 wined3d: Implement shader_sm4_is_end(). 2009-05-05 11:34:39 +02:00
Henri Verbeet 2a5a6a3439 wined3d: Store the SM 1-3 opcode information tables in the SM 1-3 frontend. 2009-05-05 11:34:28 +02:00
Henri Verbeet 868f5bfc7c wined3d: Handle reading the shader header in the frontend.
In SM 1-3 this is just the version, in SM4 this also includes the token count.
2009-05-05 11:34:15 +02:00
Henri Verbeet 5f96c0083a wined3d: Add a frontend function to determine if there are any tokens left. 2009-05-04 12:53:12 +02:00
Henri Verbeet 2378108eb9 wined3d: Create a frontend for parsing shaders. 2009-05-04 12:53:08 +02:00
Henri Verbeet 5a7afd9b2a wined3d: Move SM 1-3 parsing functions to their own file. 2009-05-04 12:53:04 +02:00