Zebediah Figura
c3a5df7375
vkd3d-shader: Read the SM5 resource type instruction modifier.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:00:58 +02:00
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
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
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
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
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
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
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
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
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
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
a196555513
vkd3d-shader: Rename the VKD3D_DUMMY_SAMPLER_INDEX macro to VKD3D_SHADER_DUMMY_SAMPLER_INDEX.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:19:05 +02:00
Henri Verbeet
23416913f4
vkd3d-shader: Rename the vkd3d_versioned_root_signature_desc structure.
...
To vkd3d_shader_versioned_root_signature_desc.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:19:03 +02:00
Henri Verbeet
823e356460
vkd3d-shader: Rename the vkd3d_root_signature_desc1 structure to vkd3d_shader_root_signature_desc1.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:19:01 +02:00
Henri Verbeet
0f0f2b331e
vkd3d-shader: Rename the vkd3d_root_signature_desc structure to vkd3d_shader_root_signature_desc.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:19:09 +02:00
Henri Verbeet
0056fc7046
vkd3d-shader: Rename the vkd3d_root_signature_version enumeration to vkd3d_shader_root_signature_version.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:19:07 +02:00
Henri Verbeet
9366248ed2
vkd3d-shader: Rename the vkd3d_root_parameter1 structure to vkd3d_shader_root_parameter1.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:19:05 +02:00
Henri Verbeet
62113ff828
vkd3d-shader: Rename the vkd3d_static_sampler_desc structure to vkd3d_shader_static_sampler_desc.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:19:02 +02:00
Henri Verbeet
4bea4b82e9
vkd3d-shader: Rename the vkd3d_root_parameter structure to vkd3d_shader_root_parameter.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:19:44 +02:00
Henri Verbeet
f5e39842fa
vkd3d-shader: Rename the vkd3d_root_descriptor1 structure to vkd3d_shader_root_descriptor1.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:19:42 +02:00
Henri Verbeet
cb9bf177e9
vkd3d-shader: Rename the vkd3d_root_descriptor_table1 structure to vkd3d_shader_root_descriptor_table1.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:19:41 +02:00
Henri Verbeet
0e9f914197
vkd3d-shader: Rename the vkd3d_static_border_color enumeration to vkd3d_shader_static_border_colour.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:19:39 +02:00
Henri Verbeet
0f5dc67015
vkd3d-shader: Rename the vkd3d_root_descriptor structure to vkd3d_shader_root_descriptor.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-16 12:46:34 +02:00
Henri Verbeet
270b31a7db
vkd3d-shader: Rename the vkd3d_root_constants structure to vkd3d_shader_root_constants.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-16 12:46:32 +02:00
Henri Verbeet
36d2127765
vkd3d-shader: Rename the vkd3d_root_descriptor_table structure to vkd3d_shader_root_descriptor_table.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-16 12:46:31 +02:00
Henri Verbeet
8b397eec88
vkd3d-shader: Rename the vkd3d_root_parameter_type enumeration to vkd3d_shader_root_parameter_type.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 18:07:45 +02:00
Henri Verbeet
de252f9b14
vkd3d-shader: Rename the vkd3d_root_descriptor_flags enumeration to vkd3d_shader_root_descriptor_flags.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 18:07:40 +02:00
Henri Verbeet
6b0eb46716
vkd3d-shader: Rename the vkd3d_descriptor_range1 structure to vkd3d_shader_descriptor_range1.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 18:07:37 +02:00
Henri Verbeet
de76e7c0b5
vkd3d-shader: Rename the vkd3d_descriptor_range structure to vkd3d_shader_descriptor_range.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 18:07:27 +02:00
Henri Verbeet
7c2120124b
vkd3d-shader: Rename the vkd3d_descriptor_range_flags enumeration to vkd3d_shader_descriptor_range_flags.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 18:07:23 +02:00
Henri Verbeet
6e0ab34564
vkd3d-shader: Rename the vkd3d_descriptor_range_type enumeration to vkd3d_shader_descriptor_range_type.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-10 17:08:19 +02:00
Henri Verbeet
edd585ea44
vkd3d-shader: Rename the VKD3D_SWIZZLE macro to VKD3D_SHADER_SWIZZLE.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-10 17:08:17 +02:00
Henri Verbeet
3a9eb1839e
vkd3d-shader: Rename the vkd3d_sysval_semantic enumeration to vkd3d_shader_sysval_semantic.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-10 17:08:16 +02:00
Henri Verbeet
2da59a1056
vkd3d-shader: Rename the vkd3d_component_type enumeration to vkd3d_shader_component_type.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-10 17:08:14 +02:00
Henri Verbeet
11980c3944
vkd3d-shader: Introduce struct vkd3d_shader_resource.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:05:14 +02:00
Henri Verbeet
015a9aacaf
vkd3d-shader: Get rid of the "use_vocp" field in the vkd3d_shader_scan_info structure.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:05:08 +02:00
Henri Verbeet
760bafd620
vkd3d-shader: Store sampler comparison mode information in the descriptor scan info.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:57:48 +02:00
Henri Verbeet
e560db5027
vkd3d-shader: Store UAV read information in the descriptor scan info.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:57:46 +02:00
Henri Verbeet
352b8118f3
vkd3d-shader: Store UAV counter information in the descriptor scan info.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:57:44 +02:00
Henri Verbeet
cf04ed68a7
vkd3d-shader: Report descriptor resource types in vkd3d_shader_scan_dxbc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:57:42 +02:00
Henri Verbeet
25c0966b69
vkd3d-shader: Report descriptor usage information in vkd3d_shader_scan_dxbc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:57:39 +02:00
Henri Verbeet
25ef055062
vkd3d-shader: Allow the name of the SPIR-V entry point to be specified.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 16:25:23 +02:00
Henri Verbeet
7e4fc14a31
vkd3d-shader: Rename the vkd3d_tessellator_partitioning enumeration.
...
To vkd3d_shader_tessellator_partitioning.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 16:25:21 +02:00
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
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
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
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
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
Philip Rebohle
6c65f1b814
vkd3d-shader: Support vicp inputs for hull shader fork/join phases.
...
This case needs special care since both VKD3DSPR_INPUT in the
control point phase and VKD3DSPR_INCONTROLPOINT in fork/join
phases refer to the same set of input variables, and we should
not declare input variables with the same location twice.
Encountered in Shadow of the Tomb Raider.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 19:24:33 +01:00
Philip Rebohle
1eb7eca411
vkd3d-shader: Don't redundantly override shader output info.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:18:23 +01:00
Philip Rebohle
0e00448229
vkd3d-shader: Handle tessellation factor built-ins in emit_output.
...
Uses the private patch constant array for tessellation factor built-ins.
Fixes two separate issues encountered in Shadow of the Tomb Raider:
- The output registers that have one component mapped to any of
the TESS_FACTOR sysvals can have their other components mapped
to a regular patch constant output, in which case we need to
use a private io variable.
- The tessellation factor outputs are not necessarily dynamically
indexed within shader code. Previously, this did not work correctly
and lead to invalid store operations in the generated SPIR-V.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:17:34 +01:00
Philip Rebohle
306acf2193
vkd3d-shader: Compute correct output array index for line tess factors.
...
Line tessellation factors use two different DXBC semantics that
both map to the same SPIR-V built-in. In this case, we cannot
rely on the semantic index.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:17:32 +01:00
Philip Rebohle
7ac0873b4a
vkd3d-shader: Use full write mask for variables for array built-ins.
...
Private variables are always vec4, so using a sparse write mask here
will lead to invalid code being generated when accessing the variable.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:17:29 +01:00
Philip Rebohle
a08ee1e2df
vkd3d-shader: Use private array variable for patch constant outputs.
...
Fork and join phases in hull shaders allow dynamic indexing for
all output registers, not just the tessellation factor built-ins.
Moreover, the patch constant output register space is shared with
join phases, which can read back the outputs computed in the fork
phases, also allowing dynamic indexing.
In order to support this in a not overly complex way, use a private
array representing the entire patch constant space, and use epilogue
functions to assign them to the actual output variables.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:17:26 +01:00
Philip Rebohle
3fe9997010
vkd3d-shader: Add array index field to private output variable info.
...
Needed to support dynamically indexed output arrays.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:17:22 +01:00
Philip Rebohle
04ec461fb4
vkd3d-shader: Don't fetch output variable id before writing output info.
...
Otherwise, if a private variable is used for the given output,
vkd3d_dxbc_compiler_emit_store_shader_output will write to the
private variable again instead of the actual output, and some
outputs may never be emitted. This is common in hull shaders.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:17:19 +01:00
Philip Rebohle
907d733ffe
vkd3d-shader: Don't shift output array component write mask.
...
Fixes an assertion when compiling shaders with more than four
clip or cull distances. Output arrays are arrays of scalars,
so shifting the write mask is not very meaningful.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 16:39:04 +02:00
Henri Verbeet
a6f6d4fbb1
vkd3d-shader: Always emit the invocation count for geometry shaders.
...
Even if the shader doesn't explicitly declare it.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 19:16:48 +02:00