Actually fix alignment for vectors

Whoops :P
This commit is contained in:
Ginger Bill
2016-11-16 18:27:54 +00:00
parent e2d98324ba
commit 4895031df5
2 changed files with 37 additions and 7 deletions
+1 -1
View File
@@ -1059,7 +1059,7 @@ i64 type_align_of(BaseTypeSizes s, gbAllocator allocator, Type *t) {
return type_align_of(s, allocator, t->Array.elem);
case Type_Vector: {
i64 size = type_size_of(s, allocator, t->Vector.elem);
i64 count = gb_max(prev_pow2(size), 1);
i64 count = gb_max(prev_pow2(t->Vector.count), 1);
i64 total = size * count;
return gb_clamp(total, 1, s.max_align);
} break;