From 3c5db39ee4fe6a7a3e07448de11a633a8e9a3b33 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 30 Dec 2024 16:52:08 +1000 Subject: [PATCH] GPU/SW: Remove polygon size checks from backend It's already checked before the draw is handed off. --- src/core/gpu_sw_rasterizer.inl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/core/gpu_sw_rasterizer.inl b/src/core/gpu_sw_rasterizer.inl index 21017d957..9ad5ff02c 100644 --- a/src/core/gpu_sw_rasterizer.inl +++ b/src/core/gpu_sw_rasterizer.inl @@ -1399,13 +1399,8 @@ static void DrawTriangle(const GPUBackendDrawCommand* RESTRICT cmd, tl = tl >> 1; // Invalid size early culling. - if (static_cast(std::abs(v2->x - v0->x)) >= MAX_PRIMITIVE_WIDTH || - static_cast(std::abs(v2->x - v1->x)) >= MAX_PRIMITIVE_WIDTH || - static_cast(std::abs(v1->x - v0->x)) >= MAX_PRIMITIVE_WIDTH || - static_cast(v2->y - v0->y) >= MAX_PRIMITIVE_HEIGHT || v0->y == v2->y) - { + if (v0->y == v2->y) return; - } // Same as line rasterization, use higher precision for position. static constexpr auto makefp_xy = [](s32 x) { return (static_cast(x) << 32) + ((1LL << 32) - (1 << 11)); };