Zebediah Figura
6b6e4bc212
vkd3d-shader: Add a compile option to control whether implicit truncation warnings are printed.
...
d3dcompiler and d3dx9 versions before 42 don't emit this error; this will be
necessary to emulate that behaviour.
Other warnings exist that are introduced in different d3dcompiler versions,
although there are not very many distinct HLSL warnings to begin with.
We could of course group all these together under a single compiler option, but
I find that using separate top-level options is unilaterally friendlier to an
API consumer, and simpler to implement as well. It also in some sense maps
conceptually to e.g. "-Wno-implicit-conversion".
2024-03-27 22:37:34 +01:00
Giovanni Mascellani
6163d82485
tests: Test emitting the signature.
2024-03-07 23:08:25 +01:00
Zebediah Figura
d1be80e08d
tests: Test VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES.
2024-01-24 22:37:53 +01:00
Zebediah Figura
1ce7e3d8b1
vkd3d-shader/d3dbc: Assign unique register indices for VKD3DSPR_RASTOUT.
2024-01-04 22:23:09 +01:00
Henri Verbeet
73c563ffb7
vkd3d-shader/d3dbc: Adjust the token count for DEF and DEFI instructions in shader_sm1_skip_opcode().
...
This was broken by commit e390bc35e2c9b0a2110370f916033eea2366317e; that
commit fixed the source count for these instructions, but didn't adjust
shader_sm1_skip_opcode(). Note that this only affects shader model 1;
later versions have a token count embedded in the initial opcode token.
2023-11-20 22:07:29 +01:00
Henri Verbeet
9de793f180
vkd3d-shader: Implement scanning combined resource/sampler information.
2023-11-13 23:19:23 +01:00
Zebediah Figura
9417c7cfb7
vkd3d-shader/d3dbc: Translate sm1 fragment outputs to system values.
2023-09-21 19:16:31 +02:00
Zebediah Figura
1615e5a76b
vkd3d-shader/dxbc: Map sm4 fragment outputs to system values based on their name.
2023-09-21 19:16:29 +02:00
Henri Verbeet
419c6364db
tests: Add a small test for vkd3d_shader_build_varying_map().
...
There's probably room for improvement, but this at least verifies the
function can be called.
2023-09-19 21:30:37 +02:00
Zebediah Figura
926575a6f3
vkd3d-shader/hlsl: Force sm1 inputs to be 4-component only for vertex shaders.
...
Pixel shaders still have an appropriate writemask.
2023-08-24 21:43:44 +02:00
Zebediah Figura
bad72d1874
vkd3d-shader/d3dbc: Make sure all inter-stage varyings have a unique register index.
...
spirv will need this.
2023-08-03 21:20:22 +09:00
Zebediah Figura
d077562f79
vkd3d-shader/d3dbc: Scan descriptors for constant register sets.
2023-07-17 22:56:39 +02:00
Zebediah Figura
7e1fcdca89
vkd3d-shader: Synthesize signatures for d3dbc shaders.
2023-06-27 22:33:41 +02:00
Zebediah Figura
20190a1388
vkd3d-shader: Introduce an API to retrieve all signatures from DXBC shaders.
2023-06-27 22:33:41 +02:00
Zebediah Figura
dfa4bfdd03
include: Make test context information nestable.
...
Based on Wine.
2023-04-04 21:59:58 +02:00
Henri Verbeet
b1e13d6e33
vkd3d-shader/dxbc: Introduce API for serialising DXBC blobs.
2023-02-23 21:47:27 +01:00
Henri Verbeet
b5a7abbfa6
vkd3d-shader/sm1: Add support for vkd3d_shader_scan().
...
Nominally, at least. Not all of the early shader models explicitly
declare resources and samplers, so those may currently get missed for
those.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 18:35:46 +02:00
Henri Verbeet
f7662f9878
vkd3d-shader/sm1: Introduce a parser for the legacy D3D byte-code format.
...
This is largely derived from the parser in Wine/wined3d, as of wine-6.18.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 18:35:44 +02:00
Henri Verbeet
c326d75c1d
vkd3d-shader: Introduce vkd3d_shader_get_supported_target_types().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:54:22 +02:00
Henri Verbeet
5f4bd618ed
vkd3d-shader: Introduce vkd3d_shader_get_supported_source_types().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:54:22 +02:00
Henri Verbeet
7dda2339a2
vkd3d-shader: Introduce vkd3d_shader_get_version().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:54:22 +02:00
Henri Verbeet
1279d5df9e
vkd3d-shader: Report error messages from vkd3d_shader_serialize_root_signature().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:33:00 +02:00
Henri Verbeet
33eb944bf4
vkd3d-shader: Report error messages from vkd3d_shader_parse_root_signature().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:32:59 +02:00
Henri Verbeet
d135b4687b
vkd3d-shader: Report error messages from vkd3d_shader_parse_input_signature().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:32:57 +02:00
Henri Verbeet
11f82d985c
vkd3d-shader: Pass a vkd3d_shader_compile_info structure to vkd3d_shader_scan_dxbc().
...
In order to allow it to handle different source types.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:32:56 +02:00
Henri Verbeet
3b2fb3aba1
vkd3d-shader: Output a compiler error message if the DXBC size is invalid.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 19:43:52 +02:00
Henri Verbeet
23416913f4
vkd3d-shader: Rename the vkd3d_versioned_root_signature_desc structure.
...
To vkd3d_shader_versioned_root_signature_desc.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:19:03 +02:00
Henri Verbeet
0056fc7046
vkd3d-shader: Rename the vkd3d_root_signature_version enumeration to vkd3d_shader_root_signature_version.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:19:07 +02:00
Henri Verbeet
95fa257a37
vkd3d-shader: Allow vkd3d_shader_compile() to handle multiple target types.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 16:25:16 +02:00
Henri Verbeet
d6ec017077
vkd3d-shader: Allow vkd3d_shader_compile_dxbc() to handle multiple source types.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:31 +02:00
Henri Verbeet
b07c304440
vkd3d-shader: Pass compile options as an array instead of as flags.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:29 +02:00
Henri Verbeet
9312979b56
vkd3d-shader: Pass the target info as part of the vkd3d_shader_compile_info structure chain.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:28 +02:00
Henri Verbeet
c4e6657c11
vkd3d-shader: Pass the interface info as part of the vkd3d_shader_compile_info structure chain.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:26 +02:00
Henri Verbeet
8ff9610fed
vkd3d-shader: Introduce struct vkd3d_shader_compile_info.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 16:08:24 +02:00
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
374bcd276e
vkd3d-shader: Remove versioned_ prefix from root signature functions.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:20:18 +02:00
Józef Kucia
21ab63c4d6
vkd3d-shader: Remove vkd3d_shader_serialize_root_signature().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 10:48:24 +02:00
Józef Kucia
16f36b0c9b
vkd3d-shader: Remove vkd3d_shader_parse_root_signature().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 16:24:09 +02:00
Józef Kucia
b277b12f5f
tests: Add test for vkd3d shader function 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>
2019-02-25 19:08:08 +01:00
Józef Kucia
e9b33183cf
tests: Add test for invalid shader bytecode.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:28:16 +01:00