Commit Graph

2067 Commits

Author SHA1 Message Date
Zebediah Figura
f895f0dce6 vkd3d-shader: Do not check for NULL in vkd3d_shader_free_shader_code().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 15:15:57 +02:00
Zebediah Figura
6c10b52804 vkd3d-shader: Do not check for NULL in vkd3d_shader_free_scan_descriptor_info().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 15:15:53 +02:00
Zebediah Figura
9a0692978e vkd3d-shader: Allow structures to be chained in any order.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 23:01:59 +02:00
Henri Verbeet
fb93449c85 vkd3d-shader: Handle non-contiguous destination write masks in vkd3d_dxbc_compiler_emit_store().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 22:01:51 +02:00
Henri Verbeet
a451af9c51 vkd3d-shader: Properly handle scalar destinations in vkd3d_dxbc_compiler_emit_store().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 22:01:46 +02:00
Henri Verbeet
106c76d45e tests: Use descriptor ranges with multiple descriptors in test_register_space().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 22:01:43 +02:00
Henri Verbeet
d2ffae5900 vkd3d-shader: Introduce API for descriptor array bindings.
We will need this for shader model 5.1 resource arrays. However, for the
time being any count other than '1' is unsupported.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 22:01:38 +02:00
Henri Verbeet
9efcf45d7a vkd3d-shader: Change the memory layout of swizzles to allow for future swizzle components.
We may want to add e.g. VKD3D_SHADER_SWIZZLE_ONE and
VKD3D_SHADER_SWIZZLE_ZERO in the future.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 22:01:35 +02:00
Henri Verbeet
2dd0d207d5 vkd3d-shader: Introduce an enumeration for swizzle components.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:46:17 +02:00
Henri Verbeet
690a717887 vkd3d-compiler: Support reading from standard input.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:46:10 +02:00
Henri Verbeet
c27bed0023 vkd3d-compiler: Support writing to standard output.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:46:00 +02:00
Henri Verbeet
9a2b3bac58 build: Try "vulkan-1" as the Vulkan library.
Somewhat unconventionally, the official Vulkan import library is called
"vulkan-1.lib" on Windows.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:45:55 +02:00
Henri Verbeet
a5daebbda9 build: Assume the soname is <library>.dll when building for MinGW hosts.
That's not strictly true, but the only case we care about is the Vulkan
DLL on Windows, for which the official import library is called
vulkan-1.lib, and the DLL is called vulkan-1.dll. We can do something
more elaborate once it becomes relevant.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:45:43 +02:00
Zebediah Figura
3244fa3f92 vkd3d-shader: Remove the unused "ctx" field from struct vkd3d_shader_instruction.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 22:11:37 +02:00
Zebediah Figura
90eb138f22 vkd3d-shader: Rename vkd3d_sm4_immconst_type to vkd3d_sm4_dimension.
These bits are used in all register tokens, not just immediate constants.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 22:11:34 +02:00
Henri Verbeet
a8937ede3a build: Link vkd3d-utils with PTHREAD_LIBS.
Since it uses pthread functions.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:05:59 +02:00
Henri Verbeet
7bae1a606a vkd3d-shader: Support register spaces for combined samplers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:05:50 +02:00
Henri Verbeet
ea1cb2e699 vkd3d-compiler: Add an option to specify the target type.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:05:35 +02:00
Henri Verbeet
67173a0021 vkd3d-compiler: Add an option to list the supported target types.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:05:32 +02:00
Henri Verbeet
72db9eb19d vkd3d-compiler: Add an option to list the supported source types.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:05:14 +02:00
Zebediah Figura
04605a341b vkd3d-shader: Make VKD3D_SHADER_SWIZZLE more legible.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:05:05 +02:00
Zebediah Figura
7a414b1afc build: Clean widl generated headers if building with widl.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-07 15:33:43 +02:00
Henri Verbeet
c326d75c1d vkd3d-shader: Introduce vkd3d_shader_get_supported_target_types().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:54:22 +02:00
Henri Verbeet
5f4bd618ed vkd3d-shader: Introduce vkd3d_shader_get_supported_source_types().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:54:22 +02:00
Henri Verbeet
af73e16633 vkd3d-shader: Use vkd3d_shader_validate_compile_info() in vkd3d_shader_scan().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:54:22 +02:00
Henri Verbeet
805e13d975 vkd3d-compiler: Also print the vkd3d-shader version when printing the vkd3d-compiler version.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:54:22 +02:00
Henri Verbeet
7dda2339a2 vkd3d-shader: Introduce vkd3d_shader_get_version().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:54:22 +02:00
Henri Verbeet
dae87cc1c0 vkd3d-shader: Merge the vkd3d_shader_descriptor_type and vkd3d_shader_descriptor_range_type enumerations.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 15:52:27 +02:00
Henri Verbeet
b2dcff0ecf vkd3d-compiler: Add an option to specify the buffer type to use for buffer UAV bindings.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 15:52:25 +02:00
Henri Verbeet
ffe0dca779 vkd3d-shader: Allow plain storage buffers to be used for buffer UAVs.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 15:52:23 +02:00
Henri Verbeet
1496dc054e vkd3d-shader: Add a compiler message for unhandled register types in vkd3d_dxbc_compiler_get_descriptor_binding().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 15:52:22 +02:00
Henri Verbeet
cf3c50b705 vkd3d-shader: Fail shader compilation if any descriptor bindings are missing.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 15:52:20 +02:00
Zebediah Figura
04598b1316 include: Correct the case of rbtree macros.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-01 11:31:57 +02:00
Henri Verbeet
1279d5df9e vkd3d-shader: Report error messages from vkd3d_shader_serialize_root_signature().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:33:00 +02:00
Henri Verbeet
33eb944bf4 vkd3d-shader: Report error messages from vkd3d_shader_parse_root_signature().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:32:59 +02:00
Henri Verbeet
d135b4687b vkd3d-shader: Report error messages from vkd3d_shader_parse_input_signature().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:32:57 +02:00
Henri Verbeet
11f82d985c vkd3d-shader: Pass a vkd3d_shader_compile_info structure to vkd3d_shader_scan_dxbc().
In order to allow it to handle different source types.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:32:56 +02:00
Henri Verbeet
1c8077546e vkd3d-shader: Validate control flow instructions in vkd3d_shader_scan_dxbc().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:32:54 +02:00
Henri Verbeet
a1778b681e vkd3d-shader: Trace messages in vkd3d_shader_compile().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 15:23:02 +02:00
Henri Verbeet
f4237f7716 vkd3d-shader: Trace messages in vkd3d_shader_scan_dxbc().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 15:23:01 +02:00
Henri Verbeet
8de5546082 vkd3d-shader: Trace the shader in vkd3d_shader_scan_dxbc().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 15:22:59 +02:00
Henri Verbeet
cd69865b69 vkd3d-shader: Also copy the terminator in vkd3d_shader_message_context_copy_messages().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 15:22:58 +02:00
Henri Verbeet
f6868919d3 vkd3d: Add trailing newlines to error messages in vkd3d_uav_clear_state_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 15:22:56 +02:00
Henri Verbeet
29287d3368 vkd3d-shader: Add compiler messages for invalid DXBC chunk offsets and sizes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 19:44:04 +02:00
Henri Verbeet
29e9cf032c vkd3d-shader: Add a compiler message for unsupported DXBC versions.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 19:44:01 +02:00
Henri Verbeet
9fcf00e2bf vkd3d-shader: Validate DXBC checksums.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 19:43:59 +02:00
Henri Verbeet
1f6ce3ceba vkd3d-shader: Add a compiler message for invalid DXBC magic.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 19:43:56 +02:00
Henri Verbeet
3b2fb3aba1 vkd3d-shader: Output a compiler error message if the DXBC size is invalid.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 19:43:52 +02:00
Henri Verbeet
e7828d6782 vkd3d-shader: Output point sizes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:19:09 +02:00
Henri Verbeet
4906bd40c6 vkd3d-shader: Add missing VKD3D_FORCE_32_BIT_ENUM enum elements.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:19:07 +02:00