File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -712,7 +712,7 @@ astcenc_error astcenc_context_alloc(
712712
713713 size_t worksize = sizeof (compression_working_buffers) * thread_count;
714714 ctx->working_buffers = aligned_malloc<compression_working_buffers>(worksize, ASTCENC_VECALIGN);
715- static_assert ((sizeof (compression_working_buffers) % ASTCENC_VECALIGN) == 0 ,
715+ static_assert ((ASTCENC_VECALIGN == 0 ) || (( sizeof (compression_working_buffers) % ASTCENC_VECALIGN) == 0 ) ,
716716 " compression_working_buffers size must be multiple of vector alignment" );
717717 if (!ctx->working_buffers )
718718 {
Original file line number Diff line number Diff line change 11// SPDX-License-Identifier: Apache-2.0
22// ----------------------------------------------------------------------------
3- // Copyright 2011-2021 Arm Limited
3+ // Copyright 2011-2023 Arm Limited
44//
55// Licensed under the Apache License, Version 2.0 (the "License"); you may not
66// use this file except in compliance with the License. You may obtain a copy
7373 #endif
7474#endif
7575
76+ // Force vector-sized SIMD alignment
7677#if ASTCENC_AVX
7778 #define ASTCENC_VECALIGN 32
78- #else
79+ #elif ASTCENC_SSE || ASTCENC_NEON
7980 #define ASTCENC_VECALIGN 16
81+ // Use default alignment for non-SIMD builds
82+ #else
83+ #define ASTCENC_VECALIGN 0
8084#endif
8185
8286#if ASTCENC_SSE != 0 || ASTCENC_AVX != 0 || ASTCENC_POPCNT != 0
You can’t perform that action at this time.
0 commit comments