Giovanni Mascellani
5204b92fa0
vkd3d-shader/tpf: Remove a useless parameter to shader_sm4_init().
2024-03-11 22:09:28 +01:00
Zebediah Figura
9177df883e
vkd3d-shader/hlsl: Write the SFI0 section and "REQUIRES_ROVS" flag when ROVs are used.
2024-03-04 22:34:46 +01:00
Henri Verbeet
7029d821be
configure: Build with -Wtype-limits.
...
libs/vkd3d-shader/tpf.c: In function ‘write_sm4_unary_op_with_two_destinations’:
libs/vkd3d-shader/tpf.c:4489:24: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
assert(1 - dst_idx >= 0);
^~
libs/vkd3d-shader/tpf.c: In function ‘write_sm4_binary_op_with_two_destinations’:
libs/vkd3d-shader/tpf.c:4549:24: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
assert(1 - dst_idx >= 0);
^~
2024-02-22 22:46:22 +01:00
Henri Verbeet
d4223a03c8
vkd3d-shader/hlsl: Replace HLSL_MODIFIER_RASTERIZER_ORDERED with a hlsl_type.e.resource flag.
2024-02-21 23:23:08 +01:00
Henri Verbeet
49d14613a5
vkd3d-shader/hlsl: Introduce hlsl_type.e.resource.
2024-02-21 23:23:06 +01:00
Evan Tang
7b41abaa1b
vkd3d-shader/hlsl: Support SV_PrimitiveID in pixel shaders.
2024-02-19 21:12:23 +01:00
Francisco Casas
c249461e97
vkd3d-shader/hlsl: Parse Buffer types.
2024-02-19 21:11:55 +01:00
Evan Tang
ee867bd470
vkd3d-shader/hlsl: Parse rasteriser-ordered view types.
2024-02-15 23:29:46 +01:00
Henri Verbeet
d38221bd68
vkd3d-shader/ir: Pass a struct vsir_program to shader_parser_get_src_params().
2024-02-01 00:08:23 +01:00
Henri Verbeet
47ec24ebad
vkd3d-shader/ir: Pass a struct vsir_program to shader_parser_get_dst_params().
2024-02-01 00:08:22 +01:00
Giovanni Mascellani
1f536238a8
vkd3d-shader: Use 64 bit swizzles for 64 bit data types in VSIR.
...
The handling of write masks and swizzles for 64 bit data types is
currently irregular: write masks are always 64 bit, while swizzles
are usually 32 bit, except for SSA registers with are 64 bit.
With this change we always use 64 bit swizzles, in order to make
the situation less surprising and make it easier to convert
registers between SSA and TEMP.
64 bit swizzles are always required to have X in their last two
components.
2024-01-29 22:33:33 +01:00
Henri Verbeet
98c6e85b33
vkd3d-shader/ir: Store control point counts in struct vsir_program.
2024-01-23 20:27:32 +01:00
Giovanni Mascellani
dc56320b31
vkd3d-shader/tpf: Support SV_ViewportArrayIndex in pixel and vertex shaders.
2024-01-22 22:19:14 +01:00
Giovanni Mascellani
3a90f3e29d
vkd3d-shader/tpf: Support SV_InstanceID in vertex shaders.
2024-01-22 22:19:13 +01:00
Giovanni Mascellani
b500381b5c
vkd3d-shader/tpf: Support SV_RenderTargetArrayIndex in pixel and vertex shaders.
2024-01-22 22:19:12 +01:00
Henri Verbeet
adc02eada8
vkd3d-shader/ir: Store the temporary register count in struct vsir_program.
2024-01-22 22:18:53 +01:00
Henri Verbeet
23dcd4f22b
vkd3d-shader/ir: Store the shader version in struct vsir_program.
2024-01-22 22:18:50 +01:00
Henri Verbeet
fc9043be3c
vkd3d-shader/ir: Introduce struct vsir_program.
2024-01-22 22:18:48 +01:00
Conor McCarthy
c40093474e
vkd3d-shader/tpf: Validate sysvals in index range declarations.
2024-01-17 22:29:01 +01:00
Conor McCarthy
418e8d8100
vkd3d-shader/ir: Expand index range write masks to cover all element masks.
...
For example, this occurred in a shader:
reg_idx write_mask
0 xyz
1 xyzw
2 xyzw
3 xyz
The dcl_indexrange instruction covered only xyz, so once merged, searching for
xyzw failed.
It is impossible to declare an input array where elements have different
component counts, but the optimiser can create this case. One way for
this to occur is to dynamically index input values via a local array
containing copies of the input values. The optimiser converts this to
dynamically indexed inputs.
2024-01-17 22:28:56 +01:00
Conor McCarthy
559d9d4ee0
vkd3d-shader/ir: Include an initial label instruction in the first control flow block.
2024-01-17 22:28:41 +01:00
Conor McCarthy
b4b2b0d3ac
vkd3d-shader/spirv: Declare indexable temps as Private unless function scope is specified.
2024-01-17 22:28:39 +01:00
Henri Verbeet
68b898fcb6
vkd3d-shader/tpf: Store the "precise" mask as a uint32_t in shader_sm4_read_instruction().
2024-01-15 19:58:22 +01:00
Henri Verbeet
ad2af68d2a
vkd3d-shader/tpf: Store the "recognized_bits" mask as a uint32_t in shader_sm4_read_instruction_modifier().
2024-01-15 19:58:21 +01:00
Henri Verbeet
b8903f5526
vkd3d-shader/tpf: Store the current token as a uint32_t in shader_sm4_read_dst_param().
2024-01-15 19:58:20 +01:00
Henri Verbeet
fd854bc0c0
vkd3d-shader/tpf: Store the current token as a uint32_t in shader_sm4_read_src_param().
2024-01-15 19:58:19 +01:00
Henri Verbeet
c5facd4e03
vkd3d-shader/tpf: Store the "addressing" token as a uint32_t in shader_sm4_read_param().
2024-01-15 19:58:18 +01:00
Henri Verbeet
b1c538e0fe
vkd3d-shader/tpf: Store the "components" token as a uint32_t in shader_sm4_read_dcl_resource().
2024-01-15 19:58:17 +01:00
Henri Verbeet
9896394220
vkd3d-shader/tpf: Pass a uint32_t modifier token to shader_sm4_read_instruction_modifier().
2024-01-15 19:58:15 +01:00
Giovanni Mascellani
78d95889bd
vkd3d-shader: Make *src and *dst mutable in vkd3d_shader_instruction.
...
They were originally made const because no optimization/normalization
pass existed. Now having to cast away const all the time is becoming
more and more burdening.
2024-01-11 23:05:11 +01:00
Henri Verbeet
60842b7181
vkd3d-shader/ir: Store source parameter swizzles as a uint32_t.
2024-01-04 22:23:51 +01:00
Henri Verbeet
e33d3b3954
vkd3d-shader/ir: Rename the "immconst_uint" field of struct vkd3d_shader_register to "immconst_u32".
...
For consistency with the rest of vkd3d-shader; e.g. put_u32() and
read_u32().
2024-01-03 22:37:39 +01:00
Henri Verbeet
8a1de71fb1
vkd3d-shader/ir: Pass a uint32_t swizzle to vkd3d_swizzle_get_component().
2023-12-14 23:19:49 +01:00
Henri Verbeet
3759186193
vkd3d-shader/ir: Pass a uint32_t write mask to vkd3d_write_mask_64_from_32().
2023-12-13 22:33:06 +01:00
Henri Verbeet
713adaa56a
vkd3d-shader/ir: Pass a uint32_t write mask to vkd3d_write_mask_component_count().
2023-12-13 22:33:04 +01:00
Zebediah Figura
cabf9996f9
vkd3d-shader/tpf: Do not uninvert used masks for domain shader patch constants.
2023-12-11 23:18:42 +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
Nikolay Sivov
6a4a9a4518
vkd3d-shader/hlsl: Handle 'linear centroid' modifier.
2023-11-28 00:10:12 +01:00
Zebediah Figura
10957bebbf
vkd3d-shader/tpf: Remove an unnecessary local variable declaration.
...
Found with -Wshadow.
2023-11-28 00:09:56 +01:00
Conor McCarthy
85d5f83fb7
vkd3d-shader/dxil: Implement default address space global variables.
2023-11-22 22:07:54 +01:00
Nikolay Sivov
88caf87789
vkd3d-shader/hlsl: Add a helper to check for a numeric type.
2023-11-15 21:48:49 +01:00
Henri Verbeet
215a2c4ede
vkd3d-shader/ir: Introduce vsir_register_is_descriptor().
2023-11-13 23:19:10 +01:00
Conor McCarthy
22960753e9
vkd3d-shader/spirv: Introduce orderedness to comparison instructions.
2023-11-10 20:23:51 +01:00
Nikolay Sivov
dd6a9135f4
vkd3d-shader/hlsl: Implement tex2Dproj().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-10 20:23:41 +01:00
Nikolay Sivov
494f681bf6
vkd3d-shader/tpf: Add support for ceil().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:38 +01:00
Zebediah Figura
0058764f01
vkd3d-shader: Store the control point counts in struct vkd3d_shader_desc.
2023-11-07 22:26:49 +01:00
Francisco Casas
0ef25ad137
vkd3d-shader/tpf: Support relative addressing for indexable temps in SM4.
...
For relative addressing, the vkd3d_shader_registers must point to
another vkd3d_shader_src_param. For now, use the sm4_instruction to save
them, since the only purpose of this struct is to be used as paramter
for write_sm4_instruction.
2023-11-07 22:25:49 +01:00
Francisco Casas
281796c526
vkd3d-shader/tpf: Move sm4_register_from_node() up.
2023-11-07 22:25:48 +01:00
Francisco Casas
e10d41d799
vkd3d-shader/tpf: Support writing relative addressing indexes.
2023-11-07 22:25:47 +01:00