Vulkan: Use correct texture clear in LatteDraw_handleSpecialState8_clearAsDepth (#321)

This commit is contained in:
Tillsunset 2022-10-02 12:18:35 -05:00 committed by GitHub
parent 11f6e2b7ee
commit fb5ecca157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -580,7 +580,10 @@ void LatteDraw_handleSpecialState8_clearAsDepth()
}
else
{
g_renderer->texture_clearColorSlice(view->baseTexture, sliceIndex + view->firstSlice, mipIndex + view->firstMip, clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
if (view->baseTexture->isDepth)
g_renderer->texture_clearDepthSlice(view->baseTexture, sliceIndex + view->firstSlice, mipIndex + view->firstMip, true, view->baseTexture->hasStencil, 0.0f, 0);
else
g_renderer->texture_clearColorSlice(view->baseTexture, sliceIndex + view->firstSlice, mipIndex + view->firstMip, clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
}
}
}