Improve GraphicsAllocation reuse management

Change-Id: Iee14b4641712231c801676b758546be76deef636
This commit is contained in:
Dunajski, Bartosz
2018-03-05 10:56:34 +01:00
parent 1fce275542
commit f6a8cb3279
3 changed files with 20 additions and 23 deletions

View File

@@ -70,7 +70,7 @@ MemObj::~MemObj() {
if (peekSharingHandler()) {
peekSharingHandler()->releaseReusedGraphicsAllocation();
}
if (graphicsAllocation && !associatedMemObject && !isObjectRedescribed && !isHostPtrSVM && graphicsAllocation->reuseCount == 0) {
if (graphicsAllocation && !associatedMemObject && !isObjectRedescribed && !isHostPtrSVM && graphicsAllocation->peekReuseCount() == 0) {
bool doAsyncDestrucions = DebugManager.flags.EnableAsyncDestroyAllocations.get();
if (!doAsyncDestrucions) {
needWait = true;