From d1ba86a63865372f7e3992512a637afc1a3da4a9 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 22 Apr 2013 22:40:16 +1000 Subject: [PATCH] add a gcc style alignment alternative to msvc code --- code/renderer/tr_local.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/renderer/tr_local.h b/code/renderer/tr_local.h index e6fb98e..cbd7c14 100644 --- a/code/renderer/tr_local.h +++ b/code/renderer/tr_local.h @@ -1412,7 +1412,11 @@ struct shaderCommands_s #endif // _NPATCH }; +#ifdef _MSC_VER typedef __declspec(align(16)) shaderCommands_s shaderCommands_t; +#else +typedef __attribute__((aligned(16))) shaderCommands_s shaderCommands_t; +#endif extern shaderCommands_t tess; @@ -1805,4 +1809,4 @@ Ghoul2 Insert End // tr_surfacesprites void RB_DrawSurfaceSprites( shaderStage_t *stage, shaderCommands_t *input); -#endif //TR_LOCAL_H \ No newline at end of file +#endif //TR_LOCAL_H