Signed-off-by: Francisco Casas fcasas@codeweavers.com --- libs/vkd3d-shader/hlsl.y | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 6fb4eb78..158ab492 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1347,7 +1347,14 @@ static void generic_var_initializer(struct hlsl_ctx *ctx, struct hlsl_ir_var *va } else if (type->type == HLSL_CLASS_ARRAY) { - hlsl_fixme(ctx, &v->loc, "Initializers for arrays not supported yet."); + for (int i = 0; i < type->e.array.elements_count; i++) + { + struct hlsl_type *elem_type = type->e.array.type; + unsigned int elem_offset = i * elem_type->reg_size; + + generic_var_initializer(ctx, var, v, reg_offset + elem_offset, elem_type, + initializer_i, instrs); + } return; } else if (type->type == HLSL_CLASS_OBJECT)