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 =