Commit Graph

75 Commits

Author SHA1 Message Date
Conor McCarthy
1630fd9a3c vkd3d-shader/dxil: Apply metadata attachments to instructions.
These are apparently only used for 'dx.op' intrinsics, because the
instructions based on native LLVM ones have their own way to apply
attributes.
2023-12-07 21:57:00 +01:00
Conor McCarthy
a33a9127ca vkd3d-shader/dxil: Implement DX intrinsic Unary. 2023-12-07 21:56:53 +01:00
Conor McCarthy
cc5e703802 vkd3d-shader/dxil: Emit constant global arrays as immediate constant buffers. 2023-12-07 21:56:47 +01:00
Conor McCarthy
cb88844a3d vkd3d-shader: Add a register index to struct vkd3d_shader_immediate_constant_buffer. 2023-12-07 21:56:47 +01:00
Conor McCarthy
ffae57eb8d vkd3d-shader/dxil: Support null constant arrays. 2023-12-07 21:56:43 +01:00
Giovanni Mascellani
a52604da8c vkd3d-shader/dxil: Declare IO registers as VEC4.
Otherwise, for instance, their write masks and swizzles are not written
in the D3D ASM dump.
2023-11-28 21:49:18 +01:00
Jacek Caban
1edbc05745 vkd3d-shader: Use unsigned int type for tags passed to sm6_metadata_get_uint_value. 2023-11-28 00:09:29 +01:00
Conor McCarthy
eb05e434ff vkd3d-shader/dxil: Implement the DXIL LOAD instruction. 2023-11-22 22:07:59 +01:00
Conor McCarthy
59730ecfd8 vkd3d-shader/dxil: Implement the DXIL GEP instruction. 2023-11-22 22:07:58 +01:00
Conor McCarthy
a0f5d70792 vkd3d-shader/dxil: Support global variable initialisers. 2023-11-22 22:07:57 +01:00
Conor McCarthy
f2a656b876 vkd3d-shader/dxil: Introduce a value type for immediate constant buffers. 2023-11-22 22:07:56 +01:00
Conor McCarthy
85d5f83fb7 vkd3d-shader/dxil: Implement default address space global variables. 2023-11-22 22:07:54 +01:00
Conor McCarthy
3c4631a4d4 vkd3d-shader/dxil: Implement the DXIL VSELECT instruction. 2023-11-15 21:48:35 +01:00
Conor McCarthy
408f67c69c vkd3d-shader/dxil: Handle missing flags as zero for CMP2.
The flag operand is omitted if IEEE strictness is specified.
2023-11-14 23:06:43 +01:00
Conor McCarthy
f1e9f40061 vkd3d-shader/dxil: Handle missing flags as zero for BINOP.
The flag operand is omitted if IEEE strictness is specified.
2023-11-14 23:06:41 +01:00
Nikolay Sivov
d190fdf8c5 vkd3d-shader/dxil: Fully initialize instruction data in sm6_parser_emit_extractval().
Noticed after test runner started crashing when tracing is enabled.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-13 23:19:18 +01:00
Nikolay Sivov
3203485a7c vkd3d-shader: Fix some spelling mistakes. 2023-11-13 23:19:15 +01:00
Conor McCarthy
22960753e9 vkd3d-shader/spirv: Introduce orderedness to comparison instructions. 2023-11-10 20:23:51 +01:00
Conor McCarthy
d3b90cc877 vkd3d-shader/dxil: Implement the DXIL CMP2 instruction. 2023-11-10 20:23:50 +01:00
Zebediah Figura
133e313800 vkd3d-shader/dxil: Do not use COLOROUT for PS outputs.
sm4 does not use this; only sm1 does. In following patches we will normalize it
to OUTPUT.
2023-11-09 21:14:49 +01:00
Conor McCarthy
90d178bf12 vkd3d-shader/dxil: Implement the DXIL CAST instruction. 2023-11-09 21:14:42 +01:00
Conor McCarthy
749df8dec2 vkd3d-shader/dxil: Implement the DXIL BINOP instruction. 2023-11-06 23:09:03 +01:00
Giovanni Mascellani
0d4aebd2e7 vkd3d-shader: Explicitly cast vkd3d_shader_global_flags to uint64_t.
On macOS vkd3d_shader_global_flags has underlying type unsigned long,
while uint64_t is defined as unsigned long long. This difference
causes a few warnings to be raised.
2023-11-06 23:08:37 +01:00
Conor McCarthy
7419f4e31d vkd3d-shader/dxil: Allow empty struct types. 2023-11-02 18:23:12 +01:00
Conor McCarthy
7ca6a5452a vkd3d-shader/dxil: Always apply the signature element start column to used_mask.
The used_mask value loaded from an additional tag/value pair is relative
to the start column.
2023-11-02 18:22:59 +01:00
Giovanni Mascellani
f3c1a15a6f vkd3d-shader/dxil: Use vsir_register_init() to initialize registers. 2023-11-02 18:22:35 +01:00
Conor McCarthy
589670180a vkd3d-shader/dxil: Implement the DXIL EXTRACTVAL instruction. 2023-11-01 21:47:34 +01:00
Conor McCarthy
43b5d73870 vkd3d-shader/dxil: Implement DX instruction CBufferLoadLegacy. 2023-11-01 21:47:32 +01:00
Conor McCarthy
3b1bbe2b0a vkd3d-shader/dxil: Implement DX instruction CreateHandle. 2023-11-01 21:47:30 +01:00
Conor McCarthy
f57d65361a vkd3d-shader/dxil: Replace register_address_init() with register_index_address_init().
Makes it much clearer which register index is being written.
2023-11-01 21:47:29 +01:00
Conor McCarthy
b7b128595e vkd3d-shader/dxil: Read CBV descriptors. 2023-10-19 23:07:45 +02:00
Conor McCarthy
f7525bf0c6 vkd3d-shader/dxil: Validate the descriptor list metadata nodes. 2023-10-19 23:07:42 +02:00
Conor McCarthy
85c165ff39 vkd3d-shader/dxil: Read DXIL compute shader thread group dimensions. 2023-10-17 22:18:26 +02:00
Conor McCarthy
4b7ca0c294 vkd3d-shader/dxil: Read DXIL global flags. 2023-10-17 22:18:25 +02:00
Conor McCarthy
e0d0a04b79 vkd3d-shader/dxil: Handle multi-row signature elements. 2023-10-16 22:36:38 +02:00
Conor McCarthy
7113064a19 vkd3d-shader/dxil: Handle signature element additional tag/value pairs. 2023-10-16 22:36:36 +02:00
Conor McCarthy
8648ca0e77 vkd3d-shader/dxil: Read the DXIL input and output signatures.
These can differ from the DXBC signatures by having multiple rows, and
load/store instructions reference them by id instead of register index.
2023-10-16 22:36:29 +02:00
Conor McCarthy
62badbff7a vkd3d-shader/dxil: Validate the entry point info. 2023-10-16 22:36:28 +02:00
Conor McCarthy
6034f4a976 vkd3d-shader/dxil: Read DXIL metadata named nodes. 2023-10-12 18:23:33 +02:00
Conor McCarthy
4ac201788d vkd3d-shader/dxil: Read DXIL metadata kinds. 2023-10-12 18:23:32 +02:00
Conor McCarthy
cba3e18c45 vkd3d-shader/dxil: Read DXIL metadata values. 2023-10-12 18:23:31 +02:00
Conor McCarthy
5817fabc30 vkd3d-shader/dxil: Read DXIL metadata nodes. 2023-10-12 18:23:30 +02:00
Conor McCarthy
a62343f544 vkd3d-shader/dxil: Read DXIL metadata strings. 2023-10-12 18:23:29 +02:00
Conor McCarthy
05d516bb00 vkd3d-shader/dxil: Emit an error on allocation failure in dxil_record_to_string(). 2023-10-11 22:21:22 +02:00
Conor McCarthy
52dc6f252c vkd3d-shader/dxil: Read global constants in sm6_parser_globals_init().
These are needed for reading metadata.
2023-10-11 22:21:20 +02:00
Conor McCarthy
df4e1b7393 vkd3d-shader/dxil: Read immediate constant arrays. 2023-10-11 22:21:19 +02:00
Conor McCarthy
f61c853f61 vkd3d-shader/dxil: Convert into an error the warning for an unhandled instrinsic. 2023-09-26 22:07:51 +02:00
Conor McCarthy
b30b95e824 vkd3d-shader/dxil: Do not access null code blocks on failure. 2023-09-26 22:07:50 +02:00
Francisco Casas
e904660497 vkd3d-shader: Turn vkd3d_shader_register.immconst_type into vkd3d_shader_register.dimension. 2023-09-26 22:07:04 +02:00
Francisco Casas
5d6899888d vkd3d-shader: Rename shader_register_init() to vsir_register_init(). 2023-09-26 22:06:50 +02:00