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
bd34ec1fb3
vkd3d-shader/hlsl: Emit the minimum-precision SFI0 flag.
2025-03-06 17:15:15 +01:00
6cdfe38319
vkd3d-shader/hlsl: Emit minimum-precision signatures.
2025-03-06 17:15:15 +01:00
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
055625448b
vkd3d-shader/hlsl: Add a hlsl_block_add_simple_load() helper.
2025-03-05 14:12:12 +01:00
d52df527ba
vkd3d-shader/hlsl: Add a hlsl_block_add_load_index() helper.
2025-03-05 14:12:12 +01:00
7b486fe239
vkd3d-shader/hlsl: Return an error expr from hlsl_add_load_component() on allocation failure.
2025-03-05 14:12:12 +01:00
009f5765df
vkd3d-shader/hlsl: Return void from hlsl_block_add_store_component().
2025-03-05 14:12:12 +01:00
9e3ac35669
vkd3d-shader/hlsl: Pass the target block to hlsl_new_store_component().
2025-03-05 14:12:12 +01:00
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
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
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
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
9809bda0e5
tests/hlsl: Add angle bracket state block syntax test.
2025-03-03 18:00:23 +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
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
e76c596d56
vkd3d-shader/hlsl: Add a hlsl_block_add_simple_store() helper.
2025-03-03 17:48:03 +01:00
fc4f440245
vkd3d-shader/hlsl: Add a hlsl_block_add_store_index() helper.
2025-03-03 17:48:03 +01:00
eafc97bcb3
vkd3d-shader/hlsl: Pass the target block to hlsl_new_load_component().
2025-03-03 17:48:03 +01:00
d053f3665d
vkd3d-shader/hlsl: Pass a block to hlsl_new_void_expr().
2025-03-03 17:48:03 +01:00
662d60ad6b
vkd3d-shader/hlsl: Add a hlsl_block_add_expr() helper.
2025-03-03 17:48:03 +01:00
f24cc55c14
vkd3d-shader/hlsl: Remove lower_nonfloat_exprs().
...
The only purpose it has at this point is wrapping integer DIV in casts,
which can be moved to lower_division().
2025-03-03 17:47:42 +01:00
7cb1970952
vkd3d-shader/hlsl: Don't cast all expressions to float.
...
Instead, allow half, bool, int, and uint, expressions that map to the
same float op to reach sm1_generate_vsir_instr_expr().
2025-03-03 17:26:15 +01:00
0ce2b1359f
tests/hlsl: Add lower sm1 saturate test.
2025-03-03 17:25:20 +01:00