From 6e9beddb85a3a62284a633e97f3dbd2714924421 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 18 Jun 2015 19:01:25 -0400
Subject: [PATCH] P4 to Git Change 1163104 by gandryey@gera-w8 on 2015/06/18
18:55:01
ECR #304775 - Mipmaps support
- Revert unnecessary changes in gpuresource.cpp.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#221 edit
[ROCm/clr commit: 76b0dcb1406b38fb28299313134833ec1772d9ef]
---
.../rocclr/runtime/device/gpu/gpuresource.cpp | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp
index d7a26eb150..0a197a615d 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp
@@ -1661,13 +1661,6 @@ Resource::mapLayers(VirtualGPU* gpu, CALuint flags)
}
dstOffs = startLayer_ * cal()->slice_ * elementSize();
- uint32_t viewFlags = CAL_RESALLOCSLICEVIEW_LEVEL_AND_LAYER;
- if ((cal()->type_ == ImageView) && viewOwner_->mipMapped() &&
- (cal()->dimension_ == GSL_MOA_TEXTURE_2D)) {
- // GSL ignores the base surface dimensions if extra flags
- // are specified
- viewFlags = 0;
- }
// Loop through all layers
for (uint i = startLayer_; i < layers; ++i) {
@@ -1688,7 +1681,7 @@ Resource::mapLayers(VirtualGPU* gpu, CALuint flags)
sliceResource = dev().resAllocView(
gslResource(), gslSize,
calOffset, cal()->format_, cal()->channelOrder_, gslDim,
- 0, i, viewFlags);
+ 0, i, CAL_RESALLOCSLICEVIEW_LEVEL_AND_LAYER);
if (0 == sliceResource) {
LogError("Map layer. resAllocSliceView failed!");
return NULL;
@@ -1778,14 +1771,6 @@ Resource::unmapLayers(VirtualGPU* gpu)
srcOffs = startLayer_ * cal()->slice_ * elementSize();
- uint32_t viewFlags = CAL_RESALLOCSLICEVIEW_LEVEL_AND_LAYER;
- if ((cal()->type_ == ImageView) && viewOwner_->mipMapped() &&
- (cal()->dimension_ == GSL_MOA_TEXTURE_2D)) {
- // GSL ignores the base surface dimensions if extra flags
- // are specified
- viewFlags = 0;
- }
-
// Check if map is write only
if (!(mapFlags_ == GSL_MAP_READ_ONLY)) {
// Loop through all layers
@@ -1807,7 +1792,7 @@ Resource::unmapLayers(VirtualGPU* gpu)
sliceResource = dev().resAllocView(
gslResource(), gslSize,
calOffset, cal()->format_, cal()->channelOrder_, gslDim,
- 0, i, viewFlags);
+ 0, i, CAL_RESALLOCSLICEVIEW_LEVEL_AND_LAYER);
if (0 == sliceResource) {
LogError("Unmap layer. resAllocSliceView failed!");
return;