gsdx-ogl: Fix MaxDepthPS byte alignment.

Bigger value comes first, then smaller to fill the gap so the alignment
can be proper.
vec3
float
This commit is contained in:
lightningterror 2020-06-19 05:33:57 +02:00
parent 5d318c9c3c
commit 5362fc9c26
2 changed files with 4 additions and 4 deletions

View File

@ -177,14 +177,14 @@ void GSRendererOGL::EmulateZbuffer()
const bool clamp_z = (uint32)(GSVector4i(m_vt.m_max.p).z) > max_z; const bool clamp_z = (uint32)(GSVector4i(m_vt.m_max.p).z) > max_z;
vs_cb.MaxDepth = GSVector2i(0xFFFFFFFF); vs_cb.MaxDepth = GSVector2i(0xFFFFFFFF);
ps_cb.MaxDepth = GSVector4(1.0f); ps_cb.MaxDepth = GSVector4(0.0f, 0.0f, 0.0f, 1.0f);
m_ps_sel.zclamp = 0; m_ps_sel.zclamp = 0;
if (clamp_z) { if (clamp_z) {
if (m_vt.m_primclass == GS_SPRITE_CLASS || m_vt.m_primclass == GS_POINT_CLASS) { if (m_vt.m_primclass == GS_SPRITE_CLASS || m_vt.m_primclass == GS_POINT_CLASS) {
vs_cb.MaxDepth = GSVector2i(max_z); vs_cb.MaxDepth = GSVector2i(max_z);
} else { } else {
ps_cb.MaxDepth = GSVector4(max_z * ldexpf(1, -32)); ps_cb.MaxDepth = GSVector4(0.0f, 0.0f, 0.0f, max_z * ldexpf(1, -32));
m_ps_sel.zclamp = 1; m_ps_sel.zclamp = 1;
} }
} }

View File

@ -95,8 +95,8 @@ layout(std140, binding = 21) uniform cb21
vec2 TextureScale; vec2 TextureScale;
vec2 TC_OffsetHack; vec2 TC_OffsetHack;
float MaxDepthPS;
vec3 pad_cb21; vec3 pad_cb21;
float MaxDepthPS;
mat4 DitherMatrix; mat4 DitherMatrix;
}; };