From bf668d922ceb219e73fa4dadfabb78ba7fdc4a01 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 27 Sep 2019 16:44:50 -0400
Subject: [PATCH] P4 to Git Change 2005731 by vsytchen@vsytchen-hip-win10 on
2019/09/27 16:34:38
SWDEV-192384 - [HIP CQE][HIPonPAL][19.40] hipBindTexRef1DFetch, hipTextureRef2D are failed on all ASICs for both Win/Lnx
1. Correctly set the image type for textures created from arrays.
2. Allow creating any kind of image from a buffer.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/18051/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#166 edit
---
rocclr/runtime/device/pal/paldevice.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp
index 8e588ea17c..772bc569c0 100644
--- a/rocclr/runtime/device/pal/paldevice.cpp
+++ b/rocclr/runtime/device/pal/paldevice.cpp
@@ -1659,9 +1659,8 @@ pal::Memory* Device::createImage(amd::Memory& owner, bool directAccess) const {
// Create resource
if (nullptr != gpuImage) {
const bool imageBuffer =
- ((owner.getType() == CL_MEM_OBJECT_IMAGE1D_BUFFER) ||
- ((owner.getType() == CL_MEM_OBJECT_IMAGE2D) && (owner.parent() != nullptr) &&
- (owner.parent()->asBuffer() != nullptr)));
+ ((owner.parent() != nullptr) &&
+ (owner.parent()->asBuffer() != nullptr));
bool result = false;
// Check if owner is interop memory