[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:
@@ -966,10 +966,13 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
|
|||||||
? 0.5f
|
? 0.5f
|
||||||
: 0.0f;
|
: 0.0f;
|
||||||
int32_t vertices_fixed[6];
|
int32_t vertices_fixed[6];
|
||||||
|
float vertices_swapped[6];
|
||||||
for (size_t i = 0; i < xe::countof(vertices_fixed); ++i) {
|
for (size_t i = 0; i < xe::countof(vertices_fixed); ++i) {
|
||||||
vertices_fixed[i] = ui::FloatToD3D11Fixed16p8(
|
vertices_swapped[i] = xenos::GpuSwap(vertices_guest[i], fetch.endian);
|
||||||
xenos::GpuSwap(vertices_guest[i], fetch.endian) + half_pixel_offset);
|
vertices_fixed[i] =
|
||||||
|
ui::FloatToD3D11Fixed16p8(vertices_swapped[i] + half_pixel_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inclusive.
|
// Inclusive.
|
||||||
int32_t x0 = std::min(std::min(vertices_fixed[0], vertices_fixed[2]),
|
int32_t x0 = std::min(std::min(vertices_fixed[0], vertices_fixed[2]),
|
||||||
vertices_fixed[4]);
|
vertices_fixed[4]);
|
||||||
@@ -1054,12 +1057,15 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory,
|
|||||||
xenos::kMaxResolveSize);
|
xenos::kMaxResolveSize);
|
||||||
y1 = y0 + int32_t(xenos::kMaxResolveSize);
|
y1 = y0 + int32_t(xenos::kMaxResolveSize);
|
||||||
}
|
}
|
||||||
// fails in forza horizon 1
|
// If the region is empty or inverted after clipping (e.g., entirely outside
|
||||||
// x0 is 0, x1 is 0x100, y0 is 0x100, y1 is 0x100
|
// EDRAM bounds due to window offset), treat as a no-op rather than an error.
|
||||||
assert_true(x0 <= x1 && y0 <= y1);
|
// 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) {
|
if (x0 >= x1 || y0 >= y1) {
|
||||||
XELOGE("Resolve region is empty");
|
info_out.coordinate_info.width_div_8 = 0;
|
||||||
return false;
|
info_out.height_div_8 = 0;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
info_out.coordinate_info.width_div_8 =
|
info_out.coordinate_info.width_div_8 =
|
||||||
|
|||||||
Reference in New Issue
Block a user