Shaun Ren
f3dec58423
vkd3d-shader/hlsl: Ignore the 'groupshared' modifier for non-compute shaders.
2025-06-24 14:54:25 +02:00
Shaun Ren
4ede2f1365
vkd3d-shader/hlsl: Allow memory barriers in SM4+ target profiles.
2025-06-24 14:51:34 +02:00
Nikolay Sivov
f135f7fe07
vkd3d-shader/hlsl: Add a stub for the noise() intrinsic.
...
This function is used in tx_1_0 code, but is also supported in
fx_2_0 and fx_4_0 expressions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2025-06-19 20:36:27 +02:00
Giovanni Mascellani
bda2be3423
vkd3d-shader/hlsl: Reject programs with group shared variables.
...
Currently the modifier is ignored and the program is miscompiled.
2025-06-05 15:50:04 +02:00
Elizabeth Figura
c1adf54a44
vkd3d-shader/hlsl: Forbid referring to typedefs with "struct".
2025-05-14 15:09:48 +02:00
Elizabeth Figura
5ad2e7ee6d
vkd3d-shader/hlsl: Fix an incorrect error message for referring to non-struct types with "struct".
...
We cannot be redefining struct types in this rule, only referring to already
defined types. Struct type definition is handled by named_struct_spec, which
complains if the type was defined at all, regardless of class.
2025-05-14 15:08:13 +02:00
Elizabeth Figura
a06b9f6646
vkd3d-shader/hlsl: Do not emit HLSL_OP1_ABS for unsigned types.
2025-05-14 14:55:59 +02:00
Elizabeth Figura
cdc74a9377
vkd3d-shader/hlsl: Emit an error when min16uint is used in d3dbc target profiles.
...
Fixes: 18ca7affad
2025-05-14 14:12:19 +02:00
Elizabeth Figura
4a5411aa6e
vkd3d-shader/hlsl: Return a uint1 from GetRenderTargetSampleCount().
2025-05-12 15:29:23 +02:00
Francisco Casas
758a4bef09
vkd3d-shader/hlsl: Parse barriers.
...
And introduce hlsl_ir_sync to represent them.
2025-05-05 14:15:14 +02:00
Shaun Ren
8059608af9
vkd3d-shader/hlsl: Parse the RestartStrip() method for stream outputs.
2025-04-23 17:54:54 +02:00
Shaun Ren
9525eb2f0c
vkd3d-shader/hlsl: Parse the Append() method for stream outputs.
2025-04-23 17:54:54 +02:00
Francisco Casas
9378d51b18
vkd3d-shader/hlsl: Remove the unnecessary "instr" field from the parser %union.
2025-04-16 16:22:42 +02:00
Francisco Casas
77941b131e
vkd3d-shader/hlsl: Add switch_case destructors to the parser.
2025-04-16 16:21:51 +02:00
Francisco Casas
ff5f9cbcb6
vkd3d-shader/hlsl: Add parse_variable_def destructors to the parser.
2025-04-16 16:21:45 +02:00
Francisco Casas
f3ba7a84f4
vkd3d-shader/hlsl: Avoid leaking blocks on YYABORT.
...
Currently program errors might result on instructions that use
ctx->error_instr as src. In case we hit YYABORT while parsing another
part of the HLSL source, we have to make sure that the block that
contains the instruction is properly cleaned up, or we might hit the
vkd3d:590273:err:hlsl_free_instr Failed assertion: list_empty(&node->uses)
assertion when hlsl_ctx_cleanup() is called after the YYABORT.
Consider the following shader:
float4 main() : sv_target
{
// Statement A
int p = foo; // initializer argument is ERROR.
// Statement B
undeclared_fun(); // triggers YYABORT.
}
Statement A will src the ctx->error_instr because of the undeclared
identifier and Statement B will trigger an YYABORT because of the
undeclared function.
2025-04-16 16:01:35 +02:00
Francisco Casas
128688a573
vkd3d-shader/hlsl: Avoid leaking declaration_statement blocks.
2025-04-16 16:00:18 +02:00
Francisco Casas
58706474ec
vkd3d-shader/hlsl: Make struct_declaration_without_vars return void.
2025-04-16 15:58:40 +02:00
Francisco Casas
7b21059ee5
vkd3d-shader/hlsl: Support the .Length property for Textures.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57686
2025-04-14 15:47:16 +02:00
Elizabeth Figura
193e40c271
vkd3d-shader/hlsl: Stop checking for failure from intrinsic_float_convert_arg().
2025-03-12 22:02:39 +01:00
Elizabeth Figura
7b5b5dbb8d
vkd3d-shader/hlsl: Do not abort when performing an invalid implicit cast.
2025-03-12 22:02:39 +01:00
Elizabeth Figura
2ee19c4d34
vkd3d-shader/hlsl: Do not abort when performing an invalid explicit cast.
2025-03-12 22:02:39 +01:00
Elizabeth Figura
25f476c7ad
vkd3d-shader/hlsl: Return an error expression from add_cast() on allocation failure.
2025-03-12 22:02:39 +01:00
Elizabeth Figura
0642531c2a
vkd3d-shader/hlsl: Introduce hlsl_block_add_swizzle().
2025-03-12 22:02:31 +01:00
Elizabeth Figura
f8c53fae37
vkd3d-shader/hlsl: Introduce hlsl_block_add_resource_load().
2025-03-12 22:02:21 +01:00