mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Remove a redundant type check.
We already perform an implicit cast per component in initialize_var_components().
This commit is contained in:
parent
d72d5c35d1
commit
675d7b8cb6
Notes:
Alexandre Julliard
2024-04-03 00:21:18 +02:00
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/745
@ -4358,22 +4358,7 @@ static struct hlsl_block *add_constructor(struct hlsl_ctx *ctx, struct hlsl_type
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < params->args_count; ++i)
|
||||
{
|
||||
struct hlsl_ir_node *arg = params->args[i];
|
||||
|
||||
if (arg->data_type->class == HLSL_CLASS_OBJECT)
|
||||
{
|
||||
struct vkd3d_string_buffer *string;
|
||||
|
||||
if ((string = hlsl_type_to_string(ctx, arg->data_type)))
|
||||
hlsl_error(ctx, &arg->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
|
||||
"Invalid type %s for constructor argument.", string->buffer);
|
||||
hlsl_release_string_buffer(ctx, string);
|
||||
continue;
|
||||
}
|
||||
|
||||
initialize_var_components(ctx, params->instrs, var, &idx, arg);
|
||||
}
|
||||
initialize_var_components(ctx, params->instrs, var, &idx, params->args[i]);
|
||||
|
||||
if (!(load = hlsl_new_var_load(ctx, var, loc)))
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user