Commit Graph

236 Commits

Author SHA1 Message Date
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
Nikolay Sivov
d1b8a7e745 vkd3d: Fix a few typos in the comments.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-19 14:17:41 +02:00
Elizabeth Figura
ae5cd6573f vkd3d-shader: Allow controlling d3d color shade mode through vkd3d-shader parameters. 2024-07-24 16:08:10 +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
e8bdac8147 vkd3d-shader/spirv: Support passing shader parameters through uniform buffers. 2024-07-11 16:58:52 +02:00
Elizabeth Figura
3dff608bf8 include: Document shader parameters. 2024-07-11 16:48:09 +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
Henri Verbeet
36c123c005 Release 1.12. 2024-05-29 22:05:28 +02:00
Henri Verbeet
007233a016 include: Document the additional HLSL transformations supported by vkd3d_shader_compile(). 2024-05-27 21:08:00 +02:00
Conor McCarthy
b0145ad96e vkd3d-shader: Introduce a wave ops feature flag. 2024-04-17 22:51:52 +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
Nikolay Sivov
e1e6367210 vkd3d-shader/fx: Add an option to include empty buffers in the effect binary.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-04-02 23:10:42 +02:00
Giovanni Mascellani
5f2f126b70 include: Include stddef.h in vkd3d_shader.h.
Type size_t is used in the file without importing any header which
defines it. This only works when the translation unit includes one of
the appropriate headers anyway or when the appropriate header is included
internally by other standard C headers; none of those strategies should
be relied upon.
2024-04-02 23:09:51 +02:00
Zebediah Figura
6b6e4bc212 vkd3d-shader: Add a compile option to control whether implicit truncation warnings are printed.
d3dcompiler and d3dx9 versions before 42 don't emit this error; this will be
necessary to emulate that behaviour.

Other warnings exist that are introduced in different d3dcompiler versions,
although there are not very many distinct HLSL warnings to begin with.

We could of course group all these together under a single compiler option, but
I find that using separate top-level options is unilaterally friendlier to an
API consumer, and simpler to implement as well. It also in some sense maps
conceptually to e.g. "-Wno-implicit-conversion".
2024-03-27 22:37:34 +01:00
Nikolay Sivov
cfa63da3f1 vkd3d-shader: Adjust "child-effect" option documentation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-27 22:37:21 +01:00
Nikolay Sivov
13227f3852 vkd3d-shader: Add an option to enable child effects compilation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:41 +01:00
Giovanni Mascellani
75bc68962d vkd3d-shader/dxbc: Add flag to ignore the DXBC checksum. 2024-03-11 22:08:55 +01:00
Evan Tang
4553b2a0dc vkd3d-shader/spirv: Implement support for rasteriser-ordered views.
Using SPV_EXT_fragment_shader_interlock.
2024-03-08 23:36:35 +01:00
Giovanni Mascellani
9aa86901e3 vkd3d-shader/d3d-asm: Support emitting the shader signature. 2024-03-07 23:08:24 +01:00
Henri Verbeet
f866fb95ad Release 1.11. 2024-03-05 20:39:45 +01:00
Henri Verbeet
22d5e24bad vkd3d-shader: Update the chained structure list for vkd3d_shader_compile(). 2024-03-05 20:39:45 +01:00
Henri Verbeet
f80ae7aef1 vkd3d-shader: Document the newly supported transformations for d3dbc and HLSL sources. 2024-03-05 20:39:45 +01:00
Henri Verbeet
6acca1f85e vkd3d-shader: Add documentation for the INT64 and FLOAT64 feature flags. 2024-03-04 22:34:24 +01:00
Giovanni Mascellani
5ec1825eb3 include/vkd3d-shader: Generate swizzles without a function call.
So they can be used when a constant expression is expected, for instance
on case labels.
2024-01-29 22:33:31 +01:00
Conor McCarthy
6446b6ea21 vkd3d-shader: Introduce VKD3D_SHADER_COMPILE_OPTION_FEATURE_FLOAT64. 2024-01-24 22:38:09 +01:00
Giovanni Mascellani
6ac525d6c3 vkd3d-shader/spirv: Use capability ShaderViewportIndexLayerEXT for decoration Layer.
Capability Geometry allows to use the Layer builtin in geometry and pixel
shaders. For vertex and domain shaders ShaderLayer should be used, but it's only
available starting from SPIR-V 1.5. ShaderViewportIndexLayerEXT can be used
instead with extension SPV_EXT_shader_viewport_index_layer.
2024-01-22 22:19:09 +01:00
Henri Verbeet
9dd5b2840f vkd3d-shader: Recognise DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS in shader_validate_descriptor_range1(). 2024-01-11 23:04:54 +01:00
Nikolay Sivov
9494b72224 vkd3d-shader: Add separate binary target type for effects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:48 +01:00
Conor McCarthy
13459a55f1 vkd3d-shader/spirv: Introduce a UINT64 component type. 2024-01-02 23:03:04 +01:00
Conor McCarthy
cdb9eecfd1 vkd3d-shader/spirv: Introduce a compiler feature flag for int64 capability. 2023-12-12 22:50:53 +01:00
Henri Verbeet
0c33f82f72 Release 1.10. 2023-12-06 15:31:21 +01:00
Henri Verbeet
803dfc1246 vkd3d-shader: Update the vkd3d_shader_scan() documentation.
Scanning d3dbc sources is supported now, and
vkd3d_shader_scan_combined_resource_sampler_info is supported as a chained
structure.
2023-12-04 22:23:14 +01:00
Henri Verbeet
ee1c6bd488 vkd3d-shader: Add a VKD3D_FORCE_32_BIT_ENUM element to enum vkd3d_shader_compile_option_fragment_coordinate_origin. 2023-12-04 22:23:04 +01:00
Henri Verbeet
01dad41862 vkd3d-shader/ir: Skip recording combined resource/sampler information for dynamically indexed descriptor arrays.
And output a warning instead.
2023-11-21 22:41:57 +01:00
Henri Verbeet
9de793f180 vkd3d-shader: Implement scanning combined resource/sampler information. 2023-11-13 23:19:23 +01:00
Henri Verbeet
e7eec3e023 vkd3d-shader/spirv: Allow the origin of fragment coordinates to be specified.
We typically want to use lower-left in OpenGL environments when rendering to
FBOs.
2023-11-09 21:14:12 +01:00
Nikolay Sivov
e242b46922 vkd3d-shader/tpf: Convert some of the semantic names to system values names when in compatibility mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-19 23:03:23 +02:00
Zebediah Figura
72e8b6e0dc include: Fix some confusingly structured documentation.
Fixes: 7a4ae434df.
2023-10-10 22:11:37 +02:00
Zebediah Figura
7a4ae434df include: Define an API for mapping sm1 samplers to the target environment. 2023-10-09 21:58:38 +02:00
Henri Verbeet
90d4529f27 Release 1.9. 2023-09-21 19:16:32 +02:00
Zebediah Figura
8c11270940 vkd3d-shader: Add definitions for more fragment output system values. 2023-09-21 19:16:29 +02:00
Zebediah Figura
fd120d8f2d vkd3d-shader: Rename vkd3d_shader_next_stage_info to vkd3d_shader_varying_map_info.
It was originally intended that this structure could hold other information
about the next stage which compilation might depend on. For example, compilation
to GLSL needs to know the type of the next shader in some circumstances.

That was never actualized, and since the API is fixed at this point for 1.9, it
makes the most sense to rename the structure to match its actual scope.

The documentation was written and arranged to imply that the structure would
hold other information about the next shader than the varying map; this is
changed accordingly as well.
2023-09-21 19:16:27 +02:00
Henri Verbeet
054ae10693 vkd3d-shader: Slightly tweak the documentation for VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER. 2023-09-19 21:30:40 +02:00
Henri Verbeet
0f2dd5f9be vkd3d-shader: Add a \since 1.9 for VKD3D_SHADER_SV_TARGET. 2023-09-19 21:30:40 +02:00
Henri Verbeet
74517de783 include: Add a corresponding function pointer type for vkd3d_shader_build_varying_map(). 2023-09-19 21:30:37 +02:00
Conor McCarthy
bf49a1a95b vkd3d-shader/dxil: Declare shader outputs. 2023-08-30 22:48:50 +02:00
Zebediah Figura
622311da8e vkd3d-shader: Add a flag marking raw buffers to struct vkd3d_shader_descriptor_info. 2023-08-23 22:45:04 +02:00
Zebediah Figura
f649db23a5 vkd3d-shader: Introduce a function to build a varying map between sm1 stages. 2023-08-03 21:20:44 +09:00
Zebediah Figura
11475ef62a vkd3d-shader: Implement remapping shader output registers to match the next shader's semantics. 2023-08-03 21:20:42 +09:00