17 Apr
2023
17 Apr
'23
9:36 a.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
+ struct hlsl_type *arg_type = arg->data_type; + struct hlsl_ir_swizzle *swizzle; + struct hlsl_ir_constant *c; + + if (arg_type->class != HLSL_CLASS_VECTOR || arg_type->dimx != 4) + { + struct vkd3d_string_buffer *string; + + if ((string = hlsl_type_to_string(ctx, arg_type))) + { + hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, "Wrong argument type '%s'.", string->buffer); + hlsl_release_string_buffer(ctx, string); + } + + return false; + } It seems that calling with a scalar is fine too.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/161#note_30221