softgpu: Cache minz/maxz in draw pixel state.

This commit is contained in:
Unknown W. Brackets committed 2022-01-15 13:03:10 -08:00
1 parent 0b3f096c01
commit f1ce2e7715
6 files changed
+48 -39

No files matched your search

+1 -1
View File
@@ -384,7 +384,7 @@ void SOFTRAST_CALL DrawSinglePixel(int x, int y, int z, int fog, Vec4IntArg colo
Vec4<int> prim_color = Vec4<int>(color_in).Clamp(0, 255);
// Depth range test - applied in clear mode, if not through mode.
if (pixelID.applyDepthRange)
if (z < gstate.getDepthRangeMin() || z > gstate.getDepthRangeMax())
if (z < pixelID.cached.minz || z > pixelID.cached.maxz)
return;
if (pixelID.AlphaTestFunc() != GE_COMP_ALWAYS && !clearMode)