mirror of https://github.com/PCSX2/pcsx2.git
gsdx: help stupid compiler to allow 32 byte move
Default copy-constructor is eight 32 bits move GSRendererOGL::Lines2Sprites code shrinks from 510B to 398B (loop of the function 296B => 181B). Hopefully it will reduce the cost to convert line to sprite on the CPU (i.e. when geometry shader is disabled)
This commit is contained in:
parent
b282909c9e
commit
6ee841319f
|
@ -41,10 +41,21 @@ struct alignas(32) GSVertex
|
||||||
uint32 FOG; // FOG:28
|
uint32 FOG; // FOG:28
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if _M_SSE >= 0x500
|
||||||
|
__m256i mx;
|
||||||
|
#endif
|
||||||
__m128i m[2];
|
__m128i m[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GSVertex() = default; // Warning object is potentially used in hot path
|
||||||
|
|
||||||
|
#if _M_SSE >= 0x500
|
||||||
|
GSVertex(const GSVertex& v) {mx = v.mx;}
|
||||||
|
void operator = (const GSVertex& v) {mx = v.mx;}
|
||||||
|
#else
|
||||||
|
GSVertex(const GSVertex& v) {m[0] = v.m[0]; m[1] = v.m[1];}
|
||||||
void operator = (const GSVertex& v) {m[0] = v.m[0]; m[1] = v.m[1];}
|
void operator = (const GSVertex& v) {m[0] = v.m[0]; m[1] = v.m[1];}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GSVertexP
|
struct GSVertexP
|
||||||
|
|
Loading…
Reference in New Issue