mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-15 23:09:09 +00:00
rsx: Implement ZPASS results scaling for precise stats
This commit is contained in:
parent
472efc08eb
commit
53457262d4
1 changed files with 11 additions and 2 deletions
|
@ -3374,12 +3374,21 @@ namespace rsx
|
||||||
{
|
{
|
||||||
ensure(sink);
|
ensure(sink);
|
||||||
|
|
||||||
|
auto scale_result = [](u32 value)
|
||||||
|
{
|
||||||
|
const auto scale = rsx::get_resolution_scale_percent();
|
||||||
|
const auto result = static_cast<u64>(value * 10000) / (scale * scale);
|
||||||
|
return std::max<u32>(1u, result);
|
||||||
|
};
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case CELL_GCM_ZPASS_PIXEL_CNT:
|
case CELL_GCM_ZPASS_PIXEL_CNT:
|
||||||
if (!g_cfg.video.precise_zpass_count)
|
if (value)
|
||||||
{
|
{
|
||||||
value = value ? u16{ umax } : 0;
|
value = (g_cfg.video.precise_zpass_count) ?
|
||||||
|
scale_result(value) :
|
||||||
|
u16{ umax };
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CELL_GCM_ZCULL_STATS3:
|
case CELL_GCM_ZCULL_STATS3:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue