Henri Verbeet
a6fda3e65d
vkd3d-shader/fx: Output error messages for invalid sizes.
2025-03-06 17:19:28 +01:00
Elizabeth Figura
18ca7affad
vkd3d-shader/hlsl: Make min16uint into a first-class type.
...
And properly implement translation into some binary enumerations.
2025-03-06 17:15:15 +01:00
Elizabeth Figura
16be9181a0
vkd3d-shader/hlsl: Pass the correct type to base_type_get_semantic_equivalent().
2025-03-06 17:15:15 +01:00
Elizabeth Figura
3cf4a4e95e
vkd3d-shader/hlsl: Use common hlsl_type_is_integer() and hlsl_base_type_is_integer() helpers.
2025-03-06 17:15:15 +01:00
Elizabeth Figura
bd34ec1fb3
vkd3d-shader/hlsl: Emit the minimum-precision SFI0 flag.
2025-03-06 17:15:15 +01:00
Elizabeth Figura
6cdfe38319
vkd3d-shader/hlsl: Emit minimum-precision signatures.
2025-03-06 17:15:15 +01:00
Elizabeth Figura
c2ca6b6bdf
vkd3d-shader/hlsl: Emit the minimum-precision global flag when minimum-precision semantics are used.
...
There are other things we need to check, but this is a start.
2025-03-06 17:15:15 +01:00
Elizabeth Figura
055625448b
vkd3d-shader/hlsl: Add a hlsl_block_add_simple_load() helper.
2025-03-05 14:12:12 +01:00
Elizabeth Figura
d52df527ba
vkd3d-shader/hlsl: Add a hlsl_block_add_load_index() helper.
2025-03-05 14:12:12 +01:00
Elizabeth Figura
7b486fe239
vkd3d-shader/hlsl: Return an error expr from hlsl_add_load_component() on allocation failure.
2025-03-05 14:12:12 +01:00
Elizabeth Figura
009f5765df
vkd3d-shader/hlsl: Return void from hlsl_block_add_store_component().
2025-03-05 14:12:12 +01:00
Elizabeth Figura
9e3ac35669
vkd3d-shader/hlsl: Pass the target block to hlsl_new_store_component().
2025-03-05 14:12:12 +01:00
Henri Verbeet
5ab5a721a1
vkd3d-shader/spirv: Do not sign-extend *ptr in vkd3d_spirv_build_string().
...
"char" is (potentially) signed, so casting it to uint32_t will
sign-extend it. Because we use |= to assign it to "word", and don't
otherwise mask out the higher bits either, we effectively set subsequent
bytes in the same word to 0xff for input bytes > 0x7f. That potentially
includes the \0 terminator. For example, "é" (U+00e9) is "\xc3\xa9"
when encoded as UTF-8, and would get us 0xffffffc3 instead of
0x0000a9c3.
2025-03-05 14:10:58 +01:00
Nikolay Sivov
871c9c61a5
vkd3d-shader/fx: Fix const strings array types.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2025-03-05 14:09:58 +01:00
Nikolay Sivov
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
Nikolay Sivov
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
Anna (navi) Figueiredo Gomes
50254c284b
vkd3d-shader: Parse angle bracket initializer in state blocks.
...
While fxc allows full expressions inside the angle brackets, we don't parse that
yet as it'd be quite a mess to properly do so with yacc, and I'm not aware of any
game doing so in their shaders.
2025-03-03 18:00:23 +01:00
Anna (navi) Figueiredo Gomes
9809bda0e5
tests/hlsl: Add angle bracket state block syntax test.
2025-03-03 18:00:23 +01:00
Nikolay Sivov
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
Giovanni Mascellani
aa032f31bb
vkd3d: Split Vulkan debug messages.
...
So that they do not get truncated if they're too long.
2025-03-03 17:53:17 +01:00
Elizabeth Figura
e76c596d56
vkd3d-shader/hlsl: Add a hlsl_block_add_simple_store() helper.
2025-03-03 17:48:03 +01:00
Elizabeth Figura
fc4f440245
vkd3d-shader/hlsl: Add a hlsl_block_add_store_index() helper.
2025-03-03 17:48:03 +01:00
Elizabeth Figura
eafc97bcb3
vkd3d-shader/hlsl: Pass the target block to hlsl_new_load_component().
2025-03-03 17:48:03 +01:00
Elizabeth Figura
d053f3665d
vkd3d-shader/hlsl: Pass a block to hlsl_new_void_expr().
2025-03-03 17:48:03 +01:00
Elizabeth Figura
662d60ad6b
vkd3d-shader/hlsl: Add a hlsl_block_add_expr() helper.
2025-03-03 17:48:03 +01:00