From 177a1cda97ea093f535e893a3ccff887533ca467 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 14 Apr 2016 19:33:16 -0400 Subject: [PATCH] P4 to Git Change 1258240 by gandryey@gera-ocl on 2016/04/14 19:21:55 SWDEV-79445 - OCL generic changes and code clean-up - Fix TC failures. Clean unmap info after runtime gets the mip Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#400 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#5 edit [ROCm/clr commit: 511fd5a36a7c4a0e5b28202edb3680e9431f9979] --- projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp | 5 +++-- projects/clr/rocclr/runtime/device/pal/palvirtual.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp index 19ba1efda9..311b8c31ff 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp @@ -1190,12 +1190,13 @@ VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand& vcmd) amd::Image* amdImage = owner->asImage(); if ((amdImage != NULL) && (amdImage->getMipLevels() > 1) && (writeMapInfo->baseMip_ != NULL)) { - // Clear unmap flags from the parent image - memory->clearUnmapInfo(vcmd.mapPtr()); // Assign mip level view amdImage = writeMapInfo->baseMip_; + // Clear unmap flags from the parent image + memory->clearUnmapInfo(vcmd.mapPtr()); memory = dev().getGpuMemory(amdImage); unmapMip = true; + writeMapInfo = memory->writeMapInfo(vcmd.mapPtr()); } // We used host memory diff --git a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp index 3da5c05333..8909c0172a 100644 --- a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp @@ -1433,12 +1433,13 @@ VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand& vcmd) amd::Image* amdImage = owner->asImage(); if ((amdImage != nullptr) && (amdImage->getMipLevels() > 1) && (writeMapInfo->baseMip_ != nullptr)) { - // Clear unmap flags from the parent image - memory->clearUnmapInfo(vcmd.mapPtr()); // Assign mip level view amdImage = writeMapInfo->baseMip_; + // Clear unmap flags from the parent image + memory->clearUnmapInfo(vcmd.mapPtr()); memory = dev().getGpuMemory(amdImage); unmapMip = true; + writeMapInfo = memory->writeMapInfo(vcmd.mapPtr()); } // We used host memory