[GPU] Remove log spam for empty region resolve issues.

Affects Forza Horizon 1 and 2, does not seem to be related to any
actual rendering issues but makes it very difficult to debug real
problems.
This commit is contained in:
Herman S.
2025-11-03 12:06:59 +09:00
parent 1e23aaf4fc
commit 2d7ca4fb39

View File

@@ -966,10 +966,13 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
? 0.5f
: 0.0f;
int32_t vertices_fixed[6];
float vertices_swapped[6];
for (size_t i = 0; i < xe::countof(vertices_fixed); ++i) {
vertices_fixed[i] = ui::FloatToD3D11Fixed16p8(
xenos::GpuSwap(vertices_guest[i], fetch.endian) + half_pixel_offset);
vertices_swapped[i] = xenos::GpuSwap(vertices_guest[i], fetch.endian);
vertices_fixed[i] =
ui::FloatToD3D11Fixed16p8(vertices_swapped[i] + half_pixel_offset);
}
// Inclusive.
int32_t x0 = std::min(std::min(vertices_fixed[0], vertices_fixed[2]),
vertices_fixed[4]);
@@ -1054,12 +1057,15 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
xenos::kMaxResolveSize);
y1 = y0 + int32_t(xenos::kMaxResolveSize);
}
// fails in forza horizon 1
// x0 is 0, x1 is 0x100, y0 is 0x100, y1 is 0x100
assert_true(x0 <= x1 && y0 <= y1);
// If the region is empty or inverted after clipping (e.g., entirely outside
// EDRAM bounds due to window offset), treat as a no-op rather than an error.
// The caller checks width/height and skips the resolve.
// Reduces log spam in Forza Horizon 1/2 which seem to do a lot of these
// resolves without any visible impact on rendering.
if (x0 >= x1 || y0 >= y1) {
XELOGE("Resolve region is empty");
return false;
info_out.coordinate_info.width_div_8 = 0;
info_out.height_div_8 = 0;
return true;
}
info_out.coordinate_info.width_div_8 =