gsdx: defer GSScanlineConstantData init

Avoid AVX instruction in the middle

Issue #1677
This commit is contained in:
Gregory Hainaut 2016-11-28 19:40:25 +01:00
parent 4c3e98754e
commit f6cad2235b
2 changed files with 7 additions and 1 deletions

View File

@ -147,6 +147,8 @@ EXPORT_C_(int) GSinit()
if (g_const == nullptr)
return -1;
else
g_const->Init();
#ifdef _WIN32

View File

@ -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},