Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- libs/vkd3d/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index e5c6791..8b84451 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -195,7 +195,7 @@ static uint64_t vkd3d_queue_reset_sequence_number_locked(struct vkd3d_queue *que { unsigned int i;
- WARN("Ressetting sequence number for queue %p.\n", queue); + WARN("Resetting sequence number for queue %p.\n", queue);
queue->completed_sequence_number = 0; queue->submitted_sequence_number = 1;
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- libs/vkd3d-shader/preproc.l | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l index 82b6492..bf4d669 100644 --- a/libs/vkd3d-shader/preproc.l +++ b/libs/vkd3d-shader/preproc.l @@ -743,10 +743,14 @@ int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info, vkd3d_string_buffer_init(&body); vkd3d_string_buffer_printf(&body, "%s", ctx.preprocess_info->macros[i].value); if (!(name = vkd3d_strdup(ctx.preprocess_info->macros[i].name))) + { + vkd3d_string_buffer_cleanup(&body); goto fail; + } if (!preproc_add_macro(&ctx, &loc, name, NULL, 0, &loc, &body)) { vkd3d_free(name); + vkd3d_string_buffer_cleanup(&body); goto fail; } }
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- programs/vkd3d-compiler/main.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index f1e597a..a0e3280 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -481,7 +481,14 @@ static bool parse_command_line(int argc, char **argv, struct options *options) }
if (options->print_target_types) + { + if (options->source_type == VKD3D_SHADER_SOURCE_NONE) + { + fprintf(stderr, "You need to specify a source type when using the --print-target-types option.\n"); + return false; + } return true; + }
if (options->source_type == VKD3D_SHADER_SOURCE_NONE) options->source_type = options->preprocess_only ? VKD3D_SHADER_SOURCE_HLSL : VKD3D_SHADER_SOURCE_DXBC_TPF;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=84568
Your paranoid android.
=== debiant (build log) ===
Task: Patch failed to apply
=== debiant (build log) ===
Task: Patch failed to apply
On Tue, 26 Jan 2021 at 20:27, Matteo Bruni mbruni@codeweavers.com wrote:
if (options->print_target_types)
{
if (options->source_type == VKD3D_SHADER_SOURCE_NONE)
{
fprintf(stderr, "You need to specify a source type when using the --print-target-types option.\n");
return false;
} return true;
}
if (options->source_type == VKD3D_SHADER_SOURCE_NONE) options->source_type = options->preprocess_only ? VKD3D_SHADER_SOURCE_HLSL : VKD3D_SHADER_SOURCE_DXBC_TPF;
It looks like this was broken by 6d5fd68f1d9dc2bb4c74e41c12f5cba2e9b81e88 for --print-target-types, but in 1.2 and before, if no explicit source type was specified, it would default to VKD3D_SHADER_SOURCE_DXBC_TPF. It would seem best to retain that behaviour. In practice, that would mean simply moving the "print_target_types" return a couple of lines down, until after the default source and target types are resolved.
The types list was obsolete already and there is no point in having it there.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- programs/vkd3d-compiler/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index a0e3280..c9bc4b8 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -178,8 +178,7 @@ static void print_usage(const char *program_name) " -p, --profile=<name> Specify the target shader profile for HLSL shaders.\n" " --strip-debug Strip debug information from the output.\n" " -V, --version Display version information and exit.\n" - " -x <type> Specify the type of the source. Valid values are\n" - " 'dxbc-tpf' and 'none'.\n" + " -x <type> Specify the type of the source.\n" " -- Stop option processing. Any subsequent argument is\n" " interpreted as a filename.\n" "\n"
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=84569
Your paranoid android.
=== debiant (build log) ===
Task: Patch failed to apply
=== debiant (build log) ===
Task: Patch failed to apply
On Tue, 26 Jan 2021 at 20:27, Matteo Bruni mbruni@codeweavers.com wrote:
The types list was obsolete already and there is no point in having it there.
However, it might be helpful to refer to --print-source-types, and to mention the default source types. (E.g., "Use --print-source-types to list valid source types. The default source type is 'dxbc-tpf' for compile operations, and 'hlsl' for preprocess operations.")
On Wed, Jan 27, 2021 at 3:20 PM Henri Verbeet hverbeet@gmail.com wrote:
On Tue, 26 Jan 2021 at 20:27, Matteo Bruni mbruni@codeweavers.com wrote:
The types list was obsolete already and there is no point in having it there.
However, it might be helpful to refer to --print-source-types, and to mention the default source types. (E.g., "Use --print-source-types to list valid source types. The default source type is 'dxbc-tpf' for compile operations, and 'hlsl' for preprocess operations.")
I took the liberty of using your message example unchanged.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- programs/vkd3d-compiler/main.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index c9bc4b8..0928568 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -502,6 +502,12 @@ static bool parse_command_line(int argc, char **argv, struct options *options) return false; }
+ if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL && !options->profile) + { + fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n"); + return false; + } + if (optind < argc) options->filename = argv[argc - 1];
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=84570
Your paranoid android.
=== debiant (build log) ===
Task: Patch failed to apply
=== debiant (build log) ===
Task: Patch failed to apply
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- programs/vkd3d-compiler/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index 0928568..ff83872 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -502,10 +502,16 @@ static bool parse_command_line(int argc, char **argv, struct options *options) return false; }
- if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL && !options->profile) + if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL) { - fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n"); - return false; + if (!options->profile) + { + fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n"); + return false; + } + + if (!options->entry_point) + options->entry_point = "main"; }
if (optind < argc)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=84571
Your paranoid android.
=== debiant (build log) ===
Task: Patch failed to apply
=== debiant (build log) ===
Task: Patch failed to apply
On Tue, 26 Jan 2021 at 20:27, Matteo Bruni mbruni@codeweavers.com wrote:
- if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL && !options->profile)
- if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL) {
fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n");
return false;
if (!options->profile)
{
fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n");
return false;
}
if (!options->entry_point)
options->entry_point = "main";
Perhaps it's worth being explicit about this in vkd3d-compiler, but strictly speaking this is superfluous. The "entry_point" fields in both struct vkd3d_shader_hlsl_source_info and struct vkd3d_shader_spirv_target_info are specified to be "main" if NULL.
On Wed, Jan 27, 2021 at 3:20 PM Henri Verbeet hverbeet@gmail.com wrote:
On Tue, 26 Jan 2021 at 20:27, Matteo Bruni mbruni@codeweavers.com wrote:
- if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL && !options->profile)
- if (!options->preprocess_only && options->source_type == VKD3D_SHADER_SOURCE_HLSL) {
fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n");
return false;
if (!options->profile)
{
fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n");
return false;
}
if (!options->entry_point)
options->entry_point = "main";
Perhaps it's worth being explicit about this in vkd3d-compiler, but strictly speaking this is superfluous. The "entry_point" fields in both struct vkd3d_shader_hlsl_source_info and struct vkd3d_shader_spirv_target_info are specified to be "main" if NULL.
Pretty sure it crashed for me without this hunk. I'll have another look and fix it properly, if necessary.
On Wed, 27 Jan 2021 at 15:33, Matteo Bruni matteo.mystral@gmail.com wrote:
Pretty sure it crashed for me without this hunk. I'll have another look and fix it properly, if necessary.
Looking at 198767, it looks like hlsl_compile_shader() should probably be taking care of that.