mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Avoid invalid input/output copies for non-numeric types.
This commit is contained in:
parent
627678a632
commit
61c72a4fd1
Notes:
Alexandre Julliard
2023-05-01 22:24:44 +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/148
@ -263,6 +263,16 @@ static void prepend_input_copy(struct hlsl_ctx *ctx, struct list *instrs, struct
|
||||
struct hlsl_ir_var *var = lhs->src.var;
|
||||
unsigned int i;
|
||||
|
||||
if (type->class > HLSL_CLASS_LAST_NUMERIC)
|
||||
{
|
||||
struct vkd3d_string_buffer *string;
|
||||
if (!(string = hlsl_type_to_string(ctx, type)))
|
||||
return;
|
||||
hlsl_fixme(ctx, &var->loc, "Input semantics for type %s.", string->buffer);
|
||||
hlsl_release_string_buffer(ctx, string);
|
||||
return;
|
||||
}
|
||||
|
||||
vector_type = hlsl_get_vector_type(ctx, type->base_type, hlsl_type_minor_size(type));
|
||||
|
||||
for (i = 0; i < hlsl_type_major_size(type); ++i)
|
||||
@ -358,6 +368,16 @@ static void append_output_copy(struct hlsl_ctx *ctx, struct list *instrs, struct
|
||||
struct hlsl_ir_var *var = rhs->src.var;
|
||||
unsigned int i;
|
||||
|
||||
if (type->class > HLSL_CLASS_LAST_NUMERIC)
|
||||
{
|
||||
struct vkd3d_string_buffer *string;
|
||||
if (!(string = hlsl_type_to_string(ctx, type)))
|
||||
return;
|
||||
hlsl_fixme(ctx, &var->loc, "Output semantics for type %s.", string->buffer);
|
||||
hlsl_release_string_buffer(ctx, string);
|
||||
return;
|
||||
}
|
||||
|
||||
vector_type = hlsl_get_vector_type(ctx, type->base_type, hlsl_type_minor_size(type));
|
||||
|
||||
for (i = 0; i < hlsl_type_major_size(type); ++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user