Nikolay Sivov
9a6e4a0c58
vkd3d-shader/hlsl: Check for duplicate case statements.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:58:59 +01:00
Conor McCarthy
f7525bf0c6
vkd3d-shader/dxil: Validate the descriptor list metadata nodes.
2023-10-19 23:07:42 +02:00
Conor McCarthy
a4ed06bc5b
vkd3d-shader/d3d-asm: Recognise the 'rasteriser ordered view' UAV flag.
2023-10-18 20:58:27 +02:00
Henri Verbeet
b63c853688
vkd3d-utils: Implement D3DGetBlobPart().
...
This was largely adapted from Wine's d3dcompiler_43, with some style
adjustments.
2023-10-18 20:58:22 +02:00
Conor McCarthy
4b7ca0c294
vkd3d-shader/dxil: Read DXIL global flags.
2023-10-17 22:18:25 +02:00
Conor McCarthy
06f8a88466
vkd3d-shader: Define more global flags.
2023-10-17 22:18:23 +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
cba3e18c45
vkd3d-shader/dxil: Read DXIL metadata values.
2023-10-12 18:23:31 +02:00
Conor McCarthy
a62343f544
vkd3d-shader/dxil: Read DXIL metadata strings.
2023-10-12 18:23:29 +02:00
Conor McCarthy
df4e1b7393
vkd3d-shader/dxil: Read immediate constant arrays.
2023-10-11 22:21:19 +02:00
Zebediah Figura
2bcd6ea893
vkd3d-shader: Introduce a separate register type for combined samplers.
2023-10-09 21:58:38 +02:00
Alistair Leslie-Hughes
71715cc434
vkd3d-shader: Fix compiler warning.
...
vkd3d-shader/tpf.c:3810:39: warning: passing argument 2 of ‘sm4_register_from_node’ from incompatible pointer type [-Wincompatible-pointer-types]
vkd3d-shader/tpf.c:4750:59: warning: passing argument 3 of ‘sm4_register_from_deref’ from incompatible pointer type [-Wincompatible-pointer-types]
Change to use uint32_t as requested.
2023-10-05 16:14:44 +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
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
Conor McCarthy
3249723972
vkd3d-shader/spirv: Introduce a Static Single Assignment register type.
2023-09-25 22:07:04 +02:00
Giovanni Mascellani
34b1c0fe5d
vkd3d-shader/ir: Validate source parameters.
2023-09-22 11:06:18 +02:00
Giovanni Mascellani
603170106c
vkd3d-shader/ir: Validate destination parameters.
2023-09-22 11:06:17 +02:00
Giovanni Mascellani
585e60ad3b
vkd3d-shader/ir: Validate register types.
2023-09-22 11:06:16 +02:00
Giovanni Mascellani
b09cfbda90
vkd3d-shader/ir: Validate instruction handlers.
2023-09-22 11:06:15 +02:00
Giovanni Mascellani
c052cd8998
vkd3d-shader/ir: Introduce a boilerplate to validate the generated IR.
...
For the moment the validator is trivial, it never fails. Checks will
be added incrementally.
2023-09-22 11:06:13 +02:00
Giovanni Mascellani
cf871d2cb2
vkd3d-shader: Embed the parsing location in vkd3d_shader_instruction.
...
So that it can be used for printing meaningful error locations by
downstream processors.
2023-09-22 11:06:12 +02:00
Giovanni Mascellani
05af25eecb
vkd3d-shader: Rename shader_instruction_init().
2023-09-22 11:06:05 +02:00
Conor McCarthy
e54f770669
vkd3d-shader/dxil: Implement the DXIL CALL instruction.
2023-08-30 22:48:48 +02:00
Conor McCarthy
58d6e44501
vkd3d-shader/dxil: Validate the function block count.
2023-08-30 22:48:45 +02:00
Zebediah Figura
9624e2f904
vkd3d-shader/spirv: Declare SRVs and UAVs from the descriptor info.
2023-08-28 20:40:02 +02:00
Conor McCarthy
61841e9423
vkd3d-shader/tpf: Handle the swizzle type bitfield in dst param tokens.
2023-08-28 20:39:49 +02:00
Conor McCarthy
92021b7a3c
vkd3d-shader/tpf: Use the default vec4 swizzle if a src param contains a mask.
2023-08-28 20:39:46 +02:00
Conor McCarthy
7e5d9e3b6f
vkd3d-shader/tpf: Handle the dimension bitfield in src param tokens.
2023-08-28 20:39:45 +02:00
Conor McCarthy
5c706152fa
vkd3d-shader/tpf: Validate the src register of case conditions.
...
Case values are constants in TPF.
2023-08-28 20:39:43 +02:00
Nikolay Sivov
1153f6bb34
vkd3d-shader/hlsl: Parse "if" statement attributes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-24 21:43:49 +02:00
Zebediah Figura
c1ebba9515
vkd3d-shader: Add structure stride to struct vkd3d_shader_descriptor_info1.
2023-08-23 22:45:04 +02:00
Zebediah Figura
88f85ffb50
vkd3d-shader: Add constant buffer size to struct vkd3d_shader_descriptor_info1.
2023-08-23 22:45:04 +02:00
Zebediah Figura
8c465c81cf
vkd3d-shader: Add sample count to struct vkd3d_shader_descriptor_info1.
2023-08-23 22:45:04 +02:00
Nikolay Sivov
932c5e36dc
vkd3d-shader/hlsl: Add constant folding for 'log2'.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-14 18:38:20 +02:00
Nikolay Sivov
58bc61e48d
vkd3d-shader/hlsl: Add constant folding for 'sqrt'.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-14 18:38:18 +02:00
Zebediah Figura
7d02922541
vkd3d-shader: Add register ID to struct vkd3d_shader_descriptor_info1.
2023-08-14 18:38:11 +02:00
Zebediah Figura
4e9798f6f7
vkd3d-shader: Introduce struct vkd3d_shader_scan_descriptor_info1.
2023-08-14 18:38:11 +02:00
Francisco Casas
2258e9d0f3
vkd3d-shader/tpf: Make register_type_table an array of structs with lookup tables.
2023-08-14 18:38:06 +02:00
Zebediah Figura
d932fba7c3
vkd3d-shader/spirv: Make output varyings not consumed by the next stage private variables.
2023-08-03 21:20:42 +09:00
Zebediah Figura
11475ef62a
vkd3d-shader: Implement remapping shader output registers to match the next shader's semantics.
2023-08-03 21:20:42 +09:00
Zebediah Figura
cb96482500
vkd3d-shader: Add a separate field for the target location of a signature element.
...
We want to be able to remap input signatures based on the signature index, but
signature normalization both reorders the signature, and requires the old
register index, so add a new field for this.
2023-08-03 21:20:39 +09:00
Conor McCarthy
402c93fa68
vkd3d-shader/spirv: Introduce an undefined register type.
2023-07-20 22:32:52 +02:00
Conor McCarthy
3e553aaaa7
vkd3d-shader/dxil: Emit the shader instructions.
...
Sufficient for compiling a no-op pixel shader.
2023-07-20 22:32:51 +02:00
Zebediah Figura
e9fb067d4c
vkd3d-shader/ir: Move normalization code from spirv.c to ir.c.
...
It is not spirv-specific and will (presumably) be used for GLSL as well.
2023-07-17 22:56:43 +02:00
Zebediah Figura
d077562f79
vkd3d-shader/d3dbc: Scan descriptors for constant register sets.
2023-07-17 22:56:39 +02:00
Conor McCarthy
5d33fb4633
vkd3d-shader/dxil: Read numeric constants.
2023-07-11 22:43:57 +02:00
Conor McCarthy
c96143abdc
vkd3d-shader/dxil: Read global function declarations.
2023-07-11 22:43:55 +02:00