GPU/SW: Remove polygon size checks from backend

It's already checked before the draw is handed off.
This commit is contained in:
Stenzek 2024-12-30 16:52:08 +10:00
parent 4d4523dc04
commit 3c5db39ee4
No known key found for this signature in database

View File

@ -1399,13 +1399,8 @@ static void DrawTriangle(const GPUBackendDrawCommand* RESTRICT cmd,
tl = tl >> 1; tl = tl >> 1;
// Invalid size early culling. // Invalid size early culling.
if (static_cast<u32>(std::abs(v2->x - v0->x)) >= MAX_PRIMITIVE_WIDTH || if (v0->y == v2->y)
static_cast<u32>(std::abs(v2->x - v1->x)) >= MAX_PRIMITIVE_WIDTH ||
static_cast<u32>(std::abs(v1->x - v0->x)) >= MAX_PRIMITIVE_WIDTH ||
static_cast<u32>(v2->y - v0->y) >= MAX_PRIMITIVE_HEIGHT || v0->y == v2->y)
{
return; return;
}
// Same as line rasterization, use higher precision for position. // Same as line rasterization, use higher precision for position.
static constexpr auto makefp_xy = [](s32 x) { return (static_cast<s64>(x) << 32) + ((1LL << 32) - (1 << 11)); }; static constexpr auto makefp_xy = [](s32 x) { return (static_cast<s64>(x) << 32) + ((1LL << 32) - (1 << 11)); };