Commit Graph

269 Commits

Author SHA1 Message Date
1fd89abcc3 vkd3d-shader: Enable DXIL support in the default configuration. 2025-02-24 15:10:08 +01:00
fe4143ad19 vkd3d-shader/dxil: Generate I/O signatures with 16-bit component types for native 16-bit shaders.
Which incidentally matches the I/O signatures from the DXBC container.
2025-02-24 15:10:08 +01:00
f4a3d17269 vkd3d-shader/dxil: Avoid using the I/O signatures from the DXBC container.
We currently generate our own I/O signatures inside the DXIL parser, but
use the element counts from the DXBC container signatures to allocate
the input_params/output_params/patch_constant_params arrays. That
happens to work for well-behaved inputs, but it's asking for trouble.
2025-02-20 15:57:26 +01:00
f63254d905 vkd3d-shader/dxil: Handle SV_RenderTargetArrayIndex. 2025-01-27 14:52:28 +01:00
8d479d2ea6 vkd3d-shader/dxil: Implement DX intrinsic EvalCentroid. 2024-12-18 17:27:43 +01:00
1bb3b13c0a vkd3d-shader/dxil: Implement DX intrinsic EvalSampleIndex. 2024-12-18 17:27:43 +01:00
64126a00c3 vkd3d-shader/ir: Give more meaningful names to I/O normalisation levels.
The previous names "not normalised" and "fully normalised" have meanings
which are likely to change with time. OTOH including a description of the
normalisation level in the enumerant seems excessive. Relating
normalisation levels to shader model versions might be a reasonable
compromise.
2024-12-12 17:21:49 +01:00
f22729461e vkd3d-shader/hlsl: Store hull and domain shader properties in vsir_program.
The alternative to adding the vsir_program->tess_output_primitive and
vsir_program->tess_partitioning fields would be to emit the vsir
DCL_TESSELLATOR_OUTPUT_PRIMITIVE and DCL_TESSELLATOR_PARTITIONING
instructions, like DXIL does, but I think that the preference is to store
these kind of data directly in the vsir_program.
2024-12-10 15:52:52 +01:00
d9c4a257c2 vkd3d-shader/dxbc: Parse the SFI0 ROV requirement. 2024-12-09 16:09:16 +01:00
a8c5f9e667 vkd3d-shader/dxil: Emit register SAMPLEMASK for output sysval SV_Coverage. 2024-11-25 20:47:24 +01:00
1ed8d907b3 vkd3d-shader/ir: Keep track of the tessellator domain in struct vsir_program. 2024-11-21 19:28:46 +01:00
1f4d17a4a2 vkd3d-shader/dxil: Allow zero domain input control point count. 2024-11-21 14:56:23 +01:00
2996ad6bd2 vkd3d-shader/dxil: Implement DX intrinsic SampleIndex. 2024-11-13 16:18:13 +01:00
32e6a1bb4d vkd3d-shader: Validate the parsed shader in vsir_parse(). 2024-10-23 16:02:09 +02:00
1113d24a70 vkd3d-shader/ir: Store the global flags in struct vsir_program. 2024-10-22 20:40:31 +02:00
ed4d45355a vkd3d-shader/ir: Represent the normalisation level with an enumeration. 2024-10-21 18:21:39 +02:00
eba8fd4720 vkd3d-shader: Keep track of whether programs have normalised I/O. 2024-10-17 17:34:55 +02:00
90616be301 vkd3d-shader/dxil: Shift register write masks by the component index in sm6_parser_emit_dx_store_output().
To account for the change we made in commit
c571a45e65 on the SPIR-V side.
2024-10-15 16:45:28 +02:00
16efb7c0c6 vkd3d-shader: Ignore the patch constant signature when it doesn't make sense. 2024-10-09 13:13:00 +02:00
1256b4f862 vkd3d-shader/d3d-asm: Rename vkd3d_shader_trace() to vsir_program_trace(). 2024-10-08 22:04:59 +02:00
3428ed7a64 vkd3d-shader/dxil: Emit double arithmetic operations when appropriate. 2024-10-08 22:04:32 +02:00
cf92d9f398 vkd3d-shader/ir: Store the thread group size in struct vsir_program. 2024-10-08 22:03:05 +02:00
da7c9694f1 vkd3d-shader/dxil: Emit SAMPLER, UAV and RESOURCE registers with only 2 indices.
DXIL handles are used to represent descriptors. Currently they are
translated to registers of the appropriate type (depending on the
descriptor type) and three indices. The first two indices are used
to represent the descriptor itself (through its signature and array
index), and are filled when the handle itself is created. The last
index is used with constant buffers to address the data inside the
buffer itself, and it goes unused with other descriptor types.

As currently implemented, however, registers for descriptors other
than constant buffers are still created with three indices, even if
the last one is useless and set to -1. In the interest of creating
more sensible VSIR code, this is now removed: DXIL handles are
created with just two indices; a third one is added when accessing
constant buffers, and nothing is changed for other descriptor types.
2024-10-03 19:08:33 +02:00
6822f1fe6c vkd3d-shader/dxil: Trace the program when validation fails after parsing. 2024-09-30 20:48:43 +02:00
7404fa5285 vkd3d-shader/dxil: Emit RESOURCE and UAV registers with data type UNUSED. 2024-09-30 20:05:39 +02:00