vkd3d-shader/hlsl: Drop extra '\n' from hlsl_error() messages.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni
2022-04-06 10:53:29 +02:00
committed by Alexandre Julliard
parent 4ab4d42468
commit 233157649c
2 changed files with 5 additions and 5 deletions

View File

@@ -1920,7 +1920,7 @@ static struct list *add_call(struct hlsl_ctx *ctx, const char *name,
if (intrinsic->param_count >= 0 && params->args_count != intrinsic->param_count) if (intrinsic->param_count >= 0 && params->args_count != intrinsic->param_count)
{ {
hlsl_error(ctx, &loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT, hlsl_error(ctx, &loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
"Wrong number of arguments to function '%s': expected %u, but got %u.\n", "Wrong number of arguments to function '%s': expected %u, but got %u.",
name, intrinsic->param_count, params->args_count); name, intrinsic->param_count, params->args_count);
free_parse_initializer(params); free_parse_initializer(params);
return NULL; return NULL;
@@ -1938,7 +1938,7 @@ static struct list *add_call(struct hlsl_ctx *ctx, const char *name,
if ((string = hlsl_type_to_string(ctx, params->args[i]->data_type))) if ((string = hlsl_type_to_string(ctx, params->args[i]->data_type)))
hlsl_error(ctx, &loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, hlsl_error(ctx, &loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"Wrong type for argument %u of '%s': expected a numeric type, but got '%s'.\n", "Wrong type for argument %u of '%s': expected a numeric type, but got '%s'.",
i + 1, name, string->buffer); i + 1, name, string->buffer);
hlsl_release_string_buffer(ctx, string); hlsl_release_string_buffer(ctx, string);
free_parse_initializer(params); free_parse_initializer(params);
@@ -2969,7 +2969,7 @@ type:
string = hlsl_type_to_string(ctx, $3); string = hlsl_type_to_string(ctx, $3);
if (string) if (string)
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"Texture data type %s is not scalar or vector.\n", string->buffer); "Texture data type %s is not scalar or vector.", string->buffer);
hlsl_release_string_buffer(ctx, string); hlsl_release_string_buffer(ctx, string);
} }
$$ = hlsl_new_texture_type(ctx, $1, $3); $$ = hlsl_new_texture_type(ctx, $1, $3);
@@ -3489,7 +3489,7 @@ primary_expr:
} }
else else
{ {
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Identifier \"%s\" is not declared.\n", $1); hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Identifier \"%s\" is not declared.", $1);
YYABORT; YYABORT;
} }
} }

View File

@@ -1417,7 +1417,7 @@ static void write_sm4_sample(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer
if (!encode_texel_offset_as_aoffimmi(&instr, texel_offset)) if (!encode_texel_offset_as_aoffimmi(&instr, texel_offset))
{ {
hlsl_error(ctx, &texel_offset->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TEXEL_OFFSET, hlsl_error(ctx, &texel_offset->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TEXEL_OFFSET,
"Offset must resolve to integer literal in the range -8 to 7.\n"); "Offset must resolve to integer literal in the range -8 to 7.");
return; return;
} }
} }