softgpu: Fix reversed stencil test funcs.

LESS applies to the ref compared to the stencil, not the stencil compared
to the ref.

With this, stencil testing is finally being done properly in Star Ocean.
This commit is contained in:
Unknown W. Brackets 2013-11-10 03:13:19 -08:00
parent 2db98b8669
commit 1311d71455

View File

@ -410,22 +410,22 @@ static inline bool StencilTestPassed(u8 stencil)
return true;
case GE_COMP_EQUAL:
return (stencil == ref);
return ref == stencil;
case GE_COMP_NOTEQUAL:
return (stencil != ref);
return ref != stencil;
case GE_COMP_LESS:
return (stencil < ref);
return ref < stencil;
case GE_COMP_LEQUAL:
return (stencil <= ref);
return ref <= stencil;
case GE_COMP_GREATER:
return (stencil > ref);
return ref > stencil;
case GE_COMP_GEQUAL:
return (stencil >= ref);
return ref >= stencil;
}
return true;
}