mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
[entity] Use _aligned_malloc etc for _WIN32
This is a bit of a hack for now (need to look into maybe using cmem), but it gets 32-bit windows working for all but the software renderer (probably just refdef (and maybe viddef) getting out of sync with the assembly code.
This commit is contained in:
parent
18247a8c8e
commit
37be6a23a2
1 changed files with 11 additions and 0 deletions
|
@ -37,6 +37,17 @@
|
|||
|
||||
#include "QF/entity.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
// FIXME (maybe) this is a hack to make DARRAY arrrays 16-byte aligned on
|
||||
// 32-bit systems (in particular for this case, windows) as the vectors and
|
||||
// matrices require 16-byte alignment but system malloc (etc) provide only
|
||||
// 8-byte alignment.
|
||||
// Really, a custom allocator (maybe using cmem) would be better.
|
||||
#define free(mem) _aligned_free(mem)
|
||||
#define malloc(size) _aligned_malloc(size, 16)
|
||||
#define realloc(mem, size) _aligned_realloc(mem, size, 16)
|
||||
#endif
|
||||
|
||||
static void
|
||||
hierarchy_UpdateTransformIndices (hierarchy_t *hierarchy, uint32_t start,
|
||||
int offset)
|
||||
|
|
Loading…
Reference in a new issue