From 81e2b6c0cf1bf8f7cea18035d24edb1ff8ae36ff Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 16 Oct 2015 20:50:25 -0500 Subject: [PATCH] Fix reserved size for swap buffer command being too small on x86_64 --- code/renderergl1/tr_cmds.c | 2 +- code/renderergl2/tr_cmds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/renderergl1/tr_cmds.c b/code/renderergl1/tr_cmds.c index 19094700..6a4a319c 100644 --- a/code/renderergl1/tr_cmds.c +++ b/code/renderergl1/tr_cmds.c @@ -147,7 +147,7 @@ returns NULL if there is not enough space for important commands ============= */ void *R_GetCommandBuffer( int bytes ) { - return R_GetCommandBufferReserved( bytes, sizeof ( swapBuffersCommand_t ) ); + return R_GetCommandBufferReserved( bytes, PAD( sizeof( swapBuffersCommand_t ), sizeof(void *) ) ); } diff --git a/code/renderergl2/tr_cmds.c b/code/renderergl2/tr_cmds.c index 0f48727d..79706d25 100644 --- a/code/renderergl2/tr_cmds.c +++ b/code/renderergl2/tr_cmds.c @@ -154,7 +154,7 @@ returns NULL if there is not enough space for important commands ============= */ void *R_GetCommandBuffer( int bytes ) { - return R_GetCommandBufferReserved( bytes, sizeof ( swapBuffersCommand_t ) ); + return R_GetCommandBufferReserved( bytes, PAD( sizeof( swapBuffersCommand_t ), sizeof(void *) ) ); }