vkd3d-shader/hlsl: Handle error expressions in explicit casts.

This commit is contained in:
Elizabeth Figura 2024-08-29 12:48:23 -05:00 committed by Henri Verbeet
parent 10efdd3f63
commit 41ff4343e1
Notes: Henri Verbeet 2024-10-07 17:53:50 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1148

View File

@ -475,6 +475,9 @@ static bool add_explicit_conversion(struct hlsl_ctx *ctx, struct hlsl_block *blo
dst_type = hlsl_new_array_type(ctx, dst_type, arrays->sizes[i]); dst_type = hlsl_new_array_type(ctx, dst_type, arrays->sizes[i]);
} }
if (instr->data_type->class == HLSL_CLASS_ERROR)
return true;
if (!explicit_compatible_data_types(ctx, src_type, dst_type)) if (!explicit_compatible_data_types(ctx, src_type, dst_type))
{ {
struct vkd3d_string_buffer *src_string, *dst_string; struct vkd3d_string_buffer *src_string, *dst_string;