From 2d7ca4fb396b029787dfab3fa0086479ef88fc6c Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Mon, 3 Nov 2025 12:06:59 +0900 Subject: [PATCH] [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. --- src/xenia/gpu/draw_util.cc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/xenia/gpu/draw_util.cc b/src/xenia/gpu/draw_util.cc index 0e5805f49..54bf697b8 100644 --- a/src/xenia/gpu/draw_util.cc +++ b/src/xenia/gpu/draw_util.cc @@ -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 =