vkd3d-shader: Remove extra newlines from compiler messages.

This commit is contained in:
Nikolay Sivov
2023-06-23 22:22:19 +02:00
committed by Alexandre Julliard
parent c4a8e06abf
commit 4ed60cda13
Notes: Alexandre Julliard 2023-06-27 23:34:41 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/246
3 changed files with 9 additions and 11 deletions

View File

@@ -473,7 +473,7 @@ static struct list *create_loop(struct hlsl_ctx *ctx, enum loop_type type, const
} }
else else
{ {
hlsl_warning(ctx, loc, VKD3D_SHADER_ERROR_HLSL_NOT_IMPLEMENTED, "Loop unrolling is not implemented.\n"); hlsl_warning(ctx, loc, VKD3D_SHADER_ERROR_HLSL_NOT_IMPLEMENTED, "Loop unrolling is not implemented.");
} }
} }
else if (!strcmp(attr->name, "loop") else if (!strcmp(attr->name, "loop")
@@ -1564,8 +1564,7 @@ static struct hlsl_ir_node *add_binary_dot_expr(struct hlsl_ctx *ctx, struct lis
struct vkd3d_string_buffer *string; struct vkd3d_string_buffer *string;
if ((string = hlsl_type_to_string(ctx, arg1->data_type))) if ((string = hlsl_type_to_string(ctx, arg1->data_type)))
hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, "Invalid type %s.", string->buffer);
"Invalid type %s.\n", string->buffer);
hlsl_release_string_buffer(ctx, string); hlsl_release_string_buffer(ctx, string);
return NULL; return NULL;
} }
@@ -1575,8 +1574,7 @@ static struct hlsl_ir_node *add_binary_dot_expr(struct hlsl_ctx *ctx, struct lis
struct vkd3d_string_buffer *string; struct vkd3d_string_buffer *string;
if ((string = hlsl_type_to_string(ctx, arg2->data_type))) if ((string = hlsl_type_to_string(ctx, arg2->data_type)))
hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, "Invalid type %s.", string->buffer);
"Invalid type %s.\n", string->buffer);
hlsl_release_string_buffer(ctx, string); hlsl_release_string_buffer(ctx, string);
return NULL; return NULL;
} }
@@ -2076,7 +2074,7 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
type_has_object_components(var->data_type, true)) type_has_object_components(var->data_type, true))
{ {
hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"Target profile doesn't support objects as struct members in uniform variables.\n"); "Target profile doesn't support objects as struct members in uniform variables.");
} }
if ((func = hlsl_get_func_decl(ctx, var->name))) if ((func = hlsl_get_func_decl(ctx, var->name)))
@@ -3343,7 +3341,7 @@ static bool intrinsic_tex(struct hlsl_ctx *ctx, const struct parse_initializer *
if (params->args_count == 4) if (params->args_count == 4)
{ {
hlsl_fixme(ctx, loc, "Samples with gradients are not implemented.\n"); hlsl_fixme(ctx, loc, "Samples with gradients are not implemented.");
} }
sampler_type = params->args[0]->data_type; sampler_type = params->args[0]->data_type;
@@ -3404,7 +3402,7 @@ static bool intrinsic_transpose(struct hlsl_ctx *ctx,
if ((string = hlsl_type_to_string(ctx, arg_type))) if ((string = hlsl_type_to_string(ctx, arg_type)))
hlsl_error(ctx, &arg->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, hlsl_error(ctx, &arg->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"Wrong type for argument 1 of transpose(): expected a matrix or scalar type, but got '%s'.\n", "Wrong type for argument 1 of transpose(): expected a matrix or scalar type, but got '%s'.",
string->buffer); string->buffer);
hlsl_release_string_buffer(ctx, string); hlsl_release_string_buffer(ctx, string);
return false; return false;

View File

@@ -1889,7 +1889,7 @@ static bool split_matrix_copies(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr
if (rhs->type != HLSL_IR_LOAD) if (rhs->type != HLSL_IR_LOAD)
{ {
hlsl_fixme(ctx, &instr->loc, "Copying from unsupported node type.\n"); hlsl_fixme(ctx, &instr->loc, "Copying from unsupported node type.");
return false; return false;
} }

View File

@@ -4794,7 +4794,7 @@ static void write_sm4_jump(struct hlsl_ctx *ctx,
vkd3d_unreachable(); vkd3d_unreachable();
default: default:
hlsl_fixme(ctx, &jump->node.loc, "Jump type %s.\n", hlsl_jump_type_to_string(jump->type)); hlsl_fixme(ctx, &jump->node.loc, "Jump type %s.", hlsl_jump_type_to_string(jump->type));
return; return;
} }
@@ -5010,7 +5010,7 @@ static void write_sm4_resource_store(struct hlsl_ctx *ctx,
if (resource_type->sampler_dim == HLSL_SAMPLER_DIM_STRUCTURED_BUFFER) if (resource_type->sampler_dim == HLSL_SAMPLER_DIM_STRUCTURED_BUFFER)
{ {
hlsl_fixme(ctx, &store->node.loc, "Structured buffers store is not implemented.\n"); hlsl_fixme(ctx, &store->node.loc, "Structured buffers store is not implemented.");
return; return;
} }