mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: micro optimize PSConstantBuffer cache
Might help to save a cache line on the CPU :)
This commit is contained in:
parent
58bd645d49
commit
84f844767c
|
@ -294,12 +294,12 @@ class GSDeviceOGL : public GSDevice
|
|||
__aligned(struct, 32) PSConstantBuffer
|
||||
{
|
||||
GSVector4 FogColor_AREF;
|
||||
GSVector4 HalfTexel;
|
||||
GSVector4 WH;
|
||||
GSVector4 MinMax;
|
||||
GSVector4 MinF_TA;
|
||||
GSVector4i MskFix;
|
||||
|
||||
GSVector4 HalfTexel;
|
||||
GSVector4 MinMax;
|
||||
GSVector4 TC_OffsetHack;
|
||||
|
||||
PSConstantBuffer()
|
||||
|
@ -319,12 +319,13 @@ class GSDeviceOGL : public GSDevice
|
|||
|
||||
// if WH matches both HalfTexel and TC_OffsetHack do too
|
||||
// MinMax depends on WH and MskFix so no need to check it too
|
||||
if(!((a[0] == b[0]) & (a[2] == b[2]) & (a[4] == b[4]) & (a[5] == b[5])).alltrue())
|
||||
if(!((a[0] == b[0]) & (a[1] == b[1]) & (a[2] == b[2]) & (a[3] == b[3])).alltrue())
|
||||
{
|
||||
// Note previous check uses SSE already, a plain copy will be faster than any memcpy
|
||||
a[0] = b[0];
|
||||
a[1] = b[1];
|
||||
a[2] = b[2];
|
||||
a[4] = b[4];
|
||||
a[5] = b[5];
|
||||
a[3] = b[3];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -787,12 +787,12 @@ static const char* tfx_glsl =
|
|||
"{\n"
|
||||
" vec3 FogColor;\n"
|
||||
" float AREF;\n"
|
||||
" vec4 HalfTexel;\n"
|
||||
" vec4 WH;\n"
|
||||
" vec4 MinMax;\n"
|
||||
" vec2 MinF;\n"
|
||||
" vec2 TA;\n"
|
||||
" uvec4 MskFix;\n"
|
||||
" vec4 HalfTexel;\n"
|
||||
" vec4 MinMax;\n"
|
||||
" vec4 TC_OffsetHack;\n"
|
||||
"};\n"
|
||||
"\n"
|
||||
|
|
|
@ -336,12 +336,12 @@ layout(std140, binding = 21) uniform cb21
|
|||
{
|
||||
vec3 FogColor;
|
||||
float AREF;
|
||||
vec4 HalfTexel;
|
||||
vec4 WH;
|
||||
vec4 MinMax;
|
||||
vec2 MinF;
|
||||
vec2 TA;
|
||||
uvec4 MskFix;
|
||||
vec4 HalfTexel;
|
||||
vec4 MinMax;
|
||||
vec4 TC_OffsetHack;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue