Commit Graph

380 Commits

Author SHA1 Message Date
Zebediah Figura
1cd208fb32 vkd3d-shader: Lower preincrement and predecrement to assignment operations at parse time.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-15 20:39:07 +01:00
Zebediah Figura
001328e084 vkd3d-shader: Use yy_scan_bytes() instead of yy_scan_string().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 11:58:02 +01:00
Zebediah Figura
8ce33da2ab vkd3d-shader: Move the remainder of hlsl_parser_compile() to hlsl_compile_shader().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-05 18:00:22 +01:00
Zebediah Figura
df5e4a865c vkd3d-shader: Move some functions into hlsl_codegen.c.
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-03-04 19:55:46 +01:00
Zebediah Figura
3d5a4f133a vkd3d-shader: Print the previous location for redefinition errors.
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-03-04 19:55:32 +01:00
Zebediah Figura
0f4d62b09d vkd3d-shader: Factor out hlsl_new_loop().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:44:02 +01:00
Zebediah Figura
ccd67dcf37 vkd3d-shader: Factor out hlsl_new_jump().
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-03-02 20:43:59 +01:00
Zebediah Figura
35105d4e29 vkd3d-shader: Return a vkd3d_string_buffer from hlsl_modifiers_to_string().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:43:53 +01:00
Zebediah Figura
48a1db2976 vkd3d-shader: Return a vkd3d_string_buffer from hlsl_type_to_string().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:43:49 +01:00
Zebediah Figura
7069fa1c40 vkd3d-shader: Replace hlsl_message() with hlsl_error().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 20:20:24 +01:00
Zebediah Figura
6124aa664f vkd3d-shader: Implement hlsl_error() and hlsl_warning().
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-02-23 20:20:22 +01:00
Zebediah Figura
124069907d vkd3d-shader: Get rid of hlsl_base_type_to_string().
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-02-19 21:06:58 +01:00
Zebediah Figura
b57ad006c2 vkd3d-shader: Avoid using debugging utilities in debug_hlsl_type().
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-02-16 15:59:59 +01:00
Zebediah Figura
61c3d802ed vkd3d-shader: Avoid using debugging utilities in hlsl_debug_modifiers().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 15:59:56 +01:00
Zebediah Figura
193218f54e vkd3d-shader: Replace "parse_status" with a boolean variable.
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-02-16 15:59:44 +01:00
Zebediah Figura
3bf0e40b9d vkd3d-shader: Use struct vkd3d_shader_location in struct hlsl_ctx.
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-02-12 21:01:40 +01:00
Zebediah Figura
3a975c2215 vkd3d-shader: Replace struct source_location with struct vkd3d_shader_location.
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-02-12 21:01:38 +01:00
Zebediah Figura
28b1d68ce3 vkd3d-shader: Separate hlsl_report_message() into helpers for individual log levels.
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-02-12 21:01:36 +01:00
Zebediah Figura
c7d4acaf4b vkd3d-shader: Make the HLSL compiler reëntrant.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 20:08:12 +01:00
Zebediah Figura
7400717282 vkd3d-shader: Move hlsl_ctx initialization and cleanup to hlsl_compile_shader().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 20:08:06 +01:00
Zebediah Figura
3854991154 vkd3d-shader: Move parse_* structure definitions to hlsl.y.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 20:08:04 +01:00
Zebediah Figura
c2c092b143 vkd3d-shader: Replace BOOL with bool.
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-02-04 22:32:38 +01:00
Zebediah Figura
aa52cb10b4 vkd3d-shader: Return void from hlsl_pop_scope().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 22:32:36 +01:00
Zebediah Figura
7c5bd7c776 vkd3d-shader: Add a hlsl_ namespace prefix to common functions.
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-02-04 22:32:31 +01:00
Zebediah Figura
ab2e95a78c vkd3d-shader: Move compatible_data_types() to hlsl.y.
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-02-02 22:48:18 +01:00
Zebediah Figura
d8dd91e840 vkd3d-shader: Move add_expr() to hlsl.y.
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-02-02 22:48:16 +01:00
Zebediah Figura
768eb86101 vkd3d-shader: Move add_implicit_conversion() to hlsl.y.
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-02-02 22:48:13 +01:00
Zebediah Figura
60cde237c5 vkd3d-shader: Move add_assignment() to hlsl.y.
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-02-02 22:48:08 +01:00
Zebediah Figura
9b2e8fb1db vkd3d-shader: Move instruction allocation functions to hlsl.c.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 22:48:06 +01:00
Zebediah Figura
b523122ef3 vkd3d-shader: Import the HLSL compiler from Wine.
This corresponds to Wine commit 9f9fec18799bf59df6211b7294f8d338caa7f4db.

Note that for the moment, compilation messages have not been ported.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 20:54:19 +01:00