mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:00:44 +02:00
Update prioritization of memory pressure states
This commit is contained in:
parent
f15a34e145
commit
f509403b25
1 changed files with 5 additions and 4 deletions
|
@ -458,12 +458,12 @@ void GLVariableAllocationSupport::updateMemoryPressure() {
|
||||||
float pressure = (float)totalVariableMemoryAllocation / (float)allowedMemoryAllocation;
|
float pressure = (float)totalVariableMemoryAllocation / (float)allowedMemoryAllocation;
|
||||||
|
|
||||||
auto newState = MemoryPressureState::Idle;
|
auto newState = MemoryPressureState::Idle;
|
||||||
if (hasTransfers) {
|
if (pressure < UNDERSUBSCRIBED_PRESSURE_VALUE && (unallocated != 0 && canPromote)) {
|
||||||
newState = MemoryPressureState::Transfer;
|
newState = MemoryPressureState::Undersubscribed;
|
||||||
} else if (pressure > OVERSUBSCRIBED_PRESSURE_VALUE && canDemote) {
|
} else if (pressure > OVERSUBSCRIBED_PRESSURE_VALUE && canDemote) {
|
||||||
newState = MemoryPressureState::Oversubscribed;
|
newState = MemoryPressureState::Oversubscribed;
|
||||||
} else if (pressure < UNDERSUBSCRIBED_PRESSURE_VALUE && (unallocated != 0 && canPromote)) {
|
} else if (hasTransfers) {
|
||||||
newState = MemoryPressureState::Undersubscribed;
|
newState = MemoryPressureState::Transfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newState != _memoryPressureState) {
|
if (newState != _memoryPressureState) {
|
||||||
|
@ -539,6 +539,7 @@ void GLVariableAllocationSupport::processWorkQueues() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (workQueue.empty()) {
|
if (workQueue.empty()) {
|
||||||
|
_memoryPressureState = MemoryPressureState::Idle;
|
||||||
_memoryPressureStateStale = true;
|
_memoryPressureStateStale = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue