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
Zebediah Figura
ed7cdb3940
vkd3d-shader: Introduce vkd3d_make_u{16, 32}() helpers.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 20:58:24 +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
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
2f09f1d359
vkd3d-shader: Emit saturate modifier for double-precision float registers.
...
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:25 +02:00
Conor McCarthy
c86570dff0
vkd3d-shader: Emit abs modifier for double-precision float registers.
...
Based 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:23 +02:00
Conor McCarthy
506c98b4a2
vkd3d-shader: Handle 64-bit immediate constant registers.
...
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:21 +02:00
Conor McCarthy
8422a3a82a
vkd3d-shader: Create descriptor array symbols 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-29 13:01:32 +02:00
Conor McCarthy
be8f51666e
vkd3d-shader: Handle descriptor array dynamic indexing.
...
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-29 13:01:30 +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
Conor McCarthy
82237796ad
vkd3d-shader: Replace individual SpvCapability bit fields with an array.
...
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:58:52 +02:00
Conor McCarthy
e1b334aff8
vkd3d-shader: Exclude descriptor arrays from push constant buffer searches.
...
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:58:50 +02:00
Conor McCarthy
5bebfe264d
vkd3d-shader: Exclude descriptor arrays from combined sampler searches.
...
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:58:48 +02:00
Conor McCarthy
dbb715a160
vkd3d-shader: Include register ranges in descriptor binding error messages.
...
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:58:46 +02:00
Conor McCarthy
b01104e47d
vkd3d-shader: Compute XfbOffset for the slot of the specified element.
...
Fixes NVIDIA HairWorks GPU crash on Metro Exodus, and test failures
in test_line_tessellation().
Based on a vkd3d-proton patch by Hans-Kristian Arntzen.
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-26 17:35:35 +02:00
Conor McCarthy
951af90f3e
vkd3d-shader: Create descriptor array symbols for 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-26 17:35:23 +02:00
Conor McCarthy
a97d090010
vkd3d-shader: Get descriptor info for descriptor arrays.
...
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-26 17:35:21 +02:00
Conor McCarthy
85eff9373d
vkd3d-shader: Introduce to struct vkd3d_symbol a descriptor array symbol 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-07-26 17:35:18 +02:00
Conor McCarthy
2924a481a7
vkd3d-shader: Find bindings for descriptor arrays.
...
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-26 17:35:01 +02:00
Conor McCarthy
d11510f02e
vkd3d-shader: Emit negation modifier for double-precision float registers.
...
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-26 17:34:49 +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
4b919a10ad
vkd3d-shader: Add shader component type double.
...
Based 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-07-19 12:14:20 +02:00
Conor McCarthy
d027ac4c15
vkd3d-shader: Enable Float64 capability if flagged in DXBC.
...
Based 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-07-19 12:14:16 +02:00
Conor McCarthy
21b638377e
vkd3d-shader: Pass a struct vkd3d_shader_register_range to vkd3d_dxbc_compiler_get_descriptor_binding().
...
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-28 13:44:35 +02:00
Conor McCarthy
df87c251f9
vkd3d-shader: Pass a struct vkd3d_shader_register_range to vkd3d_dxbc_compiler_emit_descriptor_binding_for_reg().
...
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-28 13:44:31 +02:00
Conor McCarthy
390b5639a8
vkd3d-shader: Pass a struct vkd3d_shader_register_range to vkd3d_dxbc_compiler_get_descriptor_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>
2021-06-28 13:44:28 +02:00
Conor McCarthy
ead2c22fff
vkd3d-shader: Pass a struct vkd3d_shader_register_range to vkd3d_dxbc_compiler_get_image_type_id().
...
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-28 13:44:24 +02:00
Conor McCarthy
e2d61f8da3
vkd3d-shader: Pass a struct vkd3d_shader_register_range to vkd3d_dxbc_compiler_emit_combined_sampler_declarations().
...
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-28 13:44:21 +02:00
Conor McCarthy
b38f94cfdc
vkd3d-shader: Store a vkd3d_shader_register_range structure in struct vkd3d_symbol_sampler_data.
...
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:20 +02:00
Conor McCarthy
0c04c1777a
vkd3d-shader: Store a vkd3d_shader_register_range structure in struct vkd3d_symbol_resource_data.
...
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:19 +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
Henri Verbeet
9007df1067
vkd3d-shader: Set correct dcl masks in vkd3d_dxbc_compiler_emit_hull_shader_inputs().
...
Avoiding some duplicate input declarations.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
f59e9dfeee
vkd3d-shader: Avoid redeclaring inputs in vkd3d_dxbc_compiler_emit_default_control_point_phase().
...
We've already set these up in vkd3d_dxbc_compiler_emit_hull_shader_inputs().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
1f92c1dd53
vkd3d-shader: Export patch constants at the end of tessellation control shaders.
...
As opposed to at the end of each fork/join phase. This eliminates a
bunch of redundant SPIR-V, since it's not uncommon for fork/join phases
to only write to individual output components.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
851afc6229
vkd3d-shader: Support patch constant inputs in tessellation control shader join phases.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
cad26f7f2c
vkd3d-shader: Use the (potentially) modified write mask as dcl_mask in vkd3d_dxbc_compiler_emit_input().
...
Like outputs, when inputs are coalesced, the write mask is modified by
needs_private_io_variable().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
3b4b898cc5
vkd3d-shader: Use the (potentially) modified write mask as dcl_mask in vkd3d_dxbc_compiler_emit_output().
...
When outputs are coalesced, the write mask is modified by
needs_private_io_variable(). We want the "dcl_mask" field to reflect
that as well.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
b584668a81
vkd3d-shader: Properly handle coalesced outputs in vkd3d_dxbc_compiler_emit_store_shader_output().
...
Multiple patch constant or output signature elements may be coalesced
into a single output register by needs_private_io_variable() in
vkd3d_dxbc_compiler_emit_output(). When this happens, only the original
element will have a corresponding variable ID assigned in output_info[].
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
6d032f6d1c
vkd3d-shader: Keep track of declared SPIR-V output components.
...
Much like we do for input components, for much of the same reasons.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 21:32:31 +01:00
Henri Verbeet
944665ed11
vkd3d-shader: Do not print FIXMEs for VKD3DSUF_ORDER_PRESERVING_COUNTER when generating SPIR-V.
...
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
Henri Verbeet
8313225cc6
vkd3d-shader: Keep track of declared SPIR-V input components.
...
In particular, a shader may declare e.g. v6.x to refer to an output from the
previous stage, and v6.y to refer to a builtin, or the other way around. At
the same time, different hull shader phases may redeclare the same register.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 21:01:54 +01:00
Henri Verbeet
3a710385f3
vkd3d-shader: Handle non-vec4 builtins in vkd3d_dxbc_compiler_emit_hull_shader_input_initialisation().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 21:01:50 +01:00
Zebediah Figura
16aceacc0c
vkd3d-shader: Implement global resource memory barriers.
...
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-02-04 22:32:42 +01:00
Henri Verbeet
0c73afd424
vkd3d-shader: Implement relative addressing of tessellation control shader inputs.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 22:27:57 +01:00
Henri Verbeet
73a937edd0
vkd3d-shader: Decorate "precise" arithmetic instructions with SpvDecorationNoContraction.
...
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-01-12 20:35:23 +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
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
Henri Verbeet
56cd4a94d5
Release 1.2.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:56:18 +02:00
Henri Verbeet
4fda96190b
vkd3d-shader: Invert the "FRIENDLY_NAMES" output formatting flag.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:16:15 +02:00
Henri Verbeet
7c64e827ca
vkd3d-shader: Invert the "NO_HEADER" output formatting flag.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:16:05 +02:00
Henri Verbeet
8cc0abfca0
vkd3d-shader: Rename the "SHOW_BYTE_OFFSET" output formatting flag to just "OFFSETS".
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:16:02 +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
Henri Verbeet
5e523cedca
vkd3d-shader: Use proper variables for epilogue arguments.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 12:28:33 +02:00
Henri Verbeet
e339cc0edb
vkd3d-shader: Do not use built-ins for hull shader clip/cull distance built-ins.
...
We need these to be per-vertex. This fixes the Wine d3d11
test_clip_distance() test.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 12:28:33 +02:00
Henri Verbeet
56b042d1fa
vkd3d-shader: Enable the corresponding capabilities when using the clip/cull distance built-ins.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 12:28:33 +02:00
Isabella Bosia
75f239dcbe
vkd3d-shader: Add formatting compiler options.
...
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-07 21:01:07 +02:00
Isabella Bosia
f222f99011
vkd3d-shader: Implement VKD3D_SHADER_TARGET_SPIRV_TEXT.
...
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-07 21:01:06 +02:00
Isabella Bosia
e75a0d6f14
vkd3d-shader: Implement vkd3d_spirv_binary_to_text helper.
...
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-07 21:01:04 +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
7bae1a606a
vkd3d-shader: Support register spaces for combined samplers.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:05:50 +02:00
Henri Verbeet
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
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
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
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
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
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
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
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
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
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
Hans-Kristian Arntzen
7a7ed132ec
vkd3d-shader: Fix MSVC build.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 19:15:16 +02:00
Philip Rebohle
ae44e06deb
vkd3d-shader: Enable DemoteToHelperInvocation capability.
...
Fixes validation errors complaining about invalid shader modules.
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-09-13 19:31:16 +02:00
Józef Kucia
077e8b1459
vkd3d-shader: Add support for SPV_EXT_demote_to_helper_invocation.
...
Requires SPIRV-Headers commit dcce859e34cf0c23625ec75ac44df750aa2f4d70.
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-07-31 08:24:34 +02:00
Józef Kucia
eb340126b6
vkd3d-common: Move vkd3d_write_mask_is_contiguous() from vkd3d-shader.
...
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-07-05 17:52:04 +02:00
Józef Kucia
3172faf612
vkd3d-shader: Avoid multiple PrimitiveId declarations in hull 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>
2019-06-25 19:23:08 +02:00
Józef Kucia
0bde4c7dca
vkd3d-shader: Fix component decoration for shader IO variables.
...
This fixes a regression introduced by commit
91820630cb
.
We need to take into account the combined write mask returned from
needs_private_io_variable().
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-18 16:40:38 +02:00
Józef Kucia
ecdcb5c1b1
vkd3d-shader: Make sure that InvocationId is emitted once in hull 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>
2019-06-12 22:37:48 +02:00
Józef Kucia
a81729cf88
vkd3d-shader: Assign unique locations for patch constants.
...
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:46 +02:00
Józef Kucia
91820630cb
vkd3d-shader: Try to avoid private IO variables even harder.
...
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-14 20:13:11 +02:00
Józef Kucia
267f10df8b
vkd3d-shader: Handle interpolation mode in vkd3d_dxbc_compiler_emit_input().
...
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-14 20:13:09 +02:00
Józef Kucia
f0530d92b8
vkd3d-shader: Clear output register status while leaving control point phase.
...
We need to clear output register status when epilogue function isn't
used.
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-14 20:13:06 +02:00
Józef Kucia
68a4b89d61
vkd3d-shader: Do not assume destination is 4 component vector in vkd3d_dxbc_compiler_emit_store().
...
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-14 20:13:03 +02:00
Józef Kucia
f650b2f6ac
vkd3d-shader: Try harder to avoid private variables for shader outputs.
...
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-14 20:13:00 +02:00
Józef Kucia
1f8cde763a
vkd3d-shader: Avoid generating debug names for hull shader SPIR-V built-ins.
...
SPIRV Tools disassembler generates pretty names for SPIR-V built-ins.
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-14 20:12:57 +02:00
Józef Kucia
3b6a63425a
vkd3d-shader: Allow vPrim in hull shader phases.
...
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-14 20:12:54 +02:00
Józef Kucia
df72746729
vkd3d-shader: Use locale-insensitive string comparison.
...
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:20 +02:00
Józef Kucia
ef71edcb32
vkd3d-shader: Remove dead assignment.
...
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:10 +02:00
Józef Kucia
3963316c50
vkd3d-shader: Translate lod 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-04-30 09:25:45 +02:00
Józef Kucia
ee3994a1cd
vkd3d-shader: Simplify resource declaration handling in SPIR-V generator.
...
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:42 +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
9046233492
vkd3d-shader: Improve ID assignment for specialization constants.
...
Allows using 0 as SpecId.
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:32 +02:00
Józef Kucia
3393719692
vkd3d-shader: Translate samplepos instructions.
...
This returns standard sample locations. DXC and glslang do the same thing.
d4d0b29752
In the long term, we could also add a shader parameter to pass sample
positions to the shader compiler.
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:25 +02:00
Józef Kucia
def3a71513
vkd3d-shader: Make sure that specialization constants are emitted once.
...
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-26 16:37:23 +02:00
Józef Kucia
004f33432a
vkd3d-shader: Use specialization constants by default for shader parameters.
...
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-26 16:37:22 +02:00
Józef Kucia
63d12751bb
vkd3d-shader: Add support for specialization constants.
...
Allows reusing the same SPIR-V binary with different shader parameters.
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-26 16:37:20 +02:00
Józef Kucia
f510e93948
vkd3d-shader: Implement sampleinfo for rasterizer.
...
Also adds initial infrastructure for more flexible shader parameters.
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-26 16:37:18 +02:00
Józef Kucia
2bdc63d682
vkd3d-shader: Fix write mask for shader inputs.
...
Shader inputs with non-contiguous write masks (e.g. xyw) were not
handled properly in rare cases.
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-26 16:37:13 +02:00
Józef Kucia
f7fa7a3fb8
vkd3d-shader: Assert that write masks are valid.
...
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-08 19:39:41 +02:00
Józef Kucia
a46a2fb21b
vkd3d-shader: Avoid mixing enum types (Coverity).
...
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-08 19:39:36 +02:00
Józef Kucia
41274e6285
vkd3d: Drop support for dummy sampler.
...
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-04 17:25:23 +02:00
Józef Kucia
5842898cc7
vkd3d-shader: Drop support for dummy samplers.
...
This shouldn't be needed by any Vulkan driver anymore.
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-04 17:25:21 +02:00
Józef Kucia
acc9430abe
vkd3d-shader: Fix SV_Position.w in pixel 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>
2019-04-01 21:42:35 +02:00
Józef Kucia
bcd60c21ca
vkd3d-shader: Do not enable SpvCapabilityUniformBufferArrayDynamicIndexing.
...
This capability is for dynamic indexing *arrays* of uniform buffers.
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-19 18:41:28 +01:00
Józef Kucia
27b4779930
vkd3d-shader: Check shader visibility for combined samplers.
...
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-19 18:41:25 +01: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
38f5081496
vkd3d-shader: Translate eval_sample_index 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:27 +01:00
Józef Kucia
19f9745adf
vkd3d-shader: Use epilogue functions for fork and join phases.
...
In order to handle packed outputs properly.
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-06 16:00:39 +01:00
Józef Kucia
74c8ca0f64
vkd3d-shader: Add basic support for vocp 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>
2019-03-06 16:00:37 +01:00
Józef Kucia
7fc98ade64
vkd3d-shader: Use SPIR-V built-ins for hull shader inputs.
...
I missed this case before because apps don't seem to use SV_Position
for hull shader inputs. vkd3d_siv_from_sysval() needs to be restored
for hull 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>
2019-03-06 16:00:34 +01:00
Józef Kucia
67a160683d
vkd3d-shader: Take into account dst write mask for scalar stores.
...
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-06 16:00:32 +01:00
Józef Kucia
0ffaf4a2b7
vkd3d-shader: Introduce is_control_point_phase() helper.
...
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-26 22:08:19 +01:00
Józef Kucia
ff132543c1
vkd3d-shader: Index control point phase outputs by InvocationId.
...
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-26 22:08:16 +01:00
Józef Kucia
0328118947
vkd3d-shader: Handle partial shader output updates in epilogue functions.
...
Fork and join phases quite often write only a few components of an
output variable.
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-26 22:08:14 +01:00
Józef Kucia
bc441fd6c6
vkd3d-shader: Add more advanced helper for vector shuffle.
...
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-26 22:08:10 +01:00
Józef Kucia
6c70edf511
vkd3d-shader: Remove output register symbols while leaving control point phase.
...
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-26 22:08:08 +01:00
Józef Kucia
02cbc53b96
vkd3d-shader: Get rid of vkd3d_dxbc_compiler_emit_swizzle_ext().
...
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-25 19:08:05 +01:00
Józef Kucia
cb24be8e83
vkd3d-shader: Do not assume float type for arrayed shader outputs.
...
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-25 19:08:03 +01:00
Józef Kucia
04e2091afa
vkd3d-shader: Do not assume vec4 destination in vkd3d_dxbc_compiler_emit_store().
...
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-25 19:08:01 +01:00
Józef Kucia
95b6d5222d
vkd3d-shader: Call vkd3d_dxbc_compiler_leave_shader_phase() also for last phase.
...
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-25 19:07:59 +01:00
Józef Kucia
38f75846b4
vkd3d-shader: Emit epilogue functions while leaving shader phases.
...
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-25 19:07:57 +01:00
Józef Kucia
61aeaae0c2
vkd3d-shader: Factor out vkd3d_dxbc_compiler_emit_store().
...
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-25 19:07:55 +01:00
Józef Kucia
64f7ff3898
vkd3d-shader: Merge ifs in vkd3d_dxbc_compiler_emit_swizzle_ext().
...
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-25 19:07:52 +01:00
Philip Rebohle
c560fdfa26
vkd3d-shader: Decorate integer fragment shader builtins as flat.
...
From the Vulkan spec, 8.13 "Interpolation Decorations":
Fragment shader inputs that are signed or unsigned integers,
integer vectors, or any double-precision floating-point type
must be decorated with Flat.
This also matches glslang behaviour.
Specifically, this fixes tone-mapping in Unreal Engine 4 on RADV
and AMDGPU-PRO, where gl_Layer is used as a fragment shader input.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
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-25 19:07:50 +01:00
Józef Kucia
d1e0ac115c
vkd3d-shader: Avoid generating unique array types for immediate constant buffers.
...
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-22 12:30:44 +01:00
Józef Kucia
a0069d9fb7
vkd3d-shader: Use correct base index for relative addressing of aggregates.
...
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-22 12:30:39 +01:00
Józef Kucia
d300e6f84c
vkd3d-shader: Remove v{Fork, Join}InstanceID from symbol table when leaving shader phase.
...
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-22 12:30:37 +01:00
Józef Kucia
9c46011b43
vkd3d-shader: Simplify vkd3d_dxbc_compiler_get_register_id().
...
Special casing is not needed.
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-22 12:30:35 +01:00
Józef Kucia
3cbdad5f29
vkd3d-shader: Translate vPrim 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-02-22 12:30:33 +01:00
Józef Kucia
7466758f08
vkd3d-shader: Fix swizzle for scalars.
...
In rare cases, OpCompositeExtract was generated for scalars.
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-22 12:30:30 +01:00
Józef Kucia
197c1d9612
vkd3d-shader: Handle VKD3DSPR_INCONTROLPOINT in vkd3d_dxbc_compiler_get_register_id().
...
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:14 +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
d274318fe2
vkd3d-shader: Avoid using SPIR-V built-ins for shader interface between tessellation stages.
...
We can do this because both tessellation shaders are required in
Direct3D.
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:04 +01:00
Józef Kucia
c333fddaf9
vkd3d-shader: Add support for OpenGL tessellation shaders.
...
In DXBC tessellator parameters are specified in hull shaders. In OpenGL,
even in SPIR-V, tessellator parameters must be specified in the
tessellation evaluation shader.
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-14 16:01:14 +01:00
Józef Kucia
b1b3405bcf
vkd3d-shader: Implement user patch constants for hull 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>
2019-02-13 17:21:50 +01:00
Józef Kucia
7fde0ac78f
vkd3d-shader: Implement relative addressing for arrayed 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>
2019-02-13 17:21:48 +01:00
Józef Kucia
d30afc37c4
vkd3d-shader: Implement input registers for control point phase.
...
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-13 17:21:46 +01:00
Józef Kucia
efe68b00bb
vkd3d-shader: Add basic support for vpc registers in domain 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>
2019-02-13 17:21:44 +01:00
Józef Kucia
1a5f058f4a
vkd3d-shader: Translate vOutputControlPointID 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-02-13 17:21:42 +01:00
Józef Kucia
09dea5f4d9
vkd3d-shader: Implement default control point phase.
...
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-11 18:33:31 +01:00
Józef Kucia
c9fb9c7a7d
vkd3d-shader: Simplify vkd3d_dxbc_compiler_emit_mov().
...
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-11 18:33:29 +01:00
Józef Kucia
bdae9e30b4
vkd3d-shader: Ignore dcl_hs_max_tessfactor.
...
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-11 18:33:26 +01:00
Józef Kucia
0498fafbb0
vkd3d-shader: Try to use SpvOpCopyMemory for mov 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-02-11 18:33:24 +01:00
Józef Kucia
a81a7f837e
vkd3d-shader: Add initial support for built-in patch constants.
...
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-08 17:20:39 +01:00
Józef Kucia
4ad4cbb7df
vkd3d-shader: Factor out vkd3d_symbol_set_register_info().
...
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-08 17:20:37 +01:00
Józef Kucia
df654aa327
vkd3d-shader: Factor out vkd3d_dxbc_compiler_emit_builtin().
...
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-08 17:20:35 +01:00
Józef Kucia
c314b5b01c
vkd3d-shader: Get sysval semantic from shader signature for inputs.
...
In domain shaders, inputs are declared with dcl_input without semantic.
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-08 17:20:33 +01:00
Józef Kucia
fd3d661bf0
vkd3d-shader: Unset r# registers state while leaving current shader phase.
...
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-07 17:01:59 +01:00
Józef Kucia
59d97b07fe
vkd3d-shader: Implement hull shader barriers.
...
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-07 17:01:57 +01:00
Józef Kucia
0397808f81
vkd3d-shader: Add support for instanced join phases.
...
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-07 17:01:56 +01:00
Józef Kucia
18784e6500
vkd3d-shader: Translate vForkInstanceId 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>
2019-02-07 17:01:53 +01:00
Józef Kucia
ea4dd22309
vkd3d-shader: Add support for instanced fork phases.
...
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-07 17:01:51 +01:00
Józef Kucia
e88b73797b
vkd3d-shader: Delay generating functions for shader phases.
...
Mainly in order to wait for dcl_hs_{fork,join}_phase_instance_count.
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-07 17:01:49 +01:00
Józef Kucia
97f0e778af
vkd3d-shader: Allocate temporary registers per shader phase.
...
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-06 15:38:54 +01:00
Józef Kucia
b8b09e58fa
vkd3d-shader: Do not generate shader epilogue for fork and join shader phases.
...
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-06 15:38:52 +01:00
Józef Kucia
904ab0ead5
vkd3d-shader: Generate functions for hull shader phases.
...
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-06 15:38:50 +01:00
Józef Kucia
82d56f4872
vkd3d-shader: Introduce vkd3d_spirv_get_op_type_function().
...
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-06 15:38:44 +01:00
Józef Kucia
363beefa9b
vkd3d-shader: Introduce vkd3d_spirv_build_op_access_chain1().
...
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-05 19:26:40 +01:00
Józef Kucia
bcd91910e4
vkd3d-shader: Use proper vkd3d_spirv_builtin for PS fragment coordinates.
...
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-25 18:59:23 +01:00
Józef Kucia
495d4b9474
vkd3d-shader: Add more general support for SPIR-V aggregates.
...
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-25 18:59:21 +01:00
Józef Kucia
2838ee5833
vkd3d-shader: Translate dcl_tessellator_output_primitive 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-01-25 18:59:17 +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
4f55d990b9
vkd3d-shader: Mark hs_decls as declaration instruction.
...
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:57 +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
fd0844e420
vkd3d-shader: Avoid using private variables for depth output 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>
2019-01-23 17:42:58 +01:00
Józef Kucia
35e062b0a4
vkd3d-shader: Fix resinfo for cube textures.
...
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:42:54 +01:00
Józef Kucia
4c0692b2ef
vkd3d-shader: Rename vkd3d_shader_interface to vkd3d_shader_interface_info.
...
For consistency with other vkd3d and vkd3d-shader structures.
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-17 19:44:05 +01:00
Józef Kucia
bb7d1046da
vkd3d-shader: Use result type for bitfield instructions source parameters.
...
Fixes SPIR-V validation errors:
Expected Base Type to be equal to Result Type: BitFieldSExtract
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-15 15:26:04 +01:00
Józef Kucia
84759c40fe
vkd3d-shader: Use vkd3d_dxbc_compiler_emit_load_src() in more places.
...
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-15 15:26:02 +01:00
Józef Kucia
ff7df2cdf9
vkd3d-shader: Use result type for atomic instructions source parameters.
...
Fixes SPIR-V validation errors:
AtomicIAdd: expected Value to be of type Result Type
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-15 15:25:57 +01:00
Józef Kucia
da3e283717
vkd3d-shader: Fix SV_VertexID.
...
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-15 15:25:51 +01:00
Józef Kucia
3d80b3f4bd
vkd3d-shader: Add basic support for transform feedback.
...
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-14 20:31:13 +01:00
Józef Kucia
731e11902a
vkd3d-shader: Introduce vkd3d_dxbc_compiler_emit_initial_declarations().
...
To emit more declarations immediately after creating a new SPIR-V builder.
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-14 20:31:10 +01:00
Józef Kucia
dadf2eda08
vkd3d-shader: Declare OriginUpperLeft execution mode for fragment shaders.
...
Required by the Vulkan spec:
"fragment entry points must declare OriginUpperLeft."
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-11 19:31:31 +01:00
Józef Kucia
5b0ed414a1
vkd3d-shader: Add support for dual source blending.
...
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-17 19:17:10 +01:00
Józef Kucia
2c5a8cda7a
vkd3d-shader: Translate sample_info 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-11-26 20:25:34 +01:00
Józef Kucia
23361bbcb2
vkd3d-shader: Add support for 2D MS arrays.
...
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-26 20:25:31 +01:00
Józef Kucia
7decb65f54
vkd3d-shader: Implement shader visibility for UAV counters.
...
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-15 18:33:37 +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
00a0958526
vkd3d-shader: Fix swizzling for scalars.
...
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-02 11:18:58 +01:00
Józef Kucia
7338ba0337
vkd3d-shader: Try harder to avoid using private variables for inputs.
...
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-31 19:15:19 +01:00
Józef Kucia
2ace6f204d
vkd3d-shader: Use vkd3d_dxbc_compiler_emit_swizzle_ext() in vkd3d_dxbc_compiler_emit_input().
...
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-31 19:15:17 +01:00
Józef Kucia
11a65da62a
vkd3d-shader: Check more accurately if swizzle is required.
...
Eliminates redundant OpVectorShuffle 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-10-31 19:15:15 +01:00
Józef Kucia
2f15b30e30
vkd3d-shader: Require shader signature elements for shader inputs.
...
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-30 18:21:57 +01:00
Józef Kucia
78a09d37d2
vkd3d-shader: Add support for stores to scalar variables.
...
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-30 18:21:54 +01:00
Józef Kucia
ebf09feb82
vkd3d-shader: Simplify vkd3d_dxbc_compiler_emit_load_scalar().
...
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-30 18:21:52 +01:00
Józef Kucia
d2e5ced1ac
vkd3d-shader: Use typed shader outputs directly.
...
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-30 18:21:50 +01:00
Józef Kucia
7b58e7cb23
vkd3d-shader: Rename "output setup" function to "shader epilogue".
...
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-30 18:21:48 +01:00
Józef Kucia
0f0af935a6
vkd3d-shader: Introduce VKD3D_SHADER_VISIBILITY_COMPUTE.
...
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-29 17:08:45 +01:00
Józef Kucia
ae84b5210e
vkd3d-shader: Introduce vkd3d_shader_binding_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-10-29 17:08:43 +01:00
Józef Kucia
feeb2b49df
vkd3d-shader: Use typed shader inputs directly.
...
... instead of copying them to a private floating-point variable.
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-29 17:08:40 +01:00
Józef Kucia
bec3430d88
vkd3d-shader: Propagate errors from vkd3d_dxbc_compiler_emit_control_flow_instruction().
...
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-26 19:47:14 +02:00
Józef Kucia
b909a5fe04
vkd3d-shader: Add asserts() to vkd3d_dxbc_compiler_emit_control_flow_instruction().
...
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-26 19:47:13 +02:00
Józef Kucia
049d21ad7a
vkd3d-shader: Fix typo in vkd3d_dxbc_compiler_have_combined_sampler().
...
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-24 17:00:45 +02:00
Józef Kucia
94497f31a0
vkd3d-shader: Implement SV_ViewportArrayIndex.
...
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-22 10:57:29 +02:00
Józef Kucia
2f5b718205
vkd3d-shader: Try to always use combined samplers for t# registers.
...
For bufinfo and resinfo.
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-22 10:57:27 +02:00
Józef Kucia
11de335abd
vkd3d-shader: Add support for combined samplers.
...
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-22 10:57:25 +02:00
Józef Kucia
781c5ed7c9
vkd3d-shader: Merge prepare_image() 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>
2018-10-22 10:57:21 +02:00
Józef Kucia
f242922587
vkd3d-shader: Generalize helper for emitting descriptor binding decorations.
...
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-22 10:57:19 +02:00
Józef Kucia
3efa365b5e
vkd3d-shader: Remove sampler_id from struct vkd3d_shader_image.
...
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-22 10:57:15 +02:00
Józef Kucia
299f126f7a
vkd3d-shader: Simplify DepthReplacing execution mode handling.
...
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:04 +02: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
dac94fb58e
vkd3d-shader: Translate bufinfo 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-10-19 21:43:00 +02:00
Józef Kucia
6639f618af
vkd3d-shader: Implement early depth/stencil tests.
...
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-18 19:49:22 +02:00
Józef Kucia
3957242ea7
vkd3d-shader: Translate ld2dms 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-10-18 19:49:20 +02:00
Józef Kucia
123f3ed387
vkd3d-shader: Fix resinfo for multisample textures.
...
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-18 19:49:20 +02:00
Józef Kucia
55abf3d6d4
vkd3d-shader: Fix f32tof16 instruction.
...
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-18 19:49:20 +02:00
Józef Kucia
dc9fdf5d31
vkd3d-shader: Fix f16tof32 instruction.
...
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-18 19:49:06 +02:00
Józef Kucia
acf8ae9673
vkd3d-shader: Fix bitfield instructions.
...
Avoid overwriting registers before all results are computed.
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-18 19:49:03 +02:00
Józef Kucia
170bb60baa
vkd3d-shader: Add support for OpenGL atomic counters.
...
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-18 00:59:44 +02:00
Józef Kucia
08183841eb
vkd3d-shader: Translate sample_b 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-10-18 00:59:43 +02:00
Józef Kucia
907d137a4b
vkd3d-shader: Translate sample_d 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-10-18 00:59:41 +02:00
Józef Kucia
86b4c8c9de
vkd3d-shader: Constify vkd3d_dxbc_compiler pointers.
...
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-18 00:59:38 +02:00
Józef Kucia
2f43965c2c
vkd3d-shader: Add OpenGL SPIR-V target environment.
...
More changes are needed for full support.
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-11 18:37:36 +02:00
Józef Kucia
970aafaf55
vkd3d-shader: Recognize enableMinimumPrecision global flag.
...
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-11 18:37:34 +02:00
Józef Kucia
1f4e6dc603
vkd3d-shader: Implement SV_SampleIndex.
...
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-08 22:25:04 +02:00
Józef Kucia
4068243279
vkd3d-shader: Bump SPIR-V generator version.
...
In preparation for the next release.
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-02 19:36:32 -07:00
Józef Kucia
a4cd1b255f
vkd3d-shader: Translate gather4_po_c 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-09-28 01:12:44 +02:00
Józef Kucia
b66d4ed521
vkd3d-shader: Translate retc 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-09-28 01:12:43 +02:00
Józef Kucia
99939f626b
vkd3d-shader: Use vkd3d_dxbc_compiler_emit_conditional_branch() in more places.
...
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 01:12:41 +02:00
Józef Kucia
5319cc2420
vkd3d-shader: Translate gather4_po 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-09-24 19:20:35 +02:00
Józef Kucia
a553eb1afe
vkd3d-shader: Translate gather4_c 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-09-24 19:20:31 +02:00
Józef Kucia
01ef2ceced
vkd3d-shader: Find innermost loops for breakc 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-09-24 19:20:26 +02:00
Józef Kucia
9781b15531
vkd3d-shader: Translate continuec 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-09-24 19:20:16 +02:00
Józef Kucia
79339d153a
vkd3d-shader: Translate continue 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-09-24 19:20:12 +02:00
Józef Kucia
a970f71581
vkd3d-shader: Translate ineg 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-09-24 19:20:10 +02:00
Józef Kucia
62628dd90d
vkd3d-shader: Promote immediate scalar constants to vectors.
...
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-24 19:20:07 +02:00
Józef Kucia
ae5471b978
vkd3d-shader: Implement texel offset for sample 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-09-13 19:26:18 +02:00
Józef Kucia
0b278a7773
vkd3d-shader: Implement texel offsets for ld 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-09-13 19:26:17 +02:00
Józef Kucia
6296758849
vkd3d-shader: Add support for more interpolation modifiers.
...
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-13 19:26:15 +02:00
Józef Kucia
5398d65d3e
vkd3d-shader: Correctly handle multiple clip/cull distance output 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-09-05 17:18:25 +02:00
Józef Kucia
e425b86610
vkd3d-shader: Implement cull distances.
...
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-05 17:18:24 +02:00
Józef Kucia
814cd31522
vkd3d-shader: Implement clip distances.
...
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-05 17:18:22 +02:00
Józef Kucia
060968fad2
vkd3d-shader: Add get_type_id() helper 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>
2018-09-05 17:18:20 +02:00
Józef Kucia
99a2daedb1
vkd3d-shader: Strip debug info after generating all code.
...
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-20 09:54:41 +02:00
Józef Kucia
76f64b86de
libs/vkd3d-shader: Require shader signature elements for shader outputs.
...
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-16 11:02:15 +02:00
Józef Kucia
f7a21ad982
vkd3d-compiler: Do not overallocate memory for shader code.
...
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-16 11:02:12 +02:00
Józef Kucia
da8eb496cf
libs/vkd3d-shader: Zero-initialize unused shader output components.
...
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-14 12:31:13 +02:00
Józef Kucia
bde5dafe5b
libs/vkd3d-shader: Factor out vkd3d_dxbc_compiler_emit_vector_shuffle().
...
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-14 12:31:10 +02:00
Józef Kucia
410e105ac5
libs/vkd3d-shader: Determine shader output component count based on shader 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>
2018-08-14 12:31:08 +02:00
Józef Kucia
07ffccd186
libs/vkd3d-shader: Fix vkd3d_find_signature_element_for_reg().
...
The exact match of write masks between a shader signature and
dcl_input/dcl_output instructions isn't required.
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-14 12:31:05 +02:00
Józef Kucia
c54b148a2c
libs/vkd3d-shader: Add support for indexable temporary 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-08-14 12:30:59 +02:00
Józef Kucia
b707e36d56
libs/vkd3d-shader: Translate partial derivative 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-08-14 12:30:57 +02:00
Józef Kucia
b14bb73c5b
libs/vkd3d-shader: Translate sincos 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-08-14 12:30:51 +02:00
Józef Kucia
92f3d33e15
libs/vkd3d-shader: Translate round_ne 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-08-14 12:30:27 +02:00
Józef Kucia
6e8dae9d62
libs/vkd3d-shader: Add debug name for vDomainLocation 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>
2018-07-18 17:52:33 +02:00
Józef Kucia
054b1e41dd
libs/vkd3d-shader: Treat vicp register as regular shader input.
...
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-07-18 17:52:31 +02:00
Józef Kucia
faa1118202
libs/vkd3d-shader: Enable arrayed inputs for all shader 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>
2018-07-18 17:52:29 +02:00
Józef Kucia
d15c9f79b5
libs/vkd3d-shader: Fix returning multiple components from dot product 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-06-26 21:58:58 +02:00
Józef Kucia
d14f9196f9
libs/vkd3d-shader: Do not emit output setup for ret in geometry 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-06-26 21:58:53 +02:00
Józef Kucia
c21a8b56a0
libs/vkd3d-shader: Generate correct SPIR-V code for arrayed shader inputs.
...
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-06-26 21:58:51 +02:00
Józef Kucia
62b6d01c84
libs/vkd3d-shader: Pass register index to vkd3d_find_signature_element_for_reg().
...
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-06-26 21:58:49 +02:00
Józef Kucia
ab6b24ff65
libs/vkd3d-shader: Simplify vkd3d_dxbc_compiler_emit_input().
...
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-06-26 21:58:47 +02:00
Józef Kucia
5fe02889b1
libs/vkd3d-shader: Enable "geometry" capability for SpvBuiltInLayer.
...
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-06-26 21:58:46 +02:00
Józef Kucia
d74992a119
libs/vkd3d-shader: Do not force input register type to float4.
...
Produces slightly smaller and cleaner SPIR-V code.
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-06-26 21:58:44 +02:00
Józef Kucia
7dce007c53
libs/vkd3d-shader: Add initial support for typed 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-06-26 21:58:42 +02:00
Józef Kucia
270c212265
libs/vkd3d-shader: Do not generate code in vkd3d_dxbc_compiler_get_register_info().
...
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-06-26 21:58:40 +02:00
Józef Kucia
6cdf3a9fa5
libs/vkd3d-shader: Split SPIR-V built-ins table into two tables.
...
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-06-26 21:58:38 +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
b59ad01dd2
libs/vkd3d-shader: Implement SV_RenderTargetArrayIndex.
...
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:41 +02:00
Józef Kucia
a87b3f3fb2
libs/vkd3d-shader: Rename default sampler to dummy sampler.
...
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:32 +02:00
Józef Kucia
40ee9fa0e9
libs/vkd3d-shader: Implement swizzling for shader outputs.
...
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:24 +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
b901d72877
build: Improve SPIR-V headers detection.
...
Allows building with Vulkan SDK.
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-16 22:00:10 +02:00
Józef Kucia
ccc49fe00d
libs/vkd3d-shader: Use unified SPIR-V headers.
...
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-16 22:00:04 +02:00
Józef Kucia
1fe6270307
libs/vkd3d-shader: Translate control point count declarations.
...
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:39 +01: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
26c5a1ef73
libs/vkd3d-shader: Implement vDomain.
...
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-06 21:35:30 +01:00
Józef Kucia
2759ea7857
libs/vkd3d-shader: Translate dcl_tessellator_partitioning 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-02-06 21:35:27 +01:00
Józef Kucia
f1de58c58e
libs/vkd3d-shader: Translate dcl_tessellator_domain 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-02-06 21:35:24 +01:00
Józef Kucia
8d2c59dd35
libs/vkd3d-shader: Use vkd3d_dxbc_compiler_get_constant_float_vector() in more places.
...
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:12 +01:00
Józef Kucia
6f2ca74904
libs/vkd3d-shader: Add initial support for arrayed shader inputs.
...
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:07 +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
Józef Kucia
f7cace8216
libs/vkd3d-shader: Translate dcl_gs_instances 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-02-05 18:57:02 +01:00
Józef Kucia
f6c708a3cc
libs/vkd3d-shader: Translate geometry shader "cut" 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-02-05 18:57:00 +01:00
Józef Kucia
d97e32d035
libs/vkd3d-shader: Translate dcl_input_siv 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-02-05 18:56:58 +01:00
Józef Kucia
367e55cd59
libs/vkd3d-shader: Force public enums to 32-bit values.
...
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-02 18:49:57 +01:00
Józef Kucia
be8e10e12e
libs/vkd3d-shader: Use our own SPIR-V generator ID.
...
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-02 18:49:55 +01:00
Józef Kucia
b1fc5039c8
libs/vkd3d-shader: Use GLSL.std450 NMin, NMax and NClamp opcodes.
...
This reverts commit 70f5b24f92
.
The bug is fixed in Nvidia drivers.
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-26 00:24:57 +01:00
Józef Kucia
daebeb3e11
libs/vkd3d-shader: Adjust barrier emission.
...
Aligns with glsang changes which are based on Khronos recommendations.
8297936dd6
838d7afc61
2505057af8
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-26 00:24:53 +01:00
Józef Kucia
38f2d893b1
libs/vkd3d-shader: Translate dcl_input_primitive 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:52 +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
fb67ccd159
libs/vkd3d-shader: Translate geometry shader emit 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:48 +01:00
Józef Kucia
374a23bdd8
libs/vkd3d-shader: Introduce separate stream for execution mode declarations.
...
Tessellation and geometry shaders generate a lot of execution mode
declarations.
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:47 +01:00
Józef Kucia
4ad1f9683e
libs/vkd3d-shader: Translate dcl_maxout 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:45 +01:00
Józef Kucia
f0bc873e7a
libs/vkd3d-shader: Generate valid SPIR-V for unimplemented 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-01-09 20:37:02 +01:00
Józef Kucia
219b537209
libs/vkd3d-shader: Handle unimplemented registers more gracefully.
...
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-09 20:36:59 +01:00
Józef Kucia
4ae6285c8e
libs/vkd3d-shader: Fix result type for OpImageSampleDref instructions.
...
Per the SPIR-V spec:
"Result Type must be a scalar of integer type or floating-point type."
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>
2017-12-15 16:27:27 +01:00
Józef Kucia
7ee3a02f92
libs/vkd3d-shader: Avoid theoretical crash in vkd3d_dxbc_compiler_emit_dot().
...
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>
2017-12-14 13:40:26 +01:00
Józef Kucia
006f36c2ac
libs/vkd3d-shader: Introduce vkd3d_dxbc_compiler_get_constant_uint_vector() helper.
...
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>
2017-12-14 13:40:20 +01:00
Józef Kucia
e0cb3776c1
libs/vkd3d-shader: Fix discard_z instruction.
2017-12-11 12:55:55 +01:00
Józef Kucia
4e121f8b5d
libs/vkd3d-shader: Implement SV_IsFrontFace.
2017-10-31 15:44:44 +01:00
Józef Kucia
79f80df1ee
libs/vkd3d-shader: Translate dcl_input_ps_sgv instructions.
2017-10-31 15:44:44 +01:00
Józef Kucia
3340cafdc4
libs/vkd3d-shader: Avoid potential stack smashing.
2017-10-25 22:55:39 +02:00
Józef Kucia
f04389d90b
libs/vkd3d-shader: Use more sensible default descriptor binding assignment.
2017-10-25 14:34:44 +02:00
Józef Kucia
e959686f12
libs/vkd3d-shader: Make sure that OpVariables are first instructions in main function.
...
The SPIR-V spec says:
"All OpVariable instructions in a function must be in the first block
in the function. These instructions, together with any immediately
preceding OpLine instructions, must be the first instructions in that
block."
2017-10-25 09:58:14 +02:00
Józef Kucia
b65c42e6f9
libs/vkd3d-shader: Avoid OpVectorShuffle on scalars.
...
The SPIR-V spec states:
"Vector 1 and Vector 2 must both have vector types, with the same
Component Type as Result Type."
2017-10-24 21:26:48 +02:00
Józef Kucia
310335f748
libs/vkd3d-shader: Branch directly to merge block when switch default block is absent.
2017-10-20 18:27:17 +02:00
Józef Kucia
137b5d694b
libs/vkd3d-shader: Move inside_block field to vkd3d_control_flow_info.
2017-10-18 19:02:46 +02:00
Józef Kucia
c112f2ed46
libs/vkd3d-shader: Get rid of VKD3D_BLOCK_ELSE.
2017-10-18 19:02:46 +02:00
Józef Kucia
9f831b938a
libs/vkd3d-shader: Avoid emitting empty else branches.
...
We have to patch SpvOpBranchConditional instruction when emitting the
else block because we do not know if an else block is present in
advance.
2017-10-18 19:02:46 +02:00
Józef Kucia
646385e871
libs/vkd3d-shader: Get rid of VKD3D_BLOCK_MAIN.
2017-10-18 19:02:46 +02:00
Józef Kucia
8a047a8eb7
libs/vkd3d-shader: Rename control flow union member for if instructions.
2017-10-18 19:02:46 +02:00