Elizabeth Figura
a44d79a13c
vkd3d-shader/hlsl: Use a simple counter for indexable temps.
2025-09-04 14:04:27 +02:00
Victor Chiletto
d5fdfa5f79
vkd3d-shader/hlsl: Emit RDEF metadata for SRV structured buffers.
2025-09-04 13:48:28 +02:00
Elizabeth Figura
25ae2fcc84
vkd3d-shader/hlsl: Use unique temps for non-indexable variables.
2025-09-02 11:33:25 +02:00
Shaun Ren
320c3c9652
vkd3d-shader/hlsl: Fold some general conditional identities.
...
The following conditional identities are applied:
c ? x : x -> x
false ? x : y -> y; true ? x : y -> x
c ? true : false -> c; c ? false : true -> !c
!c ? x : y -> c ? y : x
Lastly, for expression chains x, y in a conditional expression
c ? x : y,
we evaluate all conditionals in the expression chains with the
condition c, assuming c is true (for x), or false (for y).
2025-08-21 16:00:51 +02:00
Shaun Ren
245430002a
vkd3d-shader/hlsl: Fold some general unary identities.
...
The following unary identities are applied:
||x|| -> |x|
|-x| -> |x|
~(~x) -> x
f(g(x)) -> g(x), where f(), g() are floor() or ceil() functions.
-(-x) -> x
!!x -> x
!(x == y) -> x != y, !(x < y) -> x >= y, etc (for integers).
2025-08-21 16:00:46 +02:00
Henri Verbeet
e7be5aa9fd
vkd3d-shader/hlsl: Pass a vkd3d_shader_source_list pointer to hlsl_ctx_init().
...
Instead of storing the list inside struct hlsl_ctx. The source file
names in the list are used by the location information that the HLSL
frontend produces, and end up being referenced by the vsir program. If
we want the vsir program to be able to outlive the hlsl_ctx, its
location information can't reference data owned by the hlsl_ctx.
2025-08-07 20:33:24 +02:00
Henri Verbeet
7c37fc6a8b
vkd3d-shader: Introduce struct vkd3d_shader_source_list.
2025-08-07 20:33:24 +02:00
Shaun Ren
4bb880f9ed
vkd3d-shader/hlsl: Support interlocked operations on non-indexed groupshared variables.
2025-08-05 16:33:08 +02:00
Shaun Ren
8d0d8d106b
vkd3d-shader/hlsl: Support stores to raw groupshared variables.
2025-08-05 16:32:34 +02:00
Shaun Ren
3802344e97
vkd3d-shader/hlsl: Allocate groupshared registers.
2025-08-05 16:06:07 +02:00
Victor Chiletto
e718546ee5
vkd3d-shader/hlsl: Transform hlsl_ir_index into structured buffers into field specific hlsl_ir_resource_loads.
2025-08-05 14:25:50 +02:00
Henri Verbeet
eaebef4265
vkd3d-shader/hlsl: Emit vsir from hlsl_emit_bytecode().
2025-07-28 16:10:15 +02:00
Anna (navi) Figueiredo Gomes
a7266284ee
vkd3d-shader/hlsl: Move hlsl_ir_function_decl->extern_vars to a local variable.
2025-07-23 16:56:06 +02:00
Francisco Casas
844f33025e
vkd3d-shader/hlsl: Dump processed function bodies.
2025-07-23 16:31:59 +02:00
Francisco Casas
3376015d88
vkd3d-shader/hlsl: Update the enum hlsl_sampler_dim comment.
2025-06-26 15:55:58 +02:00
Elizabeth Figura
d5237ec1cc
vkd3d-shader/hlsl: Output SSA registers where possible.
2025-06-23 17:44:11 +02:00
Elizabeth Figura
288020bce8
vkd3d-shader/ir: Allocate SSA registers to temps.
2025-06-23 17:39:12 +02:00
Elizabeth Figura
34dbd60e01
vkd3d-shader/hlsl: Add a register type field to struct hlsl_reg.
...
This will be used for temps. After moving temp allocation to vsir, some of these
will be VKD3DSPR_SSA, and some will not.
2025-06-23 17:28:40 +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
Shaun Ren
d5dcf31123
vkd3d-shader/hlsl: Store stream index in struct hlsl_semantic.
...
In addition, support stream indices in tpf_write_signature().
2025-06-02 19:59:22 +02:00
Elizabeth Figura
c1adf54a44
vkd3d-shader/hlsl: Forbid referring to typedefs with "struct".
2025-05-14 15:09:48 +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
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
2a89b23ede
vkd3d-shader/hlsl: Validate and record stream output objects.
...
Validation should only be done for stream outputs that are used.
2025-04-23 18:01:06 +02:00