Commit Graph

148 Commits

Author SHA1 Message Date
1c43b7b55c vkd3d-shader/fx: Add support for parsing fx_2_0 annotations.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2025-03-05 14:02:09 +01:00
db7c22d9d6 vkd3d-shader/fx: Parse technique and pass blocks for fx_2_0.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2025-03-05 14:01:53 +01:00
9f09ac6893 vkd3d-shader/fx: Fix condition when printing literal constant arguments.
To reproduce:

float4 v;

SamplerState s
{
    BorderColor = 0.1 + v*0.2;
};

Expression should use more than one literal constant,
as a scalar in operation that involves a vector.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2025-03-03 17:54:17 +01:00
e746a4c12f vkd3d-shader/fx: Improve state object nesting for the fx -> text output.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2025-02-24 16:19:07 +01:00
09226543fe vkd3d-shader/fx: Implement parsing complex value and index expressions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2025-02-24 16:19:07 +01:00
58aed8fd0d vkd3d-shader/fx: Use vkd3d_string_buffer_print_f32() in parse_fx_4_numeric_value().
Instead of "%f". vkd3d_string_buffer_print_f32() will use sufficient
precision to represent the stored value exactly, and will use '.' as
decimal separator regardless of the current locale.
2025-02-24 16:19:07 +01:00
985d317e0e Release 1.15. 2025-02-19 12:00:00 +01:00
29bac62ba2 vkd3d-shader/hlsl: Move the "dimx" and "dimy" fields to the type-specific union. 2025-01-10 19:38:13 +01:00
3a6bf3be24 vkd3d-shader/hlsl: Lower separated samplers for SM1.
The combined sampler is created as a SAMPLER instead of a TEXTURE
because that fits all our current infrastructure. The only problem is
that in the CTAB it must appear as a Texture, so the new field
hlsl_type.is_combined_sampler is added.

Co-authored-by: Elizabeth Figura <zfigura@codeweavers.com>
2024-12-10 15:51:43 +01:00
b314a9eb84 vkd3d-shader/fx: Remove newlines from the parser error messages.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-11-23 23:24:05 +01:00
3784919213 vkd3d-shader/fx: Implement parsing inline shader blobs.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-11-23 23:21:39 +01:00
1a6409cd5b vkd3d-shader/hlsl: Add parser support for stream-output object types.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-11-21 19:28:46 +01:00
5c00766eff Release 1.14. 2024-11-21 12:35:55 +01:00
21681489ed vkd3d-shader/fx: Implement parsing states objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-11-13 16:15:09 +01:00
9af17d4a9d vkd3d-shader/fx: Implement parsing the remaining fx_5_0 object types.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-11-06 22:14:03 +01:00
3681b83fb4 vkd3d-shader/fx: Fix checking for a GS with stream output. 2024-11-04 15:29:39 +01:00
ad2208b726 vkd3d-shader/fx: Implement parsing shader resources types.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-29 14:52:39 +01:00
1a8e9ff94e vkd3d-shader/fx: Implement parsing shader objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-29 14:41:55 +01:00
5883e01032 vkd3d-shader/fx: Remove an unnecessary hlsl_is_numeric_type().
Constants can only be numeric.
2024-10-28 18:01:06 +01:00
8a3fe9cd1e vkd3d-shader/fx: Implement parsing groups and techniques.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-21 18:23:33 +02:00
071130b944 vkd3d-shader/fx: Add support for tracing annotations.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-17 17:32:54 +02:00
35d2df14d8 vkd3d-shader/fx: Add support for tracing string variables.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-14 15:40:46 +02:00
907b6705fe vkd3d-shader/fx: Add support for parsing constant buffer elements.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-14 15:40:14 +02:00
6801ad9b7a vkd3d-shader/fx: Introduce a parser/disassembler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-14 15:20:41 +02:00
79aa75e98f vkd3d-shader/fx: Implement writing fx_2_0 object initializer data sections.
Object data is used for strings, textures, and shaders. Samplers are handled separately.
The section is a contigious stream of <id><size><object-data>, size field is used
to advance to the next <id> position.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-02 22:17:41 +02:00