From 1170f08dae69e6c61db7f161e6239ffcf689b832 Mon Sep 17 00:00:00 2001 From: engineer_apple Date: Tue, 10 Nov 2020 20:29:55 +0000 Subject: [PATCH] Burningsvideo 0.52 Linux Warnings git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6156 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CSoftwareDriver2.h | 2 +- source/Irrlicht/IBurningShader.h | 3 +-- source/Irrlicht/SoftwareDriver2_compile_config.h | 9 +++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/source/Irrlicht/CSoftwareDriver2.h b/source/Irrlicht/CSoftwareDriver2.h index 557499b0..4c87bf3f 100644 --- a/source/Irrlicht/CSoftwareDriver2.h +++ b/source/Irrlicht/CSoftwareDriver2.h @@ -361,7 +361,7 @@ namespace video ETF_TEXGEN_MASK = ETF_TEXGEN_CAMERA_SPHERE | ETF_TEXGEN_CAMERA_REFLECTION | ETF_TEXGEN_WRAP }; size_t TransformationStack; // 0 .. 3D , 1 .. 2D - core::matrix4 Transformation[2][ETS_COUNT_BURNING]; + core::matrix4 ALIGN(16) Transformation[2][ETS_COUNT_BURNING]; size_t TransformationFlag[2][ETS_COUNT_BURNING]; // E_TRANSFORMATION_FLAG diff --git a/source/Irrlicht/IBurningShader.h b/source/Irrlicht/IBurningShader.h index 4991fe9b..748a9a40 100644 --- a/source/Irrlicht/IBurningShader.h +++ b/source/Irrlicht/IBurningShader.h @@ -376,8 +376,7 @@ namespace video tFixPoint AlphaRef; int RenderPass_ShaderIsTransparent; - u8 _unused_pack[4]; - sScanConvertData scan; + sScanConvertData ALIGN(16) scan; sScanLineData line; tVideoSample PrimitiveColor; //used if no color interpolation is defined diff --git a/source/Irrlicht/SoftwareDriver2_compile_config.h b/source/Irrlicht/SoftwareDriver2_compile_config.h index 70673b45..897049ac 100644 --- a/source/Irrlicht/SoftwareDriver2_compile_config.h +++ b/source/Irrlicht/SoftwareDriver2_compile_config.h @@ -306,4 +306,13 @@ namespace irr { //! Size of a static C-style array. #define array_size(_arr) ((sizeof(_arr)/sizeof(*_arr))) +//! Compiler Align +#if defined(_MSC_VER) +#define ALIGN(x) __declspec(align(x)) +#elif defined(__GNUC__) +#define ALIGN(x) __attribute__ ((aligned(x))) +#else +#define ALIGN(x) +#endif + #endif // __S_VIDEO_2_SOFTWARE_COMPILE_CONFIG_H_INCLUDED__