mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 11:54:20 +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;
|
||||
|
||||
auto newState = MemoryPressureState::Idle;
|
||||
if (hasTransfers) {
|
||||
newState = MemoryPressureState::Transfer;
|
||||
if (pressure < UNDERSUBSCRIBED_PRESSURE_VALUE && (unallocated != 0 && canPromote)) {
|
||||
newState = MemoryPressureState::Undersubscribed;
|
||||
} else if (pressure > OVERSUBSCRIBED_PRESSURE_VALUE && canDemote) {
|
||||
newState = MemoryPressureState::Oversubscribed;
|
||||
} else if (pressure < UNDERSUBSCRIBED_PRESSURE_VALUE && (unallocated != 0 && canPromote)) {
|
||||
newState = MemoryPressureState::Undersubscribed;
|
||||
} else if (hasTransfers) {
|
||||
newState = MemoryPressureState::Transfer;
|
||||
}
|
||||
|
||||
if (newState != _memoryPressureState) {
|
||||
|
@ -539,6 +539,7 @@ void GLVariableAllocationSupport::processWorkQueues() {
|
|||
}
|
||||
|
||||
if (workQueue.empty()) {
|
||||
_memoryPressureState = MemoryPressureState::Idle;
|
||||
_memoryPressureStateStale = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue