- proper maintenance of the depth bias state.

Change state must be combined, not overwritten, or it may miss some needed state changes.
This commit is contained in:
Christoph Oelckers 2022-01-13 00:59:17 +01:00
parent fcf04a7df1
commit 049fc5fb7c

View file

@ -585,7 +585,7 @@ public:
void SetDepthBias(float a, float b)
{
mBias.mChanged = mBias.mFactor != a || mBias.mUnits != b;
mBias.mChanged |= mBias.mFactor != a || mBias.mUnits != b;
mBias.mFactor = a;
mBias.mUnits = b;
}
@ -597,7 +597,7 @@ public:
void ClearDepthBias()
{
mBias.mChanged = mBias.mFactor != 0 || mBias.mUnits != 0;
mBias.mChanged |= mBias.mFactor != 0 || mBias.mUnits != 0;
mBias.mFactor = 0;
mBias.mUnits = 0;
}