mirror of https://github.com/PCSX2/pcsx2.git
GS interlace: Fix Wreturn-type, Wunused-variable, Wsometimes-uninitialized warnings.
This commit is contained in:
parent
bfcd5c84ca
commit
0988b08f7a
|
@ -89,7 +89,6 @@ float4 ps_main4(PS_INPUT input) : SV_Target0
|
||||||
// field.
|
// field.
|
||||||
|
|
||||||
const int idx = int(ZrH.x); // buffer index passed from CPU
|
const int idx = int(ZrH.x); // buffer index passed from CPU
|
||||||
const int bank = idx >> 1; // current bank
|
|
||||||
const int field = idx & 1; // current field
|
const int field = idx & 1; // current field
|
||||||
const int vpos = int(input.p.y); // vertical position of destination texture
|
const int vpos = int(input.p.y); // vertical position of destination texture
|
||||||
const float sensitivity = ZrH.w; // passed from CPU, higher values mean more likely to use weave
|
const float sensitivity = ZrH.w; // passed from CPU, higher values mean more likely to use weave
|
||||||
|
@ -106,12 +105,6 @@ float4 ps_main4(PS_INPUT input) : SV_Target0
|
||||||
|
|
||||||
switch (idx)
|
switch (idx)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
p_t0 = iptr;
|
|
||||||
p_t1 = iptr + bofs;
|
|
||||||
p_t2 = iptr + bofs;
|
|
||||||
p_t3 = iptr;
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
p_t0 = iptr;
|
p_t0 = iptr;
|
||||||
p_t1 = iptr;
|
p_t1 = iptr;
|
||||||
|
@ -131,6 +124,10 @@ float4 ps_main4(PS_INPUT input) : SV_Target0
|
||||||
p_t3 = iptr;
|
p_t3 = iptr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
p_t0 = iptr;
|
||||||
|
p_t1 = iptr + bofs;
|
||||||
|
p_t2 = iptr + bofs;
|
||||||
|
p_t3 = iptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,6 @@ void ps_main4()
|
||||||
// we use the contents of the MAD frame buffer to reconstruct the missing lines from the current field.
|
// we use the contents of the MAD frame buffer to reconstruct the missing lines from the current field.
|
||||||
|
|
||||||
const int idx = int(ZrH.x); // buffer index passed from CPU
|
const int idx = int(ZrH.x); // buffer index passed from CPU
|
||||||
const int bank = idx >> 1; // current bank
|
|
||||||
const int field = idx & 1; // current field
|
const int field = idx & 1; // current field
|
||||||
const int vpos = int(gl_FragCoord.y); // vertical position of destination texture
|
const int vpos = int(gl_FragCoord.y); // vertical position of destination texture
|
||||||
const float sensitivity = ZrH.w; // passed from CPU, higher values mean more likely to use weave
|
const float sensitivity = ZrH.w; // passed from CPU, higher values mean more likely to use weave
|
||||||
|
@ -97,12 +96,6 @@ void ps_main4()
|
||||||
|
|
||||||
switch (idx)
|
switch (idx)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
p_t0 = iptr;
|
|
||||||
p_t1 = iptr + bofs;
|
|
||||||
p_t2 = iptr + bofs;
|
|
||||||
p_t3 = iptr;
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
p_t0 = iptr;
|
p_t0 = iptr;
|
||||||
p_t1 = iptr;
|
p_t1 = iptr;
|
||||||
|
@ -122,6 +115,10 @@ void ps_main4()
|
||||||
p_t3 = iptr;
|
p_t3 = iptr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
p_t0 = iptr;
|
||||||
|
p_t1 = iptr + bofs;
|
||||||
|
p_t2 = iptr + bofs;
|
||||||
|
p_t3 = iptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,12 +122,6 @@ void ps_main4()
|
||||||
|
|
||||||
switch (idx)
|
switch (idx)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
p_t0 = iptr;
|
|
||||||
p_t1 = iptr + bofs;
|
|
||||||
p_t2 = iptr + bofs;
|
|
||||||
p_t3 = iptr;
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
p_t0 = iptr;
|
p_t0 = iptr;
|
||||||
p_t1 = iptr;
|
p_t1 = iptr;
|
||||||
|
@ -147,6 +141,10 @@ void ps_main4()
|
||||||
p_t3 = iptr;
|
p_t3 = iptr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
p_t0 = iptr;
|
||||||
|
p_t1 = iptr + bofs;
|
||||||
|
p_t2 = iptr + bofs;
|
||||||
|
p_t3 = iptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@ fragment float4 ps_interlace0(ConvertShaderData data [[stage_in]], ConvertPSRes
|
||||||
return res.sample(data.t);
|
return res.sample(data.t);
|
||||||
else
|
else
|
||||||
discard_fragment();
|
discard_fragment();
|
||||||
|
|
||||||
|
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,7 +92,6 @@ fragment float4 ps_interlace4(ConvertShaderData data [[stage_in]], ConvertPSRes
|
||||||
constant GSMTLInterlacePSUniform& uniform [[buffer(GSMTLBufferIndexUniforms)]])
|
constant GSMTLInterlacePSUniform& uniform [[buffer(GSMTLBufferIndexUniforms)]])
|
||||||
{
|
{
|
||||||
const int idx = int(uniform.ZrH.x); // buffer index passed from CPU
|
const int idx = int(uniform.ZrH.x); // buffer index passed from CPU
|
||||||
const int bank = idx >> 1; // current bank
|
|
||||||
const int field = idx & 1; // current field
|
const int field = idx & 1; // current field
|
||||||
const int vpos = int(data.p.y); // vertical position of destination texture
|
const int vpos = int(data.p.y); // vertical position of destination texture
|
||||||
const float sensitivity = uniform.ZrH.w; // passed from CPU, higher values mean more likely to use weave
|
const float sensitivity = uniform.ZrH.w; // passed from CPU, higher values mean more likely to use weave
|
||||||
|
@ -108,12 +109,6 @@ fragment float4 ps_interlace4(ConvertShaderData data [[stage_in]], ConvertPSRes
|
||||||
|
|
||||||
switch (idx)
|
switch (idx)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
p_t0 = iptr;
|
|
||||||
p_t1 = iptr + bofs;
|
|
||||||
p_t2 = iptr + bofs;
|
|
||||||
p_t3 = iptr;
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
p_t0 = iptr;
|
p_t0 = iptr;
|
||||||
p_t1 = iptr;
|
p_t1 = iptr;
|
||||||
|
@ -133,6 +128,10 @@ fragment float4 ps_interlace4(ConvertShaderData data [[stage_in]], ConvertPSRes
|
||||||
p_t3 = iptr;
|
p_t3 = iptr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
p_t0 = iptr;
|
||||||
|
p_t1 = iptr + bofs;
|
||||||
|
p_t2 = iptr + bofs;
|
||||||
|
p_t3 = iptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue