From 67551f31fdfbe600ade9b36fb4137abd4f6f3ac7 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 13 Nov 2015 18:38:48 +0100 Subject: [PATCH] gsdx: use constant expression in offsetof Well previous expression was a constant already but compiler failed miserably. --- plugins/GSdx/GSDrawScanlineCodeGenerator.x64.avx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSDrawScanlineCodeGenerator.x64.avx.cpp b/plugins/GSdx/GSDrawScanlineCodeGenerator.x64.avx.cpp index de9b6bce4c..a4f3a9bc4b 100644 --- a/plugins/GSdx/GSDrawScanlineCodeGenerator.x64.avx.cpp +++ b/plugins/GSdx/GSDrawScanlineCodeGenerator.x64.avx.cpp @@ -1664,8 +1664,8 @@ void GSDrawScanlineCodeGenerator::WriteFrame() mov(rax, r8); and(rax, 3); shl(rax, 5); - vpaddw(xmm2, ptr[r12 + rax + offsetof(GSScanlineGlobalData, dimx[0])]); - vpaddw(xmm3, ptr[r12 + rax + offsetof(GSScanlineGlobalData, dimx[1])]); + vpaddw(xmm2, ptr[r12 + rax + offsetof(GSScanlineGlobalData, dimx) + sizeof(GSVector4i) * 0]); + vpaddw(xmm3, ptr[r12 + rax + offsetof(GSScanlineGlobalData, dimx) + sizeof(GSVector4i) * 1]); } // GSVector4i fs = c[0].upl16(c[1]).pu16(c[0].uph16(c[1]));