mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Split matrices into multiple variables in prepend_input_copy().
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d2d4bc24e9
commit
ea38ecc4ff
@ -84,6 +84,21 @@ static void prepend_input_copy(struct hlsl_ctx *ctx, struct list *instrs, struct
|
||||
struct hlsl_ir_load *load;
|
||||
struct hlsl_ir_var *input;
|
||||
|
||||
if (type->type == HLSL_CLASS_MATRIX)
|
||||
{
|
||||
struct hlsl_type *vector_type = hlsl_get_vector_type(ctx, type->base_type, minor_size(type));
|
||||
struct hlsl_semantic vector_semantic = *semantic;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < major_size(type); ++i)
|
||||
{
|
||||
prepend_input_copy(ctx, instrs, var, vector_type, 4 * i, modifiers, &vector_semantic);
|
||||
++vector_semantic.index;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(name = hlsl_get_string_buffer(ctx)))
|
||||
return;
|
||||
vkd3d_string_buffer_printf(name, "<input-%s%u>", semantic->name, semantic->index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user