mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
softgpu: Flush on offset changes.
This commit is contained in:
parent
d6fa301ab1
commit
9466dc6397
2 changed files with 13 additions and 1 deletions
|
@ -160,9 +160,17 @@ void BinManager::UpdateState() {
|
|||
int newMaxTasks = selfRender ? 1 : g_threadManager.GetNumLooperThreads();
|
||||
if (newMaxTasks > MAX_POSSIBLE_TASKS)
|
||||
newMaxTasks = MAX_POSSIBLE_TASKS;
|
||||
// We don't want to overlap wrong, so flush any pending.
|
||||
if (maxTasks_ != newMaxTasks) {
|
||||
maxTasks_ = newMaxTasks;
|
||||
tasksSplit_ = false;
|
||||
Flush();
|
||||
}
|
||||
|
||||
// Our bin sizes are based on offset, so if that changes we have to flush.
|
||||
if (queueOffsetX_ != gstate.getOffsetX16() || queueOffsetY_ != gstate.getOffsetY16()) {
|
||||
Flush();
|
||||
queueOffsetX_ = gstate.getOffsetX16();
|
||||
queueOffsetY_ = gstate.getOffsetY16();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,6 +333,8 @@ void BinManager::Flush() {
|
|||
queueRange_.y1 = 0x7FFFFFFF;
|
||||
queueRange_.x2 = 0;
|
||||
queueRange_.y2 = 0;
|
||||
queueOffsetX_ = -1;
|
||||
queueOffsetY_ = -1;
|
||||
}
|
||||
|
||||
inline BinCoords BinCoords::Intersect(const BinCoords &range) const {
|
||||
|
|
|
@ -178,6 +178,8 @@ private:
|
|||
BinCoords scissor_;
|
||||
BinQueue<BinItem, 1024> queue_;
|
||||
BinCoords queueRange_;
|
||||
int queueOffsetX_ = -1;
|
||||
int queueOffsetY_ = -1;
|
||||
|
||||
int maxTasks_ = 1;
|
||||
bool tasksSplit_ = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue