Commit Graph

4559 Commits

Author SHA1 Message Date
Henri Verbeet
f732fb7889 Release 1.17. 2025-08-21 12:52:13 +02:00
Henri Verbeet
cab0bd07e5 vkd3d-shader/glsl: Resolve SSA values.
Since commit eaebef4265 we may receive
vsir generated from HLSL sources, which typically contains SSA values.
We could previously receive vsir with SSA values as well, but HLSL
sources would go through d3dbc/tpf as an intermediate step, making the
resulting vsir much less likely to contain SSA values.
2025-08-13 15:56:06 +02:00
Henri Verbeet
9336b4647c vkd3d-shader/d3d-asm: Resolve SSA values when outputting SM<6 assembly.
In particular, since commit eaebef4265 we
may receive vsir generated from HLSL sources, which typically contains
SSA values.
2025-08-13 15:55:31 +02:00
Henri Verbeet
8334386d99 vkd3d-shader/spirv: Avoid emitting duplicate built-in inputs in spirv_compiler_emit_input().
This works around an issue introduced by commit
66cb2815f0. SV_PRIMITIVE_ID inputs in
geometry shaders use VKD3DSPR_PRIMID registers, and we create the
corresponding SPIR-V inputs using spirv_compiler_emit_io_register().
Unfortunately we also have an input signature element for the same
input, and simply creating another PrimitiveId input would run into
VUID-StandaloneSpirv-OpEntryPoint-09658.

Before the commit mentioned above, we'd use DCL_INPUT instructions to
emit input declarations, and these would help to distinguish whether
VKD3DSPR_INPUT or VKD3DSPR_PRIMID registers were used for primitive ID
inputs. Note that we can't simply ignore input signature element with
SIGNATURE_TARGET_LOCATION_UNUSED; the DXIL parser emits SV_SAMPLE_INDEX
inputs with that target location, but does require them to use a
VKD3DSPR_INPUT register.
2025-08-13 15:54:12 +02:00
Francisco Casas
880cb1083f vkd3d-shader/ir: Use iterators in vsir_program_insert_point_coord(). 2025-08-07 20:43:28 +02:00
Francisco Casas
a91b880afa vkd3d-shader/ir: Use iterators in vsir_program_insert_point_size_clamp(). 2025-08-07 20:43:28 +02:00
Francisco Casas
0ed34c22c9 vkd3d-shader/ir: Use iterators in vsir_program_insert_point_size(). 2025-08-07 20:43:28 +02:00
Francisco Casas
14643b02f6 vkd3d-shader/ir: Use iterators in vsir_program_insert_clip_planes(). 2025-08-07 20:43:28 +02:00
Francisco Casas
bd52ed8918 vkd3d-shader/ir: Use iterators in vsir_program_insert_alpha_test(). 2025-08-07 20:43:28 +02:00
Henri Verbeet
f7890fc54c vkd3d-shader/hlsl: Support HLSL sources in vkd3d_shader_scan(). 2025-08-07 20:40:01 +02:00
Henri Verbeet
f95fc28851 vkd3d-shader/hlsl: Return a vsir program from hlsl_compile_shader().
This largely brings the HLSL frontend in line with the other frontends.
2025-08-07 20:40:01 +02:00
Henri Verbeet
85603dc9c6 vkd3d-shader/hlsl: Initialise the vsir program in hlsl_compile_shader().
Mostly in preparation for returning a vsir program from
hlsl_compile_shader() in the next commit.
2025-08-07 20:37:41 +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
Henri Verbeet
e4bb77ecef vkd3d-shader: Cleanup the vsir program on vsir_program_transform_early() failure in vsir_parse(). 2025-08-07 20:33:24 +02:00
Elizabeth Figura
f9bb84e5ef vkd3d-shader/d3dbc: Lower TEXCRD. 2025-08-07 19:30:29 +02:00
Elizabeth Figura
731b94f6f9 vkd3d-shader/d3dbc: Lower 1.4 TEXLD. 2025-08-07 19:05:25 +02:00
Elizabeth Figura
9c605c942c vkd3d-shader/d3dbc: Normalize ps 1.x output. 2025-08-07 18:55:40 +02:00
Elizabeth Figura
a4f69d4ae6 vkd3d-shader/d3dbc: Move TEXLD lowering to d3dbc_parse(). 2025-08-07 18:52:46 +02:00
Elizabeth Figura
2201c32e6d vkd3d-shader: Add descriptors from SAMPLE instructions if necessary.
This has no effect now, but will once we start lowering sm1 texturing
instructions before vsir_program_scan() is called.
2025-08-07 16:15:47 +02:00
Francisco Casas
f6d0c689ee vkd3d-shader/ir: Use iterators in vsir_program_materialise_phi_ssas_to_temps(). 2025-08-06 18:24:19 +02:00
Francisco Casas
aab02b1bca vkd3d-shader/ir: Use iterators in vsir_program_flatten_hull_shader_phases(). 2025-08-06 18:23:33 +02:00
Francisco Casas
6c840b80d6 vkd3d-shader/ir: Use iterators in cf_flattener_iterate_instruction_array(). 2025-08-06 18:19:55 +02:00
Francisco Casas
e428528a7c vkd3d-shader/ir: Use iterators in vsir_program_remove_dead_code(). 2025-08-06 18:19:55 +02:00
Francisco Casas
f818d052cd vkd3d-shader/ir: Remove the io_normaliser.instructions field.
It's effectively unused, and struct vkd3d_shader_instruction_array is
not meant to be copied by value. If io_normaliser.instructions were to
be modified it might leave program->instructions in an inconsistent
state.
2025-08-06 12:54:54 +02:00