diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index a9730d3ec2..10ce8e18e0 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -147,6 +147,8 @@ EXPORT_C_(int) GSinit() if (g_const == nullptr) return -1; + else + g_const->Init(); #ifdef _WIN32 diff --git a/plugins/GSdx/GSScanlineEnvironment.h b/plugins/GSdx/GSScanlineEnvironment.h index 4a8c0409d5..f034ea565c 100644 --- a/plugins/GSdx/GSScanlineEnvironment.h +++ b/plugins/GSdx/GSScanlineEnvironment.h @@ -250,7 +250,11 @@ struct GSScanlineConstantData : public GSAlignedClass<32> alignas(16) float m_shift_128b[5][4]; alignas(16) float m_log2_coef_128b[4][4]; - GSScanlineConstantData() + GSScanlineConstantData() {} + + // GCC will be clever enough to stick some AVX instruction here + // So it must be defered to post global constructor + void Init() { uint8 I_hate_vs2013_m_test_256b[16][8] = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},