mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 02:33:43 +01:00
GPU: Avoid clears for non-simple depth values.
Some drivers don't round depth the same way for a clear vs for drawing, which can cause mismatches. We only do this if we see equals-style depth comparison funcs used in drawing.
This commit is contained in:
1 parent
818849c4b9
commit
3333f2a5aa
9 files changed
+38
No files matched your search
@@ -404,6 +404,10 @@ void DrawEngineGLES::DoFlush() {
|
||||
swTransform.BuildDrawingParams(prim, vertexCount, dec_->VertexType(), inds, maxIndex, &result);
|
||||
if (result.setSafeSize)
|
||||
framebufferManager_->SetSafeSize(result.safeWidth, result.safeHeight);
|
||||
// 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_CLEAR && everUsedEqualDepth_ && gstate.isClearModeDepthMask() && result.depth > 0.0f && result.depth < 1.0f)
|
||||
result.action = SW_DRAW_PRIMITIVES;
|
||||
|
||||
ApplyDrawStateLate(result.setStencil, result.stencilValue);
|
||||
|
||||
|
||||
Reference in new issue
Block a user