Merge pull request #17017 from unknownbrackets/d3d11-equal-clear

D3D11: Correct equal clear check
This commit is contained in:
Henrik Rydgård 2023-02-27 09:18:11 +01:00 committed by GitHub
commit 86c1d5711a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -634,8 +634,8 @@ rotateVBO:
swTransform.Decode(prim, dec_->VertexType(), dec_->GetDecVtxFmt(), maxIndex, &result);
// Non-zero depth clears are unusual, but some drivers don't match drawn depth values to cleared values.
// Games sometimes expect exact matches (see #12626, for example) for equal comparisons.
if (result.action == SW_NOT_READY && everUsedEqualDepth_ && gstate.isClearModeDepthMask() && result.depth > 0.0f && result.depth < 1.0f)
result.action = SW_DRAW_PRIMITIVES;
if (result.action == SW_CLEAR && everUsedEqualDepth_ && gstate.isClearModeDepthMask() && result.depth > 0.0f && result.depth < 1.0f)
result.action = SW_NOT_READY;
if (result.action == SW_NOT_READY) {
swTransform.DetectOffsetTexture(maxIndex);
}