Giovanni Mascellani
455c826a6a
vkd3d-shader/ir: Run validation after structurization.
2024-09-05 16:29:11 +02:00
Giovanni Mascellani
e935dcb88d
vkd3d-shader/ir: Run validation after lowering switches to selection ladders.
2024-09-05 16:29:02 +02:00
Giovanni Mascellani
4a28433ef5
vkd3d-shader/ir: Run validation after materializing PHI SSAs to TEMPs.
2024-09-05 16:26:52 +02:00
Giovanni Mascellani
fade5dd54c
vkd3d-shader/ir: Run validation after lowering instructions.
2024-09-05 16:25:33 +02:00
Giovanni Mascellani
ffb7284fb6
vkd3d-shader/ir: Do not decide the control flow type on NOPs.
2024-09-05 16:20:39 +02:00
Giovanni Mascellani
829e6f5cd0
vkd3d-shader/ir: Emit a warning instead of an error on validation failures.
2024-09-05 16:20:39 +02:00
Henri Verbeet
03d76f653b
vkd3d-shader/d3dbc: Use VKD3D_SM1_INSTRUCTION_LENGTH_SHIFT instead of D3DSI_INSTLENGTH_SHIFT.
2024-09-05 12:47:43 +02:00
Henri Verbeet
b9693393fd
vkd3d-shader/d3dbc: Store a enum vkd3d_sm1_opcode in struct sm1_instruction.
2024-09-05 12:45:43 +02:00
Nikolay Sivov
0a6bcf5da7
vkd3d-shader/tpf: Fix a typo when adding the SFI0 section.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-09-04 18:43:41 +02:00
Henri Verbeet
a214e96cf8
vkd3d-shader/tpf: Use enum vkd3d_sm4_data_type in sm4_resource_format().
2024-09-04 18:42:26 +02:00
Henri Verbeet
b61675d0f3
vkd3d-shader/tpf: Use enum vkd3d_shader_component_type in write_sm4_signature().
2024-09-04 18:40:56 +02:00
Shaun Ren
c1babbc8aa
vkd3d-shader/hlsl: Validate hull shader attributes.
2024-09-04 18:30:04 +02:00
Shaun Ren
6c1dc53d15
vkd3d-shader/hlsl: Parse the patchconstantfunc attribute.
2024-09-04 18:30:04 +02:00
Shaun Ren
41cb29c4c8
vkd3d-shader/hlsl: Parse the partitioning attribute.
2024-09-04 18:28:59 +02:00
Shaun Ren
615ffb823b
vkd3d-shader/hlsl: Parse the outputtopology attribute.
2024-09-04 18:28:57 +02:00
Shaun Ren
dae88bab52
vkd3d-shader/hlsl: Parse the outputcontrolpoints attribute.
2024-09-04 18:28:46 +02:00
Shaun Ren
4dfd682446
vkd3d-shader/hlsl: Parse the domain attribute.
2024-09-04 18:21:15 +02:00
Shaun Ren
51e9b05fe5
vkd3d-shader/hlsl: Introduce parse_entry_function_attributes() helper.
2024-09-04 18:18:23 +02:00
Shaun Ren
62fad1c185
tests: Test hull shader function overloads.
2024-09-04 18:18:23 +02:00
Shaun Ren
ed1e74dd62
tests: Test hull shader attributes.
2024-09-04 18:18:23 +02:00
Shaun Ren
73ee5a135a
vkd3d-shader/hlsl: Check for duplicate attributes in function declaration.
2024-09-04 18:18:23 +02:00
Petrichor Park
855b9713b8
vkd3d-shader/hlsl: Implement the sincos() intrinsic.
2024-09-04 18:16:37 +02:00
Petrichor Park
384810b4ba
vkd3d-shader/hlsl: Implement the dst() intrinsic.
2024-09-04 18:08:24 +02:00
Francisco Casas
7ec44bd70b
vkd3d-shader/hlsl: Parse the CompileShader() syntax.
2024-09-04 17:59:34 +02:00
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
379cd9b7b5
vkd3d-shader/hlsl: Save hlsl_ir_swizzles in the vsir_program for SM1.
2024-09-04 17:51:32 +02:00
Francisco Casas
b46eac35c0
vkd3d-shader/hlsl: Save hlsl_ir_stores in the vsir_program for SM1.
2024-09-04 17:51:32 +02:00
Francisco Casas
9aace1ac4e
vkd3d-shader/hlsl: Save hlsl_ir_loads in the vsir_program for SM1.
2024-09-04 17:51:32 +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
Francisco Casas
7abf3c3a37
vkd3d-shader/hlsl: Introduce hlsl_ir_vsir_instruction_ref.
...
This node type will be deleted once the hlsl->vsir->d3dbc translation is
complete. For now it serves the purpose of allowing to keep both real
hlsl_ir_nodes and vsir_instructions in the hlsl_block, until all the
former can be translated into the latter.
2024-09-04 16:49:00 +02:00
Anna (navi) Figueiredo Gomes
3d8fc1a467
vkd3d-shader/spirv: Break long assembly lines.
...
Avoid overflowing the (Wine) debug log buffer when output lines are too
long, and keep spirv-text output more legible. The output is still valid
SPIR-V asm, as the assembler does not care for which kind of whitespace
is used.
2024-09-03 17:06:20 +02:00
Victor Chiletto
a39227c79c
vkd3d-shader/hlsl: Fold logic AND and logic OR identities.
2024-09-03 15:11:16 +02:00
Elizabeth Figura
d507acb5ac
vkd3d-utils: Do not emit implicit truncation warnings from D3DCompile2VKD3D() before version 42.
2024-09-03 15:07:36 +02:00
Elizabeth Figura
8515fcbc70
vkd3d-utils: Add a D3DCompile2VKD3D() that allows configuring DLL version.
...
This would allow us to use vkd3d-utils directly in Wine [with the exception of
D3D_COMPILE_STANDARD_FILE_INCLUDE, but we can simply pass the ID3DInclude object
to D3DCompile2VKD3D().]
2024-09-03 15:06:29 +02:00
Nikolay Sivov
6d28cc131b
vkd3d-shader/fx: Fix the unpacked size and stride fields of the fx_4_0 types.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-09-02 19:14:59 +02:00
Nikolay Sivov
9673b660d4
vkd3d-shader/fx: Expand BlendState array fields for fx_4_1 as well.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-09-02 19:14:59 +02:00
Nikolay Sivov
1ed4543007
vkd3d-shader/fx: Only add numeric variables when writing buffers.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-09-02 19:14:59 +02:00
Nikolay Sivov
ee2da76e6d
vkd3d-shader/fx: Set structure field offsets in bytes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-09-02 19:14:59 +02:00
Henri Verbeet
7a74e79f2d
vkd3d-shader/d3dbc: Return a vkd3d_decl_usage from hlsl_sm1_usage_from_semantic().
2024-09-02 19:14:01 +02:00
Henri Verbeet
1c01560321
vkd3d-shader/tpf: Return a vkd3d_shader_sysval_semantic from hlsl_sm4_usage_from_semantic().
2024-09-02 19:12:53 +02:00
Anna (navi) Figueiredo Gomes
f5205da8e9
vkd3d-shader/spirv: Pass a vkd3d_shader_descriptor_info1 structure to spirv_compiler_build_descriptor_variable().
2024-09-02 19:10:19 +02:00
Anna (navi) Figueiredo Gomes
672a8f5ce9
vkd3d-shader/spirv: Pass a vkd3d_shader_descriptor_info1 structure to spirv_compiler_emit_sampler_declaration().
2024-09-02 18:59:37 +02:00
Anna (navi) Figueiredo Gomes
22aad955ec
vkd3d-shader/spirv: Pass a vkd3d_shader_descriptor_info1 structure to spirv_compiler_emit_cbv_declaration().
2024-09-02 18:58:29 +02:00
Anna (navi) Figueiredo Gomes
2a52ccf2c6
vkd3d-shader/spirv: Pass a vkd3d_shader_descriptor_info1 structure to spirv_compiler_emit_resource_declaration().
2024-09-02 18:54:19 +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
0e72aba0bc
Release 1.13.
2024-08-29 12:08:46 +02:00
Elizabeth Figura
eb71a1722a
vkd3d-shader: Use an extended version of vkd3d_shader_immediate_constant in vkd3d_shader_parameter1.
...
This is a proposed API change in 946, which won't make it into this release.
The intent is to allow slightly larger constants to be specified in the updated
vkd3d_shader_parameter1 structure. In particular, this is large enough to pass
4-dimensional integer or float vectors inline, which the proposed clip plane
implementation will use, as well as other Direct3D FFP parameters.
We could also simply add vkd3d_shader_immediate_constant1 as a separate union
member in vkd3d_shader_parameter1, but this API is a bit cleaner and simpler.
2024-08-28 12:08:37 +02:00