Commit Graph

226 Commits

Author SHA1 Message Date
Zebediah Figura
bd88613c3e vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_root_parameters().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 13:01:42 +02:00
Zebediah Figura
e285eb2d23 vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_root_descriptor1().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 13:01:40 +02:00
Zebediah Figura
7cf0d84ec9 vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_root_descriptor().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 13:01:38 +02:00
Zebediah Figura
c95d028ee2 vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_root_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>
2021-07-29 13:01:36 +02:00
Zebediah Figura
63fbb62301 vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_descriptor_table1().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 19:59:14 +02:00
Zebediah Figura
d1671829d9 vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_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>
2021-07-28 19:59:13 +02:00
Zebediah Figura
6f8be6c208 vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_descriptor_ranges1().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 19:59:11 +02:00
Zebediah Figura
a0fc2a20f3 vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_descriptor_ranges().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 19:59:09 +02:00
Zebediah Figura
743b1fc090 vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_root_signature_header().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 19:59:07 +02:00
Conor McCarthy
4e63842a73 vkd3d-shader: Implement DMOV instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 19:59:03 +02:00
Zebediah Figura
f5821c5dce vkd3d-shader: Use struct vkd3d_bytecode_buffer in vkd3d_shader_serialize_root_signature().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-27 13:55:44 +02:00
Conor McCarthy
59cf70142a vkd3d-shader: Implement DEQ instruction.
Source modifiers and immediate constants are not supported.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 21:11:13 +02:00
Conor McCarthy
1acb3de9bd vkd3d-shader: Normalise descriptor register indices to shader model 5.1.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 21:14:44 +02:00
Conor McCarthy
57faa09dc0 vkd3d-shader: Introduce shader_sm4_error() for reporting via vkd3d_shader_verror().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:45:28 +02:00
Conor McCarthy
219bd1fc07 vkd3d-shader: Call shader_sm4_set_descriptor_register_range() for raw resources.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:45:10 +02:00
Conor McCarthy
03422e9681 vkd3d-shader: Call shader_sm4_set_descriptor_register_range() for structured resources.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:45:08 +02:00
Conor McCarthy
09231ca8cd vkd3d-shader: Call shader_sm4_set_descriptor_register_range() for structured UAVs.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:45:06 +02:00
Conor McCarthy
bc3a9cdb78 vkd3d-shader: Call shader_sm4_set_descriptor_register_range() for raw UAVs.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:45:04 +02:00
Conor McCarthy
bbd44e854e vkd3d-shader: Call shader_sm4_set_descriptor_register_range() for samplers.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:45:01 +02:00
Conor McCarthy
911f5649cc vkd3d-shader: Call shader_sm4_set_descriptor_register_range() for constant buffers.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:44:58 +02:00
Conor McCarthy
31613e060b vkd3d-shader: Introduce shader_sm4_set_descriptor_register_range().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:44:56 +02:00
Conor McCarthy
533d901a24 vkd3d-shader: Store a vkd3d_shader_register_range structure in struct vkd3d_shader_constant_buffer.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 21:49:17 +02:00
Conor McCarthy
1b716f8c28 vkd3d-shader: Store a vkd3d_shader_register_range structure in struct vkd3d_shader_sampler.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 21:49:14 +02:00
Conor McCarthy
af2714832b vkd3d-shader: Introduce struct vkd3d_shader_register_range.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 21:49:12 +02:00
Andrey Gusev
24537d3693 vkd3d-shader: Add a fall-through to default case in shader_sm4_read_param().
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:25:52 +01:00
Henri Verbeet
804d191aee vkd3d-shader: Recognise the "raw_buffer" and "structured_buffer" shader model 5 resource types.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 21:12:43 +01:00
Henri Verbeet
3bacb33556 vkd3d-shader: Parse shader model 5 resource strides.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 21:12:43 +01:00
Henri Verbeet
d40d8c858e vkd3d-shader: Explicitly handle "none" modifiers in shader_sm4_read_param().
These (seemingly) have no effect, it's not entirely clear why they are
generated.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 21:12:43 +01:00
Henri Verbeet
8315d319f6 vkd3d-shader: Rename VKD3D_SHADER_INSTRUCTION_HANDLER to vkd3d_shader_opcode.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 16:00:03 +01:00
Zebediah Figura
cdfca2fab7 vkd3d-shader: Move location tracking out of the vkd3d_shader_message_context structure.
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-12-15 22:19:32 +01:00
Zebediah Figura
5fb9bcdd14 vkd3d-shader: Don't allocate an initial buffer in vkd3d_string_buffer_init().
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-10-09 16:15:12 +02:00
Zebediah Figura
0072fb213a vkd3d-shader: Pass the output pointer to vkd3d_shader_message_context_copy_messages().
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-10-09 16:15:08 +02:00
Isabella Bosia
9136e56435 vkd3d-shader: Parse all 4 data type components.
Signed-off-by: Isabella Bosia <ibosia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 15:00:26 +02:00
Isabella Bosia
8d9d20d47b vkd3d-shader: Add valid vkd3d_sm4_data_type types.
Signed-off-by: Isabella Bosia <ibosia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 15:00:23 +02:00
Zebediah Figura
82c42588e7 vkd3d-shader: Separate the allocated and used mask in struct vkd3d_shader_signature_element.
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-18 22:08:22 +02:00
Isabella Bosia
cf3388dad7 vkd3d-shader: Fix out of bound array accesses.
Signed-off-by: Isabella Bosia <ibosia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-16 17:12:37 +02:00
Zebediah Figura
7dd8c15d49 vkd3d-shader: Read the SM5 resource data 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:01:00 +02:00
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
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
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
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
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
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
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
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
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
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
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
Józef Kucia
4a0b62084a vkd3d-shader: Forbid mixing samplers with CBVs/SRVs/UAVs in root signatures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-12 22:37:40 +02:00
Józef Kucia
faeb03c1a3 vkd3d-shader: Add enum for minimum-precision data types.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 16:25:02 +02:00
Philip Rebohle
578ce3653d vkd3d-shader: Parse ISG1, PSG1 and OSG1 signatures.
These signatures extend the OSG5 format by a minimum
precision hint, which gets ignored for now but could
be implemented using 16-bit floats in the future.

Fixes some shader parsing errors in Resident Evil 2.

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-05-20 20:33:27 +02:00
Józef Kucia
2faae71f5a vkd3d-shader: Use more appropriate variables for descriptor range count.
Helps Clang Static Analyzer.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:54:13 +02:00
Józef Kucia
c77f02ca01 vkd3d-shader: Add support for parsing Shader Model 5.1 bytecode.
Translation to SPIR-V isn't implemented yet.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 09:25:40 +02:00
Józef Kucia
374bcd276e vkd3d-shader: Remove versioned_ prefix from root signature functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:20:18 +02:00
Józef Kucia
070de4dfbb vkd3d-shader: Add FIXME() for unknown root signature descriptor flags.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:20:15 +02:00
Józef Kucia
21ab63c4d6 vkd3d-shader: Remove vkd3d_shader_serialize_root_signature().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 10:48:24 +02:00
Józef Kucia
a9ad6f637d vkd3d-shader: Implement serialization for versioned root signatures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 10:48:17 +02:00
Józef Kucia
16f36b0c9b vkd3d-shader: Remove vkd3d_shader_parse_root_signature().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 16:24:09 +02:00
Józef Kucia
fbeabe0849 vkd3d-shader: Implement conversion between root signature 1.0 and 1.1.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 16:24:04 +02:00
Józef Kucia
f9b9ae8cc7 vkd3d-shader: Implement parsing of root signature 1.1.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 16:23:53 +02:00
Józef Kucia
c6477964a3 vkd3d-shader: Translate eval_centroid shader instructions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:53:29 +01:00
Józef Kucia
b6de566e3a vkd3d-shader: Add basic support for dcl_index_range.
We can address SPIR-V arrays dynamically.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 19:15:10 +01:00
Józef Kucia
7b84adec32 vkd3d-shader: Set xxxx swizzle for scalar registers.
Mainly for vOutputControlPointID.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 19:15:00 +01:00
Józef Kucia
3fbbc68160 vkd3d-shader: Replace VKD3DSIH_TABLE_SIZE with VKD3DSIH_INVALID.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 19:14:58 +01:00
Józef Kucia
559c0191c8 vkd3d-shader: Implement vCoverage shader register.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-24 17:03:59 +01:00
Józef Kucia
54d9714fcd vkd3d-shader: Implement oMask shader register.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:43:01 +01:00
Józef Kucia
49e55dd639 vkd3d-shader: Implement DXBC checksum for root signatures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-20 19:41:44 +01:00
Józef Kucia
a7aaa09eb3 vkd3d-shader: Avoid BOOL.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:28:16 +01:00
Józef Kucia
8ac9b120fe vkd3d-shader: Avoid SIZE_T.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-13 20:49:43 +01:00
Józef Kucia
41ca2469b2 include: Add STATIC_ASSERT() macro.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-08 19:07:37 +01:00
Józef Kucia
c81e28c03a vkd3d-shader: Implement conservative depth output.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-19 21:43:02 +02:00
Józef Kucia
d11b9618e0 vkd3d-shader: Use TRACE() for skipped DXBC chunks.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 20:32:58 +02:00
Józef Kucia
bca28c79ec vkd3d-shader: Downgrade FIXME() about unhandled instruction modifiers to WARN().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 23:17:42 +02:00
Józef Kucia
a5808cfdd7 libs/vkd3d-shader: Import shader tracing from wined3d.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-29 19:33:04 +02:00
Józef Kucia
2fa29dd823 libs/vkd3d-shader: Recognize more shader registers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-29 19:32:52 +02:00
Józef Kucia
3ddb29c16a libs/vkd3d-shader: Parse precise flags.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-29 19:32:48 +02:00
Józef Kucia
926f844ead libs/vkd3d-shader: Rework swizzle macros.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-24 23:29:20 +02:00
Józef Kucia
83ce4553ea libs/vkd3d-shader: Introduce VKD3DSPR_INVALID.
Fixes clang warnings.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-13 19:08:05 +02:00
Józef Kucia
6a1b3a3fb5 libs/vkd3d-shader: Validate DXBC data size.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-11 18:56:08 +02:00
Józef Kucia
844c83a837 libs/vkd3d-shader: Avoid Windows data types in public API.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 20:00:35 +01:00
Józef Kucia
fddf86e6ea libs/vkd3d-shader: Remove dependency on D3D12 headers.
We would like to allow building libvkd3d-shader as a standalone library
without our Direct3D translation layers.

In the long term, it should be possible to build and use libvkd3d-shader
without Win32 data types, Vulkan headers and libs.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 20:00:31 +01:00
Józef Kucia
0ecbdbe823 libs/vkd3d-shader: Emit InvocationId for geometry and tessellation shaders.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 18:57:05 +01:00
Henri Verbeet
2d8e2fbe86 libs/vkd3d-shader: Validate the DXBC version.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:44 +01:00
Józef Kucia
31ec7b9160 libs/vkd3d-shader: Translate dcl_output_topology instructions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-11 22:31:50 +01:00
Józef Kucia
e0cb3776c1 libs/vkd3d-shader: Fix discard_z instruction. 2017-12-11 12:55:55 +01:00
Józef Kucia
94a33020d3 libs/vkd3d-shader: Use switch statement in shader_parse_root_parameters(). 2017-10-10 16:57:36 +02:00
Józef Kucia
4522a80de8 libs/vkd3d-shader: Use switch statement in shader_write_root_parameters(). 2017-10-10 16:57:36 +02:00
Józef Kucia
18b285328e libs/vkd3d-shader: Add version argument to vkd3d_shader_serialize_root_signature(). 2017-10-10 16:57:36 +02:00
Józef Kucia
6b43a5fe38 libs/vkd3d-shader: Implement root signature serialization. 2017-10-10 16:02:09 +02:00
Józef Kucia
9feb7a3956 libs/vkd3d-shader: Recognize nop instruction. 2017-10-05 15:58:51 +02:00
Józef Kucia
b19fe74284 libs/vkd3d-shader: Export shader signature parsing. 2017-09-11 22:35:16 +02:00
Józef Kucia
8f631c8b0c libs/vkd3d-shader: Make bytecode parser responsible for setting scalar register write masks. 2017-08-18 14:52:40 +02:00
Józef Kucia
17e49dc6c6 libs/vkd3d-shader: Translate store_raw instructions. 2017-08-11 13:58:04 +02:00
Józef Kucia
ae8d8036c6 libs/vkd3d-shader: Implement switch control flow instructions. 2017-08-01 10:51:45 +02:00
Józef Kucia
fe522495aa libs/vkd3d-shader: Get rid of needless temporary variables. 2017-07-06 10:12:22 +02:00
Józef Kucia
f906df13b3 libs/vkd3d-shader: Implement parsing of root signature static samplers. 2017-07-06 10:12:22 +02:00
Józef Kucia
3f03cd1ec8 libs/vkd3d-shader: Implement root signature parsing. 2017-06-27 13:16:47 +02:00
Józef Kucia
4ab5ced2fc libs/vkd3d-shader: Import DXBC parser from Wine d3d11 implementation. 2017-06-16 22:38:21 +02:00
Józef Kucia
31c6bfe24f libs/vkd3d-shader: Import SM4+ bytecode parser from Wine. 2017-06-16 22:38:21 +02:00