Commit Graph

608 Commits

Author SHA1 Message Date
edc72fdefc vkd3d-shader/hlsl: Support semantics for array types. 2023-05-01 22:18:21 +02:00
a488889494 vkd3d-shader/hlsl: Don't create semantic vars more than once. 2023-05-01 22:18:20 +02:00
61c72a4fd1 vkd3d-shader/hlsl: Avoid invalid input/output copies for non-numeric types. 2023-05-01 22:18:17 +02:00
e5ec431784 vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_jump(). 2023-04-20 22:54:10 +02:00
dfe923ea1d vkd3d-shader: Consistently pass location structure by pointer. 2023-04-19 20:45:31 +02:00
7ee66351c8 vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_if(). 2023-04-18 21:59:49 +02:00
50f0ae1b21 vkd3d-shader/hlsl: Pass hlsl_block pointers to hlsl_new_if(). 2023-04-18 21:59:45 +02:00
5a3fe1609b vkd3d-shader/hlsl: Initialize the block in clone_block(). 2023-04-18 21:59:44 +02:00
dc7514afc9 vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_float_constant(). 2023-04-18 21:59:39 +02:00
b23ef3ca3b vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_cast() and hlsl_new_copy(). 2023-04-18 21:59:37 +02:00
1bf3aa9275 vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_bool_constant(). 2023-04-18 21:59:34 +02:00
0654d88edd vkd3d-shader/hlsl: Allow VPOS and VFACE to be specified in sm3 pixel shaders.
We were previously (accidentally) rejecting them because they didn't have a
usage.
2023-04-18 21:59:22 +02:00
5c285adc6b vkd3d-shader/hlsl: Use hlsl_ir_index for array and record access.
From this point on, it is no longer true that only hlsl_ir_loads can
return objects, because an object can also come from chain of
hlsl_ir_indexes that ends in an hlsl_ir_load.

The lower_index_loads pass takes care of lowering all hlsl_ir_indexes
into hlsl_ir_loads.

For this reason, hlsl_resource_load_params now expects both the resource
as the sampler to be just an hlsl_ir_node pointer instead of a pointer
to a more specific hlsl_ir_load.
2023-04-13 23:05:32 +02:00
741c9e5893 vkd3d-shader/hlsl: Introduce hlsl_ir_index.
This node type is intended for use during parse-time.

While we parse an indexing expression such as "a[3]", we don't know if
it will end up as part of an expression (in which case it must be folded
into a load) or it is for the lhs of a store (in which case it must be
folded into the store's deref).
2023-04-13 23:05:25 +02:00
1514755043 vkd3d-shader/hlsl: Make a string array const. 2023-04-06 17:52:07 +02:00
725d408974 vkd3d-shader/hlsl: Introduce an hlsl_block_init() helper. 2023-04-06 17:51:40 +02:00
1da5a9a490 vkd3d-shader/hlsl: Introduce an hlsl_block_add_block() helper. 2023-04-06 17:51:38 +02:00
ceac81b816 vkd3d-shader/hlsl: Introduce an hlsl_block_add_instr() helper. 2023-04-06 17:51:36 +02:00
f3e81327dc vkd3d-shader/hlsl: Consider register() as manual packing for resource fields. 2023-04-04 21:59:49 +02:00
60237cb773 vkd3d-shader/hlsl: Don't allow manual and automatic cbuffer offset packing. 2023-04-04 21:59:45 +02:00
4448d114ad vkd3d-shader/hlsl: Detect overlaps in cbuffer offsets. 2023-04-04 21:59:43 +02:00
7777c32cac vkd3d-shader/hlsl: Support packoffset(). 2023-04-04 21:59:42 +02:00
9b70971696 vkd3d-shader/hlsl: Rename struct hlsl_reg_reservation fields. 2023-04-04 21:59:39 +02:00
eb71c5f20d vkd3d-shader/hlsl: Handle round() for SM1. 2023-04-03 18:00:03 +02:00
7a9e393ea0 vkd3d-shader/hlsl: Rename the "type" field of struct hlsl_type to "class".
To be consistent with enum hlsl_type_class and HLSL_CLASS_*.
2023-04-03 17:59:24 +02:00