Francisco Casas
45f18a7838
vkd3d-shader/hlsl: Parse the shader 'compile' syntax.
...
The hlsl_ir_compile node is introduced to represent the "compile"
syntax, and later the CompileShader() and ConstructGSWithSO()
constructs.
It basically represents a function call that remembers its arguments
using hlsl_srcs and keeps its own instruction block, which is discarded
when working on non-effect shaders.
For shader compilations it can be asserted that args_count is 1, and
that this argument (and the last node in hlsl_ir_effect_call.instrs)
is a regular hlsl_ir_call pointing to the declaration of the function
to be compiled.
2024-09-04 17:58:56 +02:00
Francisco Casas
23e3ec84f7
vkd3d-shader/hlsl: Save hlsl_ir_constants in the vsir_program for SM1.
2024-09-04 17:51:30 +02:00
Francisco Casas
a61846c28a
vkd3d-shader/hlsl: Store SM1 sampler dcls on the vsir_program.
2024-09-04 17:47:47 +02:00
Francisco Casas
9a564872c5
vkd3d-shader/hlsl: Store SM1 constant dcls on the vsir_program.
2024-09-04 17:44:46 +02:00
Giovanni Mascellani
527966580e
vkd3d-shader: Dump the converted shader too.
2024-08-29 19:17:07 +02:00
Giovanni Mascellani
1a0d6a4db4
vkd3d-shader: Use a hash to build the filename when dumping shaders.
...
This way the same shader is always dumped to the same path and when
launching the same program over and over we avoid both creating new
copies of the same file each time and overwriting different dumped
shaders.
2024-08-29 19:14:27 +02:00
Henri Verbeet
114578fc8a
vkd3d-shader/fx: Replace assert() with VKD3D_ASSERT().
2024-08-13 21:20:28 +02:00
Giovanni Mascellani
8b6ab9627d
vkd3d-shader: Replace assert() with VKD3D_ASSERT() in vkd3d_shader_private.h.
2024-08-08 23:39:23 +02:00
Elizabeth Figura
f6dd6d52b3
vkd3d-shader: Factor out a vsir_program_get_parameter() helper.
2024-07-23 21:10:00 +02:00
Elizabeth Figura
806363b765
vkd3d-shader: Allow controlling alpha test through vkd3d-shader parameters.
2024-07-11 17:02:11 +02:00
Elizabeth Figura
98def3214b
vkd3d-shader: Introduce struct vkd3d_shader_parameter_info and struct vkd3d_shader_parameter1.
...
As the newly added documentation describes, this reroll serves two purposes:
* to allow shader parameters to be used for any target type (which allows using
parameters for things like Direct3D 8-9 alpha test),
* to allow the union in struct vkd3d_shader_parameter to contain types larger
than 32 bits (by specifying them indirectly through a pointer).
2024-07-11 16:48:09 +02:00
Victor Chiletto
2034a8bab9
vkd3d-shader/hlsl: Implement loop unrolling.
...
Based on a patch by Nikolay Sivov.
Co-authored-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-11 00:32:53 +02:00
Francisco Casas
60c8a813a3
vkd3d-shader/hlsl: Validate state block function calls.
2024-07-09 20:38:08 +02:00
Nikolay Sivov
a289393fe7
vkd3d-shader/asm: Output 'bias' flag for 'texld'.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-06-11 15:50:34 +02:00
Conor McCarthy
0b8b5b2d0f
vkd3d-shader/dxil: Implement DX intrinsic QuadReadLaneAt.
2024-06-11 15:48:21 +02:00
Conor McCarthy
8a15642f45
vkd3d-shader/dxil: Implement DX intrinsic QuadOp.
2024-06-11 15:48:21 +02:00
Henri Verbeet
1fe7a6581b
vkd3d-shader/ir: Rename the "handler_idx" field of struct vkd3d_shader_instruction to "opcode".
2024-05-30 19:57:01 +02:00
Henri Verbeet
ce6f8a6a30
vkd3d-shader/dxil: Parse the shader into a vsir program in vkd3d_shader_sm6_parser_create().
2024-05-16 21:49:40 +02:00
Henri Verbeet
6474e8cc7b
vkd3d-shader/tpf: Parse the shader into a vsir program in vkd3d_shader_sm4_parser_create().
2024-05-16 21:49:39 +02:00
Henri Verbeet
402b96ef3b
vkd3d-shader/d3dbc: Parse the shader into a vsir program in vkd3d_shader_sm1_parser_create().
2024-05-16 21:49:38 +02:00
Henri Verbeet
efe9dfd73a
vkd3d-shader/ir: Do not store the vkd3d-shader configuration flags in struct vkd3d_shader_parser.
2024-05-16 21:49:37 +02:00
Henri Verbeet
19b552ce1b
vkd3d-shader/ir: Pass an initialised vsir_program structure to vkd3d_shader_parser_init().
2024-05-16 21:49:36 +02:00
Henri Verbeet
9e4a790de1
vkd3d-shader/ir: Use a separate allocation for the vsir program in struct vkd3d_shader_parser.
2024-05-16 21:49:34 +02:00
Conor McCarthy
47f0483267
vkd3d-shader/dxil: Implement DX intrinsic WaveReadLaneFirst.
2024-05-14 20:44:06 +02:00
Conor McCarthy
e41643ab8f
vkd3d-shader/dxil: Implement DX intrinsic WaveReadLaneAt.
2024-05-14 20:44:02 +02:00
Conor McCarthy
2810edf45b
vkd3d-shader/dxil: Implement DX intrinsic WavePrefixBitCount.
2024-05-13 11:50:22 +02:00
Conor McCarthy
c30976e5c2
vkd3d-shader/dxil: Implement DX intrinsic WaveIsFirstLane.
2024-05-13 11:50:20 +02:00
Conor McCarthy
cb5163f9a4
vkd3d-shader/dxil: Implement DX intrinsic WaveAllBitCount.
2024-05-13 11:50:17 +02:00
Conor McCarthy
cc49f26af1
vkd3d-shader/ir: Validate geometry shader properties.
2024-05-08 21:08:15 +02:00
Conor McCarthy
4fd2d5aa77
vkd3d-shader/dxil: Load geometry shader properties.
2024-05-08 21:08:14 +02:00
Conor McCarthy
c71751edc9
vkd3d-shader/dxil: Implement DX intrinsics WaveActiveOp and WavePrefixOp.
2024-05-06 22:12:25 +02:00
Conor McCarthy
af208135f3
vkd3d-shader/dxil: Implement DX intrinsic WaveActiveBit.
2024-05-06 22:12:22 +02:00
Conor McCarthy
174a692a17
vkd3d-shader/dxil: Implement DX intrinsic WaveActiveBallot.
2024-05-06 22:12:19 +02:00
Henri Verbeet
592e902d47
vkd3d-shader: Pass a struct vsir_program to vkd3d_shader_parser_compile().
2024-05-02 22:19:18 +02:00
Henri Verbeet
f948520504
vkd3d-shader/spirv: Pass a struct vsir_program to spirv_compile().
2024-05-02 22:19:17 +02:00
Conor McCarthy
fb5eb3159d
vkd3d-shader/dxil: Implement DX intrinsic WaveAnyTrue.
2024-05-02 22:19:00 +02:00
Conor McCarthy
8e2b351538
vkd3d-shader/dxil: Implement DX intrinsic WaveAllTrue.
2024-05-02 22:18:58 +02:00
Conor McCarthy
9aa9b112e6
vkd3d-shader/dxil: Implement DX intrinsic WaveActiveAllEqual.
2024-05-02 22:18:55 +02:00
Conor McCarthy
6a56b4e5d8
vkd3d-shader/dxil: Implement DX intrinsics WaveGetLaneCount and WaveGetLaneIndex.
2024-05-02 22:18:48 +02:00
Conor McCarthy
fb730b11cf
vkd3d-shader/dxil: Handle constexpr pointer cast.
2024-04-30 16:31:44 +02:00
Henri Verbeet
87c83e2ae2
vkd3d-shader: Get rid of struct vkd3d_shader_desc.
2024-04-30 16:31:19 +02:00
Conor McCarthy
3479962983
vkd3d-shader/dxil: Implement DX intrinsics LoadOutputControlPoint and LoadPatchConstant.
2024-04-22 23:13:28 +02:00
Conor McCarthy
4457181b2a
vkd3d-shader/dxil: Support patch constant functions and signatures.
2024-04-22 23:13:26 +02:00
Henri Verbeet
0116e49d9b
vkd3d-shader/hlsl: Support d3d-asm as target format.
2024-04-19 22:24:06 +02:00
Henri Verbeet
e17e481130
vkd3d-shader/glsl: Call vkd3d_shader_normalise().
2024-04-17 22:52:20 +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
0515482e82
vkd3d-shader/ir: Validate tessellation declarations.
2024-04-16 22:18:18 +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
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