Commit Graph

226 Commits

Author SHA1 Message Date
Zebediah Figura
e2aed38509 vkd3d-shader/spirv: Avoid using DXBC-specific definitions. 2022-11-08 20:52:32 +01:00
Zebediah Figura
ba08825ccd vkd3d-shader/sm4: Use the VKD3D_DXBC_MAX_SOURCE_COUNT macro where possible. 2022-11-08 20:52:31 +01:00
Zebediah Figura
fa17a170b1 vkd3d-shader/sm4: Recognise the msad opcode.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:31:08 +01:00
Henri Verbeet
273316a742 vkd3d-shader/sm4: Make the "reg" parameter to shader_sm4_set_descriptor_register_range() const.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-01 22:31:33 +01:00
Matteo Bruni
02ac34d0a2 vkd3d-shader/sm4: Skip non-color outputs in shader output mapping.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:02:01 +01:00
Alexandre Julliard
e21928f6ee vkd3d-shader: Consistently use uint32_t for pointers to shader data.
Mixing uint32_t and DWORD pointers causes warnings on Windows.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
2022-01-31 15:58:08 +01:00
Zebediah Figura
4fdd6f0935 vkd3d-shader: Trace tiled resource opcodes.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-13 17:20:44 +01:00
Conor McCarthy
eb1ae29de0 vkd3d-shader/dxbc: Emit a fixme when a DXIL shader chunk is found.
Simplifies detection of SM6+ shaders, e.g. Horizon Zero Dawn and
Cyberpunk 2077.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-10 20:10:08 +01:00
Zebediah Figura
2edec69da4 vkd3d-shader: Make shader_extract_from_dxbc() static.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-06 11:34:19 +01:00
Conor McCarthy
4a2fbe54c0 vkd3d-shader/spirv: Implement support for stencil export.
Based on a vkd3d-proton patch by Philip Rebohle.

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-10-18 18:37:00 +02:00
Henri Verbeet
28316b2694 vkd3d-shader: Introduce struct vkd3d_shader_parser_ops.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 18:35:42 +02:00
Henri Verbeet
f5c6f2ea0e vkd3d-shader: Introduce vkd3d_shader_parser_error().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 18:35:40 +02:00
Henri Verbeet
a0c2e52b4b vkd3d-shader/sm4: Set an error state when shader_sm4_error() is called.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 18:35:38 +02:00
Henri Verbeet
8543a1741e vkd3d-shader/sm4: Use the parser location in shader_sm4_error().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 18:35:36 +02:00
Henri Verbeet
18e838a1cc vkd3d-shader/sm4: Maintain the parser location in the vkd3d_shader_parser structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 15:34:21 +02:00
Henri Verbeet
aca39afd73 vkd3d-shader/sm4: Store the message context pointer in the vkd3d_shader_parser structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 15:34:20 +02:00
Henri Verbeet
6be802ac1f vkd3d-shader/sm4: Get rid of the redundant "shader_version" field in the vkd3d_shader_sm4_parser structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 15:34:18 +02:00
Henri Verbeet
3023d6ba46 vkd3d-shader/sm4: Rename the vkd3d_sm4_data structure to vkd3d_shader_sm4_parser.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 15:34:16 +02:00
Henri Verbeet
88c8d11805 vkd3d-shader/sm4: Store a vkd3d_shader_parser structure in the vkd3d_sm4_data structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 15:34:14 +02:00
Conor McCarthy
04bb6c395f vkd3d-shader/sm4: Skip second-order extended operands.
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-09-28 20:17:35 +02:00
Conor McCarthy
9e40fe5768 vkd3d-shader/sm4: Parse the "non-uniform" modifier.
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-09-28 20:17:34 +02:00
Conor McCarthy
a422e37953 vkd3d-shader/sm4: Parse register precision modifiers.
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-09-28 20:17:32 +02:00
Conor McCarthy
cddd978be6 vkd3d-shader/sm4: Parse register modifiers separately from the extended operand type.
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-09-28 20:17:30 +02:00
Henri Verbeet
4509f089e5 vkd3d-shader: Introduce shader_sm4_reset().
This allows us to drop the "ptr" argument to various functions.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 17:52:16 +02:00
Henri Verbeet
26009069dd vkd3d-shader: Pass a vkd3d_shader_parser structure to shader_sm4_is_end().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 17:52:14 +02:00
Henri Verbeet
bb482332bf vkd3d-shader: Pass a vkd3d_shader_parser structure to shader_sm4_read_instruction().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 17:52:13 +02:00
Henri Verbeet
12190ee3a9 vkd3d-shader: Pass a vkd3d_shader_parser structure to shader_sm4_read_header().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 17:52:11 +02:00
Henri Verbeet
661570254d vkd3d-shader: Pass a vkd3d_shader_parser structure to shader_sm4_free().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 17:52:09 +02:00
Zebediah Figura
96d523722d vkd3d-shader/hlsl: Write empty SM4 shaders.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-19 20:42:04 +02:00
Conor McCarthy
f3c19dfedb vkd3d-shader: Implement UTOD 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-08-12 17:44:36 +02:00
Conor McCarthy
3623a99cf6 vkd3d-shader: Implement ITOD 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-08-12 17:44:32 +02:00
Conor McCarthy
88c08df03b vkd3d-shader: Implement DTOU 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-08-12 17:44:30 +02:00
Conor McCarthy
c61b573d9c vkd3d-shader: Implement DTOI 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-08-12 17:44:26 +02:00
Conor McCarthy
580747b224 vkd3d-shader: Implement DTOF 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-08-12 17:44:22 +02:00
Conor McCarthy
821389d274 vkd3d-shader: Implement FTOD 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-08-12 17:44:18 +02:00
Conor McCarthy
00752b8fa6 vkd3d-shader: Implement DMOVC instruction.
Based in part on a vkd3d-proton patch by Joshua Ashton.

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-08-11 11:38:29 +02:00
Conor McCarthy
c3363faba2 vkd3d-shader: Implement DRCP 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-08-11 11:38:27 +02:00
Conor McCarthy
6656a92c45 vkd3d-shader: Implement DDIV 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-08-11 11:38:25 +02:00
Conor McCarthy
25b559ba25 vkd3d-shader: Implement DMUL 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-08-11 11:38:23 +02:00
Conor McCarthy
242261bc52 vkd3d-shader: Implement DFMA 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-08-09 21:43:40 +02:00
Conor McCarthy
74a9a0b167 vkd3d-shader: Implement DMIN 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-08-09 21:43:36 +02:00
Conor McCarthy
44a3ebb77c vkd3d-shader: Implement DMAX 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-08-09 21:43:34 +02:00
Zebediah Figura
688cdb218e vkd3d-shader: Move SM4 byte code definitions to a separate 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-08-06 12:31:17 +02:00
Conor McCarthy
fabadf584f vkd3d-shader: Implement DNE 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-08-04 18:21:43 +02:00
Conor McCarthy
4ea3da3067 vkd3d-shader: Implement DLT 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-08-04 18:21:41 +02:00
Conor McCarthy
df60cffef1 vkd3d-shader: Implement DGE 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-08-04 18:21:38 +02:00
Conor McCarthy
eb804a5a9f vkd3d-shader: Implement DADD 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-08-03 15:57:27 +02:00
Conor McCarthy
a9eadaa06a vkd3d-shader: Add a 64-bit immediate constant register type.
Based in part on a vkd3d-proton patch by Joshua Ashton.

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-08-03 15:57:18 +02:00
Zebediah Figura
26caa7136a vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_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-29 13:01:46 +02:00
Zebediah Figura
dda2c4839d vkd3d-shader: Use vkd3d_bytecode_buffer helpers directly in shader_write_static_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>
2021-07-29 13:01:44 +02:00
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