From fc3e7e321cdadf7c83209f323898e91bf72e0107 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 7 Apr 2015 18:11:02 -0400
Subject: [PATCH] P4 to Git Change 1138124 by gandryey@gera-w8 on 2015/04/07
14:31:02
ECR #304775 - Mimmaps support. Fix HostBltiEngine path
- Use view gsl map/unmap path for a mipmap view
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#213 edit
---
rocclr/runtime/device/gpu/gpuresource.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpuresource.cpp b/rocclr/runtime/device/gpu/gpuresource.cpp
index dc1f767910..9ac61792d7 100644
--- a/rocclr/runtime/device/gpu/gpuresource.cpp
+++ b/rocclr/runtime/device/gpu/gpuresource.cpp
@@ -1582,7 +1582,8 @@ Resource::map(VirtualGPU* gpu, uint flags, uint startLayer, uint numLayers)
// Check if memory wasn't mapped yet
if (++mapCount_ == 1) {
- if ((cal()->dimSize_ == 3) || cal()->imageArray_) {
+ if ((cal()->dimSize_ == 3) || cal()->imageArray_ ||
+ ((cal()->type_ == ImageView) && (viewOwner_->cal()->mipLevels_ > 1))) {
// Save map info for multilayer map/unmap
startLayer_ = startLayer;
numLayers_ = numLayers;
@@ -1712,7 +1713,8 @@ Resource::unmap(VirtualGPU* gpu)
// Check if it's the last unmap
if (count == 0) {
- if ((cal()->dimSize_ == 3) || cal()->imageArray_) {
+ if ((cal()->dimSize_ == 3) || cal()->imageArray_ ||
+ ((cal()->type_ == ImageView) && (viewOwner_->cal()->mipLevels_ > 1))) {
// Unmap layers
unmapLayers(gpu);
}