Giovanni Mascellani
f2b2040ff6
vkd3d-shader/ir: Sort loop intervals.
2024-03-12 22:14:47 +01:00
Giovanni Mascellani
070c4af8b3
vkd3d-shader/ir: Generate synthetic intervals for forward edges.
2024-03-12 22:14:46 +01:00
Giovanni Mascellani
1d60612340
vkd3d-shader/ir: Compute loop as intervals of the block order.
2024-03-12 22:14:45 +01:00
Nikolay Sivov
30cc6ceb44
vkd3d-shader/fx: Add support for writing shared object descriptions for fx_4_x.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:41 +01:00
Nikolay Sivov
13227f3852
vkd3d-shader: Add an option to enable child effects compilation.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:41 +01:00
Nikolay Sivov
7f1fdd447c
vkd3d-shader/fx: Add initial support for writing uninitialized vertex/pixel shader objects.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:40 +01:00
Evan Tang
03a80cde2e
vkd3d: Enable VK_EXT_fragment_shader_interlock if available.
2024-03-11 22:10:25 +01:00
Henri Verbeet
038764985a
vkd3d-shader/glsl: Use location information from the current instruction.
2024-03-11 22:10:21 +01:00
Conor McCarthy
4f0e5b9069
vkd3d-shader/dxil: Support 16-bit types.
2024-03-11 22:10:06 +01:00
Conor McCarthy
066ea75945
vkd3d-shader/spirv: Introduce HALF and UINT16 types for minimum precision.
...
Minimum precision types must always be implemented as 32-bit to match how
reduced precision works in SPIR-V.
2024-03-11 22:10:05 +01:00
Conor McCarthy
58123c2e10
vkd3d-shader/spirv: Introduce a data_type_is_floating_point() helper function.
2024-03-11 22:10:03 +01:00
Nikolay Sivov
25d353db91
vkd3d-shader/d3dbc: Do not write semantic declarations for unused variables.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55829
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56402
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-11 22:09:55 +01:00
Zebediah Figura
ad495970e0
vkd3d-shader/spirv: Implement SLT and SGE.
2024-03-11 22:09:48 +01:00
Zebediah Figura
27196d8b0f
vkd3d-shader/spirv: Implement CMP.
2024-03-11 22:09:44 +01:00
Francisco Casas
cfac67ccc2
vkd3d-shader/hlsl: Cast slt before multiplying on ternary operator.
...
Otherwise we may get a failing
"hlsl_types_are_equal(arg1->data_type, arg2->data_type)"
assertion on hlsl_new_binary_expr() when creating the MUL.
This happens in the test introducing in the following patch:
int a, b, c;
void main(out float4 res : COLOR1, in float4 pos : position, out float4 out_pos : sv_position)
{
out_pos = pos;
res = a ? b/1000.0 : c/1000.0;
}
2024-03-11 22:09:42 +01:00
Giovanni Mascellani
1690b0b554
vkd3d-shader: Remove the bytecode fields from vkd3d_shader_desc.
2024-03-11 22:09:32 +01:00
Giovanni Mascellani
204c8afb9c
vkd3d-shader/dxbc: Remove flag is_dxil.
...
The full shader profile is already available in vsir_program.
2024-03-11 22:09:31 +01:00
Giovanni Mascellani
470d83a9da
vkd3d-shader: Move shader signatures to vsir_program.
2024-03-11 22:09:31 +01:00
Giovanni Mascellani
56dc0c9842
vkd3d-shader/dxbc: Decouple vkd3d_shader_desc from DXBC parsing.
2024-03-11 22:09:30 +01:00
Giovanni Mascellani
5204b92fa0
vkd3d-shader/tpf: Remove a useless parameter to shader_sm4_init().
2024-03-11 22:09:28 +01:00
Conor McCarthy
7b4b0143bd
vkd3d-shader/dxil: Implement DX intrinsic TextureGatherCmp.
2024-03-11 22:09:20 +01:00
Conor McCarthy
5a6fd010ac
vkd3d-shader/dxil: Implement DX intrinsic TextureGather.
2024-03-11 22:09:18 +01:00
Giovanni Mascellani
75bc68962d
vkd3d-shader/dxbc: Add flag to ignore the DXBC checksum.
2024-03-11 22:08:55 +01:00
Giovanni Mascellani
23259263cf
vkd3d-shader/d3d-asm: Only emit signatures for SM4-6.
2024-03-08 23:36:44 +01:00
Henri Verbeet
1fc55d80cd
vkd3d-shader: Enable GLSL target support when VKD3D_SHADER_UNSUPPORTED_GLSL is defined.
2024-03-08 23:36:40 +01:00
Evan Tang
4553b2a0dc
vkd3d-shader/spirv: Implement support for rasteriser-ordered views.
...
Using SPV_EXT_fragment_shader_interlock.
2024-03-08 23:36:35 +01:00
Giovanni Mascellani
21f76257b0
vkd3d-shader/d3d-asm: Print labels in red.
...
They are substantially different from any other register type, so
it makes sense to have them stand out. Also, they help segmenting
visually the code into blocks, because labels are usually found
either at the beginning or at the end of a block.
2024-03-08 23:36:25 +01:00
Conor McCarthy
e65055b435
vkd3d-shader/spirv: Handle the ORD and UNO instructions.
2024-03-08 23:36:14 +01:00
Conor McCarthy
f212aad0ff
vkd3d-shader/dxil: Support FCMP_ORD and FCMP_UNO for CMP2.
2024-03-08 23:36:13 +01:00
Conor McCarthy
4dafd6bedf
vkd3d: Implement GetCopyableFootprints1().
2024-03-08 23:36:08 +01:00
Conor McCarthy
197f16efa9
vkd3d: Implement CreatePlacedResource1().
2024-03-08 23:36:08 +01:00
Conor McCarthy
e5ae6bd3c2
vkd3d: Implement CreateCommittedResource2().
2024-03-08 23:36:08 +01:00
Conor McCarthy
6edba86a26
vkd3d: Implement GetResourceAllocationInfo2().
2024-03-08 23:36:08 +01:00
Conor McCarthy
7d2c274b9b
vkd3d: Add ID3D12Device8 interface stubs.
2024-03-08 23:36:02 +01:00
Giovanni Mascellani
172e7edf2d
vkd3d-shader: Refactor common code for vkd3d_shader_compile().
2024-03-08 23:35:54 +01:00
Giovanni Mascellani
0e5d6a97cc
vkd3d-shader: Refactor common code for vkd3d_shader_scan().
2024-03-08 23:35:54 +01:00
Giovanni Mascellani
bbd37a76fc
vkd3d-shader: Treat the HLSL case specially in vkd3d_shader_compile().
2024-03-08 23:35:54 +01:00
Giovanni Mascellani
3a1c32acd4
vkd3d-shader: Treat the HLSL case specially in vkd3d_shader_scan().
...
The other cases are similar and common code can be refactored.
Ideally the HLSL parser will eventually fit the same model, but that
will require more extensive work.
2024-03-08 23:35:53 +01:00
Giovanni Mascellani
b940d79aa8
vkd3d-shader/ir: Keep loops contiguous in the topological sort.
2024-03-08 23:35:48 +01:00
Giovanni Mascellani
cf9a023566
vkd3d-shader/ir: Dump the topological order of the control flow graph.
2024-03-08 23:35:47 +01:00
Giovanni Mascellani
ed40646c8a
vkd3d-shader/ir: Topologically sort the control flow graph.
2024-03-08 23:35:46 +01:00
Giovanni Mascellani
880d781b57
vkd3d-shader/ir: Allow adding to a block list without checking for duplicates.
2024-03-08 23:35:45 +01:00
Nikolay Sivov
75c019074a
vkd3d-shader/hlsl: Allow modifiers on buffer declarations.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-08 23:35:40 +01:00
Nikolay Sivov
b13d60d805
vkd3d-shader/hlsl: Add determinant() function.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-08 23:35:23 +01:00
Giovanni Mascellani
8723b5d266
vkd3d-shader/ir: Sort each loop by block label.
2024-03-07 23:08:36 +01:00
Giovanni Mascellani
3d4092d9dc
vkd3d-shader/ir: Dump the loops in the control flow graph.
2024-03-07 23:08:35 +01:00
Giovanni Mascellani
8241ca2b67
vkd3d-shader/ir: Keep track of loops by header block.
2024-03-07 23:08:34 +01:00
Giovanni Mascellani
088a6c49a2
vkd3d-shader/ir: Keep a reference to the message context inside struct vsir_cfg.
2024-03-07 23:08:33 +01:00
Giovanni Mascellani
9ac842b36b
vkd3d-shader/ir: Compute the loops in the control flow graph.
2024-03-07 23:08:32 +01:00
Giovanni Mascellani
de15f55477
vkd3d-shader/ir: Introduce a helper to express block domination.
2024-03-07 23:08:31 +01:00