Józef Kucia
844c83a837
libs/vkd3d-shader: Avoid Windows data types in public API.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 20:00:35 +01:00
Józef Kucia
fddf86e6ea
libs/vkd3d-shader: Remove dependency on D3D12 headers.
...
We would like to allow building libvkd3d-shader as a standalone library
without our Direct3D translation layers.
In the long term, it should be possible to build and use libvkd3d-shader
without Win32 data types, Vulkan headers and libs.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 20:00:31 +01:00
Józef Kucia
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
a64dd8be5f
build: Add version name for symbols.
...
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-16 20:11:19 +01:00
Józef Kucia
9e8dc13ba3
libs/vkd3d-shader: Fix uninitialized error code in vkd3d_shader_parser_init().
...
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-16 20:11:08 +01:00
Henri Verbeet
2d8e2fbe86
libs/vkd3d-shader: Validate the DXBC version.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:44 +01:00
Józef Kucia
41715a2f33
build: Use linker version scripts to control visibility.
...
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-15 17:51:25 +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
Józef Kucia
0369f39a47
libs/vkd3d-shader: Generate correct SPIR-V for rcp with multiple components.
2017-10-18 12:21:24 +02:00
Józef Kucia
c5e400fa30
libs/vkd3d-shader: Document hacks introduced for Nvidia driver.
...
See 70f5b24f92
.
2017-10-12 17:47:53 +02:00
Józef Kucia
2171ba6d32
libs/vkd3d-shader: Decrement OpAtomicIDecrement result.
2017-10-12 13:10:26 +02:00
Józef Kucia
94a33020d3
libs/vkd3d-shader: Use switch statement in shader_parse_root_parameters().
2017-10-10 16:57:36 +02:00
Józef Kucia
4522a80de8
libs/vkd3d-shader: Use switch statement in shader_write_root_parameters().
2017-10-10 16:57:36 +02:00
Józef Kucia
18b285328e
libs/vkd3d-shader: Add version argument to vkd3d_shader_serialize_root_signature().
2017-10-10 16:57:36 +02:00
Józef Kucia
6b43a5fe38
libs/vkd3d-shader: Implement root signature serialization.
2017-10-10 16:02:09 +02:00
Józef Kucia
586e1cc532
libs/vkd3d-shader: Implement relative addressing for constant buffers.
2017-10-06 17:06:31 +02:00