vkd3d-shader: Add an option to enable child effects compilation.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov
2024-02-24 23:47:48 +01:00
committed by Alexandre Julliard
parent 7f1fdd447c
commit 13227f3852
Notes: Alexandre Julliard 2024-03-12 22:56:09 +01:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/692
5 changed files with 31 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ enum
{
OPTION_HELP = CHAR_MAX + 1,
OPTION_BUFFER_UAV,
OPTION_CHILD_EFFECT,
OPTION_ENTRY,
OPTION_FRAGMENT_COORDINATE_ORIGIN,
OPTION_MATRIX_STORAGE_ORDER,
@@ -186,6 +187,8 @@ static void print_usage(const char *program_name)
" --buffer-uav=<type> Specify the buffer type to use for buffer UAV bindings.\n"
" Valid values are 'buffer-texture' (default) and\n"
" 'storage-buffer'.\n"
" --child-effect Compile effect as a child effect. This option is only meaningful\n"
" for fx_2_0 and fx_4_0/fx_4_1 profiles.\n"
" -e, --entry=<name> Use <name> as the entry point (default is \"main\").\n"
" -E Preprocess the source code instead of compiling it.\n"
" --formatting=<flags> Specify the formatting options for text output.\n"
@@ -479,6 +482,7 @@ static bool parse_command_line(int argc, char **argv, struct options *options)
{
{"help", no_argument, NULL, OPTION_HELP},
{"buffer-uav", required_argument, NULL, OPTION_BUFFER_UAV},
{"child-effect", no_argument, NULL, OPTION_CHILD_EFFECT},
{"entry", required_argument, NULL, OPTION_ENTRY},
{"fragment-coordinate-origin", required_argument, NULL, OPTION_FRAGMENT_COORDINATE_ORIGIN},
{"matrix-storage-order", required_argument, NULL, OPTION_MATRIX_STORAGE_ORDER},
@@ -523,6 +527,10 @@ static bool parse_command_line(int argc, char **argv, struct options *options)
add_compile_option(options, VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV, buffer_uav);
break;
case OPTION_CHILD_EFFECT:
add_compile_option(options, VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT, 1);
break;
case OPTION_ENTRY:
case 'e':
options->entry_point = optarg;