Commit Graph

2020 Commits

Author SHA1 Message Date
Henri Verbeet
500079a54a vkd3d-shader: Rename the vkd3d_tessellator_output_primitive enumeration.
To vkd3d_shader_tessellator_output_primitive, consistent with vkd3d-shader
naming conventions.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 16:25:18 +02:00
Henri Verbeet
95fa257a37 vkd3d-shader: Allow vkd3d_shader_compile() to handle multiple target types.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 16:25:16 +02:00
Henri Verbeet
d6ec017077 vkd3d-shader: Allow vkd3d_shader_compile_dxbc() to handle multiple source types.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:31 +02:00
Henri Verbeet
b07c304440 vkd3d-shader: Pass compile options as an array instead of as flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:29 +02:00
Henri Verbeet
9312979b56 vkd3d-shader: Pass the target info as part of the vkd3d_shader_compile_info structure chain.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:28 +02:00
Henri Verbeet
c4e6657c11 vkd3d-shader: Pass the interface info as part of the vkd3d_shader_compile_info structure chain.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:26 +02:00
Henri Verbeet
8ff9610fed vkd3d-shader: Introduce struct vkd3d_shader_compile_info.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:24 +02:00
Henri Verbeet
13c2fbdc8d vkd3d-shader: Rename the vkd3d_shader_target_extension enumeration to vkd3d_shader_spirv_extension.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 21:21:49 +02:00
Henri Verbeet
425dab80b8 vkd3d-shader: Rename the vkd3d_shader_target enumeration to vkd3d_shader_spirv_environment.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 21:21:47 +02:00
Henri Verbeet
2ee8429c03 vkd3d-shader: Rename VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE_INFO.
To VKD3D_SHADER_STRUCTURE_TYPE_INTERFACE_INFO, consistent with the structure
name.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 21:21:45 +02:00
Henri Verbeet
8292efdbed vkd3d-shader: Rename the vkd3d_shader_domain_shader_compile_arguments structure.
To vkd3d_shader_spirv_domain_shader_target_info.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 21:21:43 +02:00
Henri Verbeet
5ee018afe9 vkd3d-shader: Rename the vkd3d_shader_compile_arguments structure to vkd3d_shader_spirv_target_info.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 21:21:41 +02:00
Henri Verbeet
cb5c001062 vkd3d-compiler: vkd3d_shader_compile_dxbc() returns an int.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:43:35 +02:00
Zebediah Figura
57973b4252 vkd3d: Also match the UAV counter register space in d3d12_command_list_update_descriptor_table().
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-06-17 16:43:26 +02:00
Zebediah Figura
f0ce8aaf92 vkd3d: Store a count of used UAV counters instead of a mask.
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-06-17 16:43:24 +02:00
Zebediah Figura
671ca1e721 vkd3d: Index the "vk_uav_counter_views" array to match the "uav_counters" array.
That is, index elements of vk_uav_counter_views by their index in uav_counters,
rather than by their register index. This is necessary because multiple UAVs can
share the same register index but differ in register space.

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-06-17 16:43:21 +02:00
Henri Verbeet
9b03ebde85 vkd3d: Introduce our own pipeline bind point enumeration.
The VK_PIPELINE_BIND_POINT_RANGE_SIZE enumeration value was removed in
Vulkan-Headers release 1.2.140.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:43:18 +02:00
Henri Verbeet
3ec487d93a include: Use standard 64-bit types.
In particular, we want these to be consistent with PRIx64. On 64-bit
macOS, that's "llx".

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:08:57 +02:00
Zebediah Figura
5d5a458247 tests: Test multiple register spaces with samplers.
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-05-27 22:05:28 +02:00
Zebediah Figura
6ac880da10 tests: Test multiple register spaces.
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-05-27 22:05:23 +02:00
Zebediah Figura
4bf22c6c27 vkd3d: Implement register spaces.
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-05-27 22:05:19 +02:00
Zebediah Figura
87364057da vkd3d-shader: Also match the register space when looking up bindings.
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-05-27 22:05:15 +02:00
Zebediah Figura
e53496f6fd vkd3d-shader: Do not treat descriptor registers as arrayed.
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-05-27 22:05:11 +02:00
Zebediah Figura
d08107da90 vkd3d-shader: Use the size from struct vkd3d_shader_constant_buffer when declaring push constant buffers.
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-05-27 22:05:08 +02:00
Zebediah Figura
4c993c672a vkd3d-shader: Read constant buffer offsets from the second index.
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-05-27 22:05:03 +02:00
Zebediah Figura
6dace4a8be vkd3d-shader: Read the resource index from idx[1] instead of idx[0] when looking up SM5.1 bindings.
We still use the first index to uniquely identify the register in vkd3d_symbol,
only changing which field is used to declare it.

This patch does not handle descriptor arrays.

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-05-27 22:04:57 +02:00
Zebediah Figura
2abc615419 vkd3d: Fix a spelling error in vkd3d_init_null_resources_data().
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-05-27 16:19:03 +02:00
Conor McCarthy
7d47f2323e vkd3d: Implement support for D3D12_FEATURE_D3D12_OPTIONS5.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 22:07:37 +02:00
Conor McCarthy
d5ad90a81e vkd3d: Implement support for D3D12_FEATURE_CROSS_NODE.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 22:07:35 +02:00
Conor McCarthy
0a6415d677 vkd3d: Implement support for D3D12_FEATURE_SERIALIZATION.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 22:07:33 +02:00
Conor McCarthy
3a586c9ffc vkd3d: Implement support for D3D12_FEATURE_D3D12_OPTIONS4.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 22:07:32 +02:00
Conor McCarthy
0b622c6704 vkd3d: Implement support for D3D12_FEATURE_EXISTING_HEAPS.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 22:07:30 +02:00
Conor McCarthy
33217ebfca vkd3d: Implement support for D3D12_FEATURE_D3D12_OPTIONS3.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 22:07:28 +02:00
Henri Verbeet
1cee31ed7a vkd3d-shader: Handle clip and cull distance in vkd3d_siv_from_sysval_indexed().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 14:25:26 +02:00
Conor McCarthy
b1712cbd48 vkd3d: Implement support for D3D12_FEATURE_COMMAND_QUEUE_PRIORITY.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 14:25:23 +02:00
Conor McCarthy
16882d1a50 vkd3d: Implement support for D3D12_FEATURE_SHADER_CACHE.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 14:25:19 +02:00
Conor McCarthy
6e0590adf6 vkd3d: Implement support for D3D12_FEATURE_D3D12_OPTIONS2.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 14:25:16 +02:00
Conor McCarthy
fad3b12703 vkd3d: Implement support for D3D12_FEATURE_ARCHITECTURE1.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 14:25:13 +02:00
Conor McCarthy
1d46f25ea2 vkd3d: Implement support for D3D12_FEATURE_D3D12_OPTIONS1.
Signed-off-by: Conor McCarthy <conor.mccarthy.444@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 14:25:10 +02:00
Hans-Kristian Arntzen
f3bf1612c1 vkd3d-shader: Increment the token pointer before reading the register space in the dcl_resource_structured handler.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
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-05-22 14:25:06 +02:00
Hans-Kristian Arntzen
ea213e2b0d vkd3d-shader: Increment the token pointer before reading the register space in the dcl_uav_structured handler.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
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-05-22 14:25:03 +02:00
Chip Davis
5ad16f1458 tests: Introduce compare_uint().
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 22:40:37 +02:00
Chip Davis
e57ad512ff include: Use the correct type for the tessellator partitioning compile argument.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 19:29:54 +02:00
Conor McCarthy
a59f1982ad vkd3d: Remove redundant GetCopyableFootprints() resource size alignment checks.
The alignments are now checked in d3d12_resource_validate_desc().

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:25:50 +01:00
Henri Verbeet
d0586297c5 vkd3d-shader: Handle VKD3DSPR_GSINSTID in vkd3d_dxbc_compiler_get_register_name().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:11:22 +01:00
Henri Verbeet
ebac7ee24c vkd3d-shader: Avoid declaring outputs multiple times with incompatible types.
This would cause CoreValidation-Shader-InterfaceTypeMismatch validation
errors from Wine's test_shader_interstage_interface() d3d11 test. This
reverts parts of commits 1eb7eca411 and
04ec461fb4.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:11:20 +01:00
Henri Verbeet
61799500e2 vkd3d-shader: Handle normalised types in vkd3d_component_type_from_data_type().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:11:18 +01:00
Conor McCarthy
91555883ac vkd3d: Add stub for ID3D12GraphicsCommandList2::WriteBufferImmediate().
ID3D12GraphicsCommandList2 and WriteBufferImmediate() are used by
Hitman 2, but implementing the function on top of an AMD extension has
no effect on game behaviour. It's commonly used to write debug info.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:11:15 +01:00
Conor McCarthy
0d43c776c5 vkd3d/tests: Add tests for ID3D12GraphicsCommandList2::WriteBufferImmediate().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:11:13 +01:00
Conor McCarthy
9c64642468 vkd3d: Add SetViewInstanceMask() to the ID3D12GraphicsCommandList1 interface.
This method was missing in version 10.0.15063.0 of the SDK, but is
present in version 10.0.18362.0, without a UUID change. Presumably that
means this was simply an omission in the older header, rather than an
API change in the newer header.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:11:10 +01:00