Commit Graph

949 Commits

Author SHA1 Message Date
Giovanni Mascellani
ada09d003d vkd3d-shader/ir: Repurpose IDIV to compute plain signed division.
It doesn't compute signed remainder any more.
2025-06-25 16:39:50 +02:00
Giovanni Mascellani
823a8724de vkd3d-shader/ir: Introduce VSIR_OP_IREM.
It is meant to compute the signed integer remainder.
2025-06-25 16:38:38 +02:00
Henri Verbeet
d219cccc99 vkd3d-shader/ir: Rename the VKD3DSIH_* enum elements to VSIR_OP_*. 2025-06-25 15:53:41 +02:00
Giovanni Mascellani
31581b0002 vkd3d-shader/ir: Lower IMUL and UMUL to IMUL_LOW. 2025-06-24 15:21:13 +02:00
Giovanni Mascellani
4a39db797b vkd3d-shader/ir: Introduce VKD3DSIH_IMUL_LOW.
It is meant to compute the lower word of an integer multiplication.
2025-06-24 15:15:56 +02:00
Henri Verbeet
e5bf48a2ba vkd3d-shader/spirv: Do not require VKD3D_SHADER_BINDING_FLAG_IMAGE for sampler descriptors. 2025-06-23 18:00:10 +02:00
Giovanni Mascellani
93e1a8c784 vkd3d-shader/ir: Lower tpf SINCOS to the new COS and SIN instructions. 2025-06-19 20:33:09 +02:00
Giovanni Mascellani
6f092fb84a vkd3d-shader/ir: Introduce opcode SIN.
It is meant to compute sine.
2025-06-19 20:32:50 +02:00
Giovanni Mascellani
322f2e5496 vkd3d-shader/ir: Introduce opcode COS.
It is meant to compute cosine, and gradually replace SINCOS, at
least from a certain point in the pipeline on.
2025-06-19 20:32:41 +02:00
Henri Verbeet
cef3e07e3d vkd3d-shader/spirv: Emit an OpSource instruction with the source name. 2025-06-18 15:50:18 +02:00
Henri Verbeet
eb988e95e1 vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_emit_alu_instruction(). 2025-06-16 16:01:14 +02:00
Henri Verbeet
f46c8ea03c vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_emit_ext_glsl_instruction(). 2025-06-16 16:01:14 +02:00
Henri Verbeet
81279b763b vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_emit_bitfield_instruction(). 2025-06-16 16:01:14 +02:00
Henri Verbeet
0778fb93df vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_emit_comparison_instruction(). 2025-06-16 16:01:14 +02:00
Henri Verbeet
616fea0c2b vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_emit_deriv_instruction(). 2025-06-16 16:01:14 +02:00
Henri Verbeet
8eeefc2906 vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_emit_sample(). 2025-06-11 20:28:38 +02:00
Henri Verbeet
d92ef93611 vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_emit_atomic_instruction(). 2025-06-11 20:28:38 +02:00
Henri Verbeet
6aeb168d63 vkd3d-shader/spirv: Use vsir_opcode_get_name() in spirv_compiler_handle_instruction(). 2025-06-11 20:28:38 +02:00
Giovanni Mascellani
5e86d5c21b vkd3d-shader/dxil: Emit 16-bit arrays as minimum precision types.
The type is not explicitly annotated as minimum precision, because
no backend currently cares about that bit anyway. We're still
relying on the fact that in SM 6.0 16-bit types are always
understood as minimum precision.
2025-06-11 18:20:20 +02:00
Giovanni Mascellani
1d780e1a6b vkd3d-shader/dxil: Emit 16-bit CONSTANT values as minimum precision registers. 2025-06-11 18:10:12 +02:00
Henri Verbeet
7929ba9747 vkd3d-shader: Move vkd3d_siv_from_sysval_indexed() to hlsl_codegen.c. 2025-06-02 20:10:46 +02:00
Henri Verbeet
e17a98f870 vkd3d-shader: Remove some newlines from vkd3d-shader error messages. 2025-05-27 17:12:13 +02:00
Henri Verbeet
a93d258a86 Release 1.16. 2025-05-20 11:35:48 +02:00
Elizabeth Figura
8f6616993b vkd3d-shader/spirv: Do not declare inputs with an empty used_mask.
This is motivated by SampleId, whose presence or absence determines whether a
fragment shader runs at sample frequency or not.

In HLSL, if SV_SampleIndex is declared but not used, this results in a signature
entry, but no dcl instruction (and a zero used mask in the signature entry).
Whether the shader will actually run at sample frequency is inconsistent. NVidia
does, AMD does not, and WARP does for d3d12 but not for d3d11.

Previously vkd3d-shader relied on the dcl instruction, thereby aligning with
AMD. This was changed by 66cb2815f0. This commit
restores the previous behaviour.
2025-05-14 14:09:28 +02:00
Elizabeth Figura
65e1ef047f vkd3d-shader/spirv: Return void from spirv_compiler_emit_input(). 2025-05-14 14:09:28 +02:00