Skip to content

Commit

Permalink
rsx: Properly calculate vertex range when divisor is active
Browse files Browse the repository at this point in the history
- The upper bound is to be rounded up, not down.
  • Loading branch information
kd-11 committed Mar 22, 2020
1 parent 01cafc0 commit 12044bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rpcs3/Emu/RSX/RSXThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ namespace rsx
{
if (max_index >= attrib.frequency)
{
// Actually uses the modulo operator, cannot safely optimize
// Actually uses the modulo operator
_min_index = 0;
_max_index = std::max<u32>(_max_index, attrib.frequency - 1);
_max_index = attrib.frequency - 1;
}
else
{
Expand All @@ -219,7 +219,7 @@ namespace rsx
{
// Division operator
_min_index = std::min(_min_index, first / attrib.frequency);
_max_index = std::max<u32>(_max_index, max_index / attrib.frequency);
_max_index = std::max<u32>(_max_index, aligned_div(max_index, attrib.frequency));
}
}
}
Expand Down

0 comments on commit 12044bd

Please sign in to comment.