Commit Graph

3743 Commits

Author SHA1 Message Date
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
Giovanni Mascellani
c3657c4799 vkd3d-shader/ir: Add a debug buffer to struct vsir_cfg. 2024-03-07 23:08:30 +01:00
Giovanni Mascellani
c5893288d9 vkd3d-shader/ir: Properly handle function-local indexable temps when flattening control flow.
They have to be considered code rather than declarations, as required
for instance by the SPIR-V backend.
2024-03-07 23:08:28 +01:00
Giovanni Mascellani
9aa86901e3 vkd3d-shader/d3d-asm: Support emitting the shader signature. 2024-03-07 23:08:24 +01:00
Giovanni Mascellani
01a687a7fc vkd3d-shader/d3d-asm: Refactor dumping a write mask to a dedicated function. 2024-03-07 23:08:23 +01:00
Giovanni Mascellani
9d99389663 vkd3d-shader/d3d-asm: Describe the ASM dialect with a bunch of flags instead of a plain enum. 2024-03-07 23:08:22 +01:00
Giovanni Mascellani
94d641783b vkd3d-shader/d3d-asm: Do not make a copy of the buffer before returning it. 2024-03-07 23:08:20 +01:00
Nikolay Sivov
a0d52dc385 vkd3d-shader/hlsl: Improve VertexShader/PixelShader types handling.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:25 +01:00
Nikolay Sivov
437ef0896f vkd3d-shader/fx: Make sure to set error message for unimplemented cases.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:22 +01:00
Nikolay Sivov
8c5db57ea7 vkd3d-shader/fx: Reject fx_2_0 output without techniques.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:19 +01:00
Nikolay Sivov
dd5e42d347 vkd3d-shader/hlsl: Allow technique10 {} blocks for fx_2_0.
Such techniques are ignored later, but do not cause compilation errors.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:18 +01:00
Nikolay Sivov
5edbccd33b vkd3d-shader/hlsl: Add keyword tokens for fx_5_0 shader object types.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:16 +01:00
Conor McCarthy
5082893e5d vkd3d-shader/spirv: Always use a 64-bit write mask for IMMCONST64 src params.
There is no way to tell in spirv_compiler_emit_load_reg() if the write
mask is 64-bit. All loads are 32-bit except for IMMCONST64 and SSA, and
the latter ignores the mask, so the only issue lies with IMMCONST64.
2024-03-06 23:04:12 +01:00
Francisco Casas
58c456ff2b vkd3d-shader/d3dbc: Implement bool to float cast as MOV.
In SM1, bools are always represented as either 0.0f or 1.0f at runtime.
2024-03-06 23:04:07 +01:00
Francisco Casas
747511131d vkd3d-shader/hlsl: Lower non-float operators for SM1. 2024-03-06 23:04:05 +01:00
Francisco Casas
a3319339e4 vkd3d-shader/hlsl: Lower casts to int using REINTERPRET instead.
I realized that it is better to lower casts to int to FLOOR+REINTERPET
instead of appending a FLOOR to all casts to int and assuming that this
is the case for all of them in d3dbc.c.

This in case we introduce new passes in the future that add casts that
we forget to lower, after the lower_casts_to_bool pass.
2024-03-06 23:04:04 +01:00
Nikolay Sivov
937d76507d vkd3d-shader/hlsl: Implement ternary operator for older vertex profiles.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56333
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:03:59 +01:00
Henri Verbeet
f866fb95ad Release 1.11. 2024-03-05 20:39:45 +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
0914561f85 vkd3d: Store a D3D12_RESOURCE_DESC structure in struct vkd3d_image_resource_create_info.
Like we did before commit 6d4782ed7f. That
commit somehow managed to change the "desc" field from
D3D12_RESOURCE_DESC to D3D12_RESOURCE_DESC1, but that breaks the ABI.
2024-02-26 23:04:05 +01:00
Victor Chiletto
7e27ae73af vkd3d-shader/hlsl: Fix hlsl_ir_resource_store::resource cleanup. 2024-02-26 23:03:51 +01:00
Conor McCarthy
c083b1d0fc vkd3d-shader/dxil: Implement DX intrinsic GetDimensions. 2024-02-26 23:03:48 +01:00
Conor McCarthy
292bbdefbf vkd3d-shader/dxil: Move the resource kind helper functions up. 2024-02-26 23:03:46 +01:00