@@ -482,18 +482,34 @@ emit_sri_vector128 (TransformData *td, MonoMethod *cmethod, MonoMethodSignature
482
482
MonoClass * ret_class = mono_class_from_mono_type_internal (csignature -> ret );
483
483
int ret_size = mono_class_value_size (ret_class , NULL );
484
484
485
+ if (!strcmp (m_class_get_name (ret_class ), "Vector2" )) {
486
+ g_assert (ret_size == 8 );
487
+ } else if (!strcmp (m_class_get_name (ret_class ), "Vector3" )) {
488
+ g_assert (ret_size == 12 );
489
+ } else {
490
+ g_assert (ret_size == 16 );
491
+ }
492
+
485
493
MonoClass * arg_class = mono_class_from_mono_type_internal (csignature -> params [0 ]);
486
494
int arg_size = mono_class_value_size (arg_class , NULL );
487
495
496
+ if (!strcmp (m_class_get_name (arg_class ), "Vector2" )) {
497
+ g_assert (arg_size == 8 );
498
+ } else if (!strcmp (m_class_get_name (arg_class ), "Vector3" )) {
499
+ g_assert (arg_size == 12 );
500
+ } else {
501
+ g_assert (arg_size == 16 );
502
+ }
503
+
488
504
vector_klass = ret_class ;
489
505
vector_size = ret_size ;
490
506
491
507
if (id == SN_AsVector2 ) {
492
- g_assert (ret_size == 8 );
493
- g_assert ((arg_size == 12 ) || (arg_size == 16 ));
508
+ g_assert (ret_size == 8 );
509
+ g_assert ((arg_size == 12 ) || (arg_size == 16 ));
494
510
} else if (id == SN_AsVector3 ) {
495
- g_assert (ret_size == 12 );
496
- g_assert ((arg_size == 8 ) || (arg_size == 16 ));
511
+ g_assert (ret_size == 12 );
512
+ g_assert ((arg_size == 8 ) || (arg_size == 16 ));
497
513
}
498
514
499
515
if (arg_size == ret_size ) {
0 commit comments