Nikolay Sivov
7c3677b114
vkd3d-shader/hlsl: Add parser support for ComputeShader, DomainShader, and HullShader types.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-06 16:54:19 +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
Petrichor Park
bec4f413dc
vkd3d-shader/tpf: Implmenent HLSL_OP1_RCP.
...
SM5 comes with a RCP opcode; for SM4, implement it as `DIV dst, 1, x`.
2024-07-11 16:44:16 +02:00
Elizabeth Figura
59f770214a
vkd3d-shader/hlsl: Implement output SV_Coverage.
2024-07-11 00:33:57 +02:00
Elizabeth Figura
71a3d55e8c
vkd3d-shader/hlsl: Implement the GetRenderTargetSampleCount() intrinsic.
2024-07-11 00:33:57 +02:00
Nikolay Sivov
f03cb7e911
vkd3d-shader/hlsl: Add RasterizerState type.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:12:03 +02:00
Nikolay Sivov
12947aa50d
vkd3d-shader/fx: Add support for writing DepthStencilState objects.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:12:03 +02:00
Nikolay Sivov
48ff7de8ef
vkd3d-shader/hlsl: Add support for ConstantBuffer<> type.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:12:03 +02:00
Elizabeth Figura
33e5553158
vkd3d-shader/hlsl: Write SM5.1 binding reflection data.
2024-06-11 15:49:30 +02:00
Elizabeth Figura
bb41947fc6
vkd3d-shader: Write SM5.1 register spaces.
2024-06-11 15:49:30 +02:00
Elizabeth Figura
28a5e23814
vkd3d-shader: Write SM5.1 register indices.
...
Separate ID and index. Allocate IDs for all external resources (but ignore them
for shader models other than 5).
2024-06-11 15:49:30 +02:00
Elizabeth Figura
19a13740de
vkd3d-shader/hlsl: Put constant buffers into the extern_resources struct.
...
Mostly to get the same sorting logic.
2024-06-11 15:49:30 +02:00
Francisco Casas
253c994155
vkd3d-shader/tpf: Write default values for SM4.
2024-06-11 15:46:40 +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
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
Zebediah Figura
7b3c47ba2e
vkd3d-shader/tpf: Write the field offset in bytes.
2024-05-06 22:12:48 +02:00
Zebediah Figura
2480eec98b
vkd3d-shader/hlsl: Move the "base_type" member to the class-specific union.
2024-05-06 22:12:41 +02:00
Zebediah Figura
d9f7a88329
vkd3d-shader/hlsl: Make HLSL_TYPE_PIXELSHADER into a separate class.
2024-05-06 22:12:37 +02:00
Zebediah Figura
874937dab4
vkd3d-shader/hlsl: Make HLSL_TYPE_VERTEXSHADER into a separate class.
2024-05-06 22:12:34 +02:00
Zebediah Figura
d7da278693
vkd3d-shader/hlsl: Make HLSL_TYPE_RENDERTARGETVIEW into a separate class.
2024-04-23 22:37:09 +02:00
Zebediah Figura
ee2bde3aba
vkd3d-shader/hlsl: Make HLSL_TYPE_DEPTHSTENCILVIEW into a separate class.
2024-04-23 22:37:06 +02:00
Zebediah Figura
76971d811e
vkd3d-shader/hlsl: Make HLSL_TYPE_TECHNIQUE into a separate class.
2024-04-23 22:36:51 +02:00
Zebediah Figura
3c8c7426df
vkd3d-shader/hlsl: Make HLSL_TYPE_PASS into a separate class.
2024-04-23 22:36:38 +02:00
Zebediah Figura
24d3a352a6
vkd3d-shader/hlsl: Make HLSL_TYPE_EFFECT_GROUP into a separate class.
2024-04-23 22:36:32 +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
Zebediah Figura
0e3377a1be
vkd3d-shader/hlsl: Avoid using HLSL_CLASS_OBJECT without checking the base type.
...
As the diffstat shows, HLSL_CLASS_OBJECT does not really have much in common.
Resource types (TEXTURE, SAMPLER, UAV) sometimes behave similarly to each other,
but do not generally behave similarly to effect-specific types (string, shader,
state, view). Most consumers of HLSL_CLASS_OBJECT subsequently check the base
type anyway.
Hence we want to replace HLSL_TYPE_* with individual classes for object types.
As a first step, change the last few places that only check HLSL_CLASS_OBJECT.
2024-04-09 12:27:55 -05:00
Zebediah Figura
c5f507ac38
vkd3d-shader/hlsl: Add SM5.1 shader target strings.
2024-04-09 12:27:47 -05:00
Francisco Casas
8fca801591
vkd3d-shader/tpf: Use the extra_bits field for _nz on discard.
2024-04-09 12:27:03 -05:00
Francisco Casas
3a0a4b625f
vkd3d-shader/hlsl: Merge HLSL_OP3_MOVC into HLSL_OP3_TERNARY.
2024-04-09 12:27:02 -05:00
Zebediah Figura
2247288003
vkd3d-shader/tpf: Set the user-packed flag for sm5.0 resources as well.
2024-03-27 22:36:39 +01:00
Zebediah Figura
7b87895289
vkd3d-shader/tpf: Write the component count as the column count for structs.
2024-03-27 22:36:37 +01:00
Zebediah Figura
5bf23cb2f5
vkd3d-shader/tpf: Explicitly write the class and base type for non-numeric types.
...
Avoid relying on that information being stored in the hlsl_type.
2024-03-27 22:36:36 +01:00
Zebediah Figura
34e9c101e8
vkd3d-shader/tpf: Do not write structs with no numeric fields into the RDEF.
2024-03-27 22:36:35 +01:00
Zebediah Figura
622fcda9ee
vkd3d-shader/tpf: Do not write non-numeric struct fields into the RDEF.
2024-03-27 22:36:33 +01:00
Henri Verbeet
abf76372e0
vkd3d-shader/ir: Pass a struct vsir_program to vsir_validate().
2024-03-14 23:24:29 +01:00
Conor McCarthy
6dd54eeb09
vkd3d-shader/spirv: Support zero-initialisation for workgroup memory.
2024-03-14 22:48:41 +01:00
Giovanni Mascellani
1690b0b554
vkd3d-shader: Remove the bytecode fields from vkd3d_shader_desc.
2024-03-11 22:09:32 +01:00
Giovanni Mascellani
204c8afb9c
vkd3d-shader/dxbc: Remove flag is_dxil.
...
The full shader profile is already available in vsir_program.
2024-03-11 22:09:31 +01:00
Giovanni Mascellani
470d83a9da
vkd3d-shader: Move shader signatures to vsir_program.
2024-03-11 22:09:31 +01:00
Giovanni Mascellani
56dc0c9842
vkd3d-shader/dxbc: Decouple vkd3d_shader_desc from DXBC parsing.
2024-03-11 22:09:30 +01:00
Giovanni Mascellani
5204b92fa0
vkd3d-shader/tpf: Remove a useless parameter to shader_sm4_init().
2024-03-11 22:09:28 +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