Commit Graph

748 Commits

Author SHA1 Message Date
Elizabeth Figura
47c1b05a5f vkd3d-shader/hlsl: Return an error instruction from add_call() on failure. 2025-12-09 16:44:25 +01:00
Anna (navi) Figueiredo Gomes
ffc8f98bba vkd3d-shader/fx: Implement shader initializers. 2025-12-09 16:29:29 +01:00
Anna (navi) Figueiredo Gomes
b17923b5ba vkd3d-shader/hlsl: Store parsed values in hlsl_ir_compile().
Makes emitting shaders from fx.c easier, and brings parsing failures
upfront.

Non-effect target profiles don't perform any type checks on
ConstructGSWithSO(), nor use shader objects in any way, but they do
check if the argument count is correct.

So we create a GeometryShader object with NULL decl and profile when
targeting non-effect profiles, so our type checks still work and
implicit conversions aren't attempted.
2025-12-09 15:44:30 +01:00
Anna (navi) Figueiredo Gomes
ffe1a433d9 vkd3d-shader/hlsl: Unify add_shader_compilation() cleanup. 2025-12-09 15:02:27 +01:00
Shaun Ren
b31dc058b9 vkd3d-shader/hlsl: Validate groupshared variables. 2025-12-08 17:01:57 +01:00
Anna (navi) Figueiredo Gomes
13ee6d74ad vkd3d-shader/hlsl: Store statically initialized constant scalars/vectors in ctx->static_initializers.
Constant numeric local variables can be used in places were literals are
expected if they're initialized with a static expression.

Storing such constant in ctx->static_initializers allows copy-prop to
handle such cases properly.
2025-11-24 17:09:15 +01:00
Anna (navi) Figueiredo Gomes
dd3524444d vkd3d-shader/hlsl: Properly free default values when discarding them. 2025-11-17 15:17:45 +01:00
Shaun Ren
200e66ba4f vkd3d-shader/hlsl: Store the flatten type in struct hlsl_ir_if. 2025-10-30 17:46:12 +01:00
Elizabeth Figura
deb7a67d67 vkd3d-shader/hlsl: Introduce hlsl_block_add_constant(). 2025-10-28 16:30:49 +01:00
Anna (navi) Figueiredo Gomes
c73afe94f1 vkd3d-shader/hlsl: Remove the duplicate HLSL_IR_STRING_CONSTANT branch from evaluate_static_expression(). 2025-10-14 15:47:05 +02:00
Elizabeth Figura
c8b2aca23d vkd3d-shader/hlsl: Make ConstructGSWithSO an intrinsic function.
It's not a keyword.
2025-10-07 13:10:26 +02:00
Shaun Ren
44582a930c vkd3d-shader/hlsl: Handle the "_centroid" modifier suffix in semantic names. 2025-10-06 15:18:48 +02:00
Petrichor Park
e35604dbf0 vkd3d-shader/hlsl: Implement the firstbitlow() intrinsic. 2025-09-22 11:26:42 +02:00
Petrichor Park
e6d840170d vkd3d-shader/hlsl: Implement the firstbithigh() intrinsic. 2025-09-22 11:26:42 +02:00
Petrichor Park
e49beca0d5 vkd3d-shader/hlsl: Implement the countbits() intrinsic. 2025-09-22 11:26:42 +02:00
Victor Chiletto
ba4027f18e vkd3d-shader/hlsl: Force default majority for resource formats. 2025-09-04 13:39:46 +02:00
Shaun Ren
1083b31dfd vkd3d-shader/hlsl: Implement texCUBEbias(). 2025-09-03 12:01:34 +02:00
Petrichor Park
d964d55b4a vkd3d-shader/hlsl: Implement the frexp() intrinsic. 2025-08-21 15:29:27 +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
5dbf859029 vkd3d-shader/hlsl: Parse SRV structured buffers. 2025-08-05 14:25:50 +02:00
Shaun Ren
f3dec58423 vkd3d-shader/hlsl: Ignore the 'groupshared' modifier for non-compute shaders. 2025-06-24 14:54:25 +02:00