Giovanni Mascellani
c181f147ce
vkd3d-shader/ir: Validate register id and index for SAMPLER registers.
2025-04-02 19:08:50 +02:00
Giovanni Mascellani
9b7256c0c8
vkd3d-shader/ir: Validate register id and index for UAV registers.
2025-04-02 19:08:00 +02:00
Giovanni Mascellani
10d8760134
vkd3d-shader/ir: Validate register id and index for RESOURCE registers.
2025-04-02 19:06:43 +02:00
Shaun Ren
7aebed0eea
vkd3d-shader/hlsl: Ensure that uniform objects are never written to in copy_propagation_transform_object_load().
2025-04-02 18:49:52 +02:00
Shaun Ren
b1d8915440
vkd3d-shader/hlsl: Divert written uniform derefs to temps before copy-propagation passes.
...
The following pixel shader currently triggers an infinite loop during
copy propagation, which is fixed by this commit:
sampler s;
Texture2D t1, t2;
float4 main() : sv_target
{
Texture2D t = t1;
t1 = t2;
t2 = t;
return t1.Sample(s, float2(0, 0)) + t2.Sample(s, float2(0, 0));
}
The infinite loop occurs because copy_propagation_transform_object_load()
replaces t1 in the resource_load(t1, ...) instruction
with t2, t1, t2, ... repeatedly.
2025-04-02 18:49:52 +02:00
Francisco Casas
3ead8d532b
vkd3d-shader/hlsl: Allow non-constant deref propagation on SM1.
...
Note that we still have to preempt the propagation to SM1 pixel shader
uniforms. Otherwise this will turn the many constant derefs that appear
from the <index-val> copy generated in lower_index_loads() into a single
non-constant deref, causing it to allocate all the registers instead of
up until the last one used.
2025-04-02 18:27:16 +02:00
Francisco Casas
f65e6265e0
vkd3d-shader/ir: Normalise MOVA and d3dbc indirect addressing.
2025-04-02 18:27:16 +02:00
Francisco Casas
fd02d69dda
vkd3d-shader/hlsl: Implement indirect addressing for d3dbc target profiles.
2025-04-02 18:26:03 +02:00
Francisco Casas
0e0ed72652
vkd3d-shader/d3dbc: Respect "idx_count" when writing registers.
...
Some SM1 src registers have idx_count = 0, in which case we have to
respect that instead of always reading reg->reg.idx[0].offset even when
it is invalid.
2025-04-02 18:06:48 +02:00
Elizabeth Figura
20b76f87bf
vkd3d-shader/hlsl: Initialize the temp count for sm1.
2025-04-02 17:58:26 +02:00
Elizabeth Figura
7cb5a7bebc
vkd3d-shader/hlsl: Leave the swizzle zero for VSIR_DIMENSION_NONE registers.
2025-04-02 17:58:26 +02:00
Elizabeth Figura
950f78041a
vkd3d-shader/hlsl: Initialize the vsir dimension for sm1.
2025-04-02 17:58:26 +02:00
Elizabeth Figura
856f4b55f6
vkd3d-shader/hlsl: Set the correct index count for sm1 DEPTHOUT.
2025-04-02 17:58:26 +02:00
Elizabeth Figura
227e2cc0f5
vkd3d-shader/hlsl: Use vsir_*_from_hlsl_node() helpers in more places.
2025-04-02 17:58:18 +02:00
Nikolay Sivov
21e08955d3
vkd3d-shader/fx: Pad fx_2_0 object data blobs with zeroes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2025-03-18 15:56:32 +01:00
Shaun Ren
62c00be873
vkd3d-shader/tpf: Emit geometry shader property declarations.
2025-03-18 15:46:07 +01:00
Shaun Ren
bd055fac1c
vkd3d-shader/hlsl: Store geometry shader properties in struct vsir_program.
2025-03-18 15:46:02 +01:00
Shaun Ren
b1ace5763a
vkd3d-shader/hlsl: Implement input semantics for geometry shaders.
2025-03-18 15:40:11 +01:00
Shaun Ren
8af3173955
vkd3d-shader/hlsl: Support input primitive arrays in geometry shaders.
2025-03-18 15:40:11 +01:00
Giovanni Mascellani
2377db33db
vkd3d-shader: Represent descriptor information in the vsir program.
2025-03-18 15:38:01 +01:00
Giovanni Mascellani
4308fa3f68
vkd3d-shader/spirv: Do not steal the instruction array from the vsir program.
...
There is no need, and it only complicates tracking ownership.
2025-03-18 15:37:57 +01:00
Giovanni Mascellani
fc520e7b4c
vkd3d-shader/spirv: Do not store duplicate references to the signatures.
...
They are already available through the program.
2025-03-18 15:34:16 +01:00
Giovanni Mascellani
5ce03258b5
vkd3d-shader/spirv: Immediately store a reference to the program in the SPIR-V generator.
...
So it doesn't have to be passed around uselessly.
2025-03-18 15:34:04 +01:00
Giovanni Mascellani
549659dab6
vkd3d-shader/spirv: Run the vsir passes before creating the SPIR-V generator.
...
This makes it more similar to the MSL and GLSL generators. It also looks
like a cleaner design, the backend is supposed to get access to the vsir
program after it has gone through the pipeline.
2025-03-18 15:33:27 +01:00
Francisco Casas
ea99d2c2cd
vkd3d-shader/hlsl: Lower integer modulus for d3dbc target profiles.
2025-03-18 15:27:04 +01:00