Commit Graph

3969 Commits

Author SHA1 Message Date
Conor McCarthy
3205e08fb1 vkd3d-shader/dxil: Support SV_Depth, SV_DepthGreaterEqual and SV_DepthLessEqual. 2024-04-19 22:23:43 +02:00
Giovanni Mascellani
296edf0d68 vkd3d-utils: Make all extensions optional in D3D12CreateDeviceVKD3D().
A D3D12 device can be useful even without a surface and swapchain.
On the other hand, just having the surface and swapchain extensions
doesn't give any feature (the client still has to manage them), so
there is no point in making them a requirement.
2024-04-19 22:23:28 +02:00
Zebediah Figura
171e097268 vkd3d-shader/hlsl: Make HLSL_TYPE_UAV into a separate class. 2024-04-19 22:23:20 +02:00
Zebediah Figura
93d7cd1785 vkd3d-shader/hlsl: Make HLSL_TYPE_TEXTURE into a separate class. 2024-04-19 22:23:19 +02:00
Zebediah Figura
220362cbad vkd3d-shader/hlsl: Make HLSL_TYPE_SAMPLER into a separate class. 2024-04-19 22:23:18 +02:00
Zebediah Figura
f57db442b0 vkd3d-shader/hlsl: Make HLSL_TYPE_STRING into a separate class. 2024-04-19 22:23:16 +02:00
Zebediah Figura
cdcf2da2eb vkd3d-shader/hlsl: Make HLSL_TYPE_VOID into a separate class. 2024-04-19 22:23:14 +02:00
Henri Verbeet
e17e481130 vkd3d-shader/glsl: Call vkd3d_shader_normalise(). 2024-04-17 22:52:20 +02:00
Henri Verbeet
c7fc60a237 vkd3d: Avoid leaking "messages" when "error_blob" is NULL in vkd3d_serialize_versioned_root_signature(). (Valgrind). 2024-04-17 22:52:07 +02:00
Henri Verbeet
8a7cb0295a vkd3d: Avoid leaking "messages" when "error_blob" is NULL in vkd3d_serialize_root_signature(). (Valgrind). 2024-04-17 22:52:05 +02:00
Conor McCarthy
742288127f vkd3d: Support DXGI_FORMAT_B4G4R4A4_UNORM. 2024-04-17 22:51:57 +02:00
Conor McCarthy
8879521679 vkd3d: Support DXGI_FORMAT_B5G5R5A1_UNORM. 2024-04-17 22:51:57 +02:00
Conor McCarthy
4cdf38d392 vkd3d: Support DXGI_FORMAT_B5G6R5_UNORM. 2024-04-17 22:51:57 +02:00
Conor McCarthy
270aa22d0b vkd3d: Use Vulkan 1.1 if available. 2024-04-17 22:51:51 +02:00
Conor McCarthy
6975a8d726 vkd3d-shader: Introduce SPIRV_ENVIRONMENT_VULKAN_1_1.
The SPIR-V backend may emit SPIR-V 1.3 if Vulkan 1.1 is available.
Some extensions which provide wave op instructions are available in
SPIR-V 1.0, but these are not sufficient to implement all Shader Model 6
wave op intrinsics. SPIR-V 1.3 has all of the required instructions, but
does not support reading from a quad at a non-constant (but uniform) lane
index, so it may later prove necessary to introduce a Vulkan 1.2
environment.
2024-04-17 22:51:49 +02:00
Conor McCarthy
a7870e1793 vkd3d-shader/spirv: Emit a compiler warning if an atomic op is flagged volatile. 2024-04-17 22:51:43 +02:00
Conor McCarthy
d9f42b2c51 vkd3d-shader/dxil: Implement the DXIL CMPXCHG instruction. 2024-04-17 22:51:41 +02:00
Conor McCarthy
99996ed5b5 vkd3d-shader/dxil: Implement DX intrinsic RenderTargetGetSampleCount. 2024-04-17 22:51:34 +02:00
Conor McCarthy
fe5e821cca vkd3d-shader/dxil: Implement DX intrinsics Texture2DMSGetSamplePosition and RenderTargetGetSamplePosition. 2024-04-17 22:51:32 +02:00
Henri Verbeet
1d6c3eae78 vkd3d-shader/ir: Remove VKD3DSIH_DCL_CONSTANT_BUFFER instructions. 2024-04-16 22:18:52 +02:00
Henri Verbeet
8a9364c124 vkd3d-shader/d3d-asm: Get rid of shader_addline(). 2024-04-16 22:18:44 +02:00
Giovanni Mascellani
a359c42795 vkd3d-shader/ir: Only emit launchers when needed. 2024-04-16 22:18:33 +02:00
Giovanni Mascellani
df4731dc17 vkd3d-shader/ir: Only emit trampolines when needed. 2024-04-16 22:18:26 +02:00
Giovanni Mascellani
d6ba8b88fa vkd3d-shader/ir: Swap selection branches if the if branch is empty. 2024-04-16 22:18:25 +02:00
Conor McCarthy
0515482e82 vkd3d-shader/ir: Validate tessellation declarations. 2024-04-16 22:18:18 +02:00
Conor McCarthy
e1abf1e48a vkd3d-shader/dxil: Implement DX intrinsic PrimitiveID. 2024-04-16 22:18:17 +02:00
Conor McCarthy
54016b3ced vkd3d-shader/dxil: Load hull shader properties. 2024-04-16 22:18:15 +02:00
Conor McCarthy
02cbc511bb vkd3d-shader/dxil: Load domain shader properties. 2024-04-16 22:18:14 +02:00
Henri Verbeet
7d6f0f2592 vkd3d: Implement creating compute pipeline states from shaders with embedded root signatures. 2024-04-15 21:34:09 +02:00
Henri Verbeet
b8eadf4bab vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_interpolation_mode(). 2024-04-15 21:33:58 +02:00
Henri Verbeet
1ad524072d vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_primitive_type(). 2024-04-15 21:33:57 +02:00
Henri Verbeet
7d72accce2 vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_decl_usage(). 2024-04-15 21:33:56 +02:00
Henri Verbeet
4d8c966ff4 vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_shader_input_sysval_semantic(). 2024-04-15 21:33:55 +02:00
Henri Verbeet
37401fa11c vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_reg_type(). 2024-04-15 21:33:54 +02:00
Henri Verbeet
7c66c9122d vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_register(). 2024-04-15 21:33:52 +02:00
Conor McCarthy
23db066922 vkd3d-shader/ir: Implement MAD in two operations if flagged as precise.
With some changes by Giovanni Mascellani.
2024-04-15 21:33:35 +02:00
Giovanni Mascellani
9112a5be58 vkd3d-shader/ir: Move DCL_TEMPS removal to the generic instruction lowering pass. 2024-04-15 21:33:34 +02:00
Giovanni Mascellani
8a17a5a08b vkd3d-shader/ir: Introduce vsir_program_lower_instructions().
It is meant as generic pass to host all program changes to single
instructions that do not require keeping a global state, intstead
of having to loop through the whole program many times.
2024-04-15 21:33:32 +02:00
Giovanni Mascellani
a7dc6dcce2 vkd3d-shader/ir: Split handling jumps when emitting a structured program. 2024-04-15 21:33:28 +02:00
Giovanni Mascellani
1a8a4c7787 vkd3d-shader/ir: Split handling selections when emitting a structured program. 2024-04-15 21:33:26 +02:00
Giovanni Mascellani
052df4d693 vkd3d-shader/ir: Split handling loops when emitting a structured program. 2024-04-15 21:33:16 +02:00
Giovanni Mascellani
5e42f6779a vkd3d-shader/ir: Split handling blocks when emitting a structured program. 2024-04-15 21:33:15 +02:00
Giovanni Mascellani
b4cfc24f67 vkd3d-shader/ir: Refactor declaration emission outside of the CFG structure.
This is in preparation of handling more than one function (as
it happens for Hull Shaders), which will require having a single
row of declarations, but handling more than one CFG.
2024-04-15 21:33:14 +02:00
Giovanni Mascellani
27801e5612 vkd3d-shader/ir: Split undominated SSA materialization. 2024-04-15 21:33:13 +02:00
Giovanni Mascellani
d891ac5017 vkd3d-shader/ir: Split program structurization. 2024-04-15 21:33:12 +02:00
Giovanni Mascellani
eb15f97083 vkd3d-shader/ir: Move breaks out of selections again after having optimized loops. 2024-04-15 21:33:08 +02:00
Giovanni Mascellani
be7eec75dc vkd3d-shader/ir: Append code to the non-breaking branch if there is breaking one. 2024-04-15 21:33:07 +02:00
Giovanni Mascellani
a2c6b5450b vkd3d-shader/ir: Prepare for changing the destination list in vsir_cfg_optimize_recurse(). 2024-04-15 21:33:05 +02:00
Petrichor Park
1fb9e7526b vkd3d-shader/hlsl: Implement tanh. 2024-04-15 21:32:59 +02:00
Petrichor Park
c4182cc272 vkd3d-shader/hlsl: Implement hyperbolic sin and cos. 2024-04-15 21:32:56 +02:00