Image / Buffer refactor.

- do not use redescribe flag for image/buffer from other image/buffer.
- use redescribe flag only when image is redescribed via redescribe interface
- remove image specific functions from mem object
- remove redundant fields
- add new implementation of isImageFromBuffer/isImageFromImage basing
on associated mem object.
- pass associated mem object to redescrbed images.
- remove redundant setters

Change-Id: I267637a48fbc2afdad9a9f5e5e9ccd6bd0c09972
This commit is contained in:
Mrozek, Michal
2018-12-19 20:15:32 +01:00
parent c17d0d11d0
commit b99cf6c3ff
10 changed files with 31 additions and 47 deletions

View File

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