Choose better alignment for heavy-duty rendering structures, patch by Matt Turner (#4981)
This commit is contained in:
parent
185d2d6b60
commit
5f63ab9160
5 changed files with 11 additions and 4 deletions
|
@ -183,8 +183,10 @@ typedef int sfxHandle_t;
|
|||
typedef int fileHandle_t;
|
||||
typedef int clipHandle_t;
|
||||
|
||||
#define PAD(x,y) (((x)+(y)-1) & ~((y)-1))
|
||||
#define PADLEN(x,y) (PAD((x), (y)) - (x))
|
||||
#define PAD(base, alignment) (((base)+(alignment)-1) & ~((alignment)-1))
|
||||
#define PADLEN(base, alignment) (PAD((base), (alignment)) - (base))
|
||||
|
||||
#define PADP(base, alignment) ((void *) PAD((intptr_t) (base), (alignment)))
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define QALIGN(x) __attribute__((aligned(x)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue