From c4e4e370a9941d5139996f62dc708d2ae01cbcc4 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 13 Nov 2019 12:34:13 -0500
Subject: [PATCH] P4 to Git Change 2029899 by kjayapra@0_HIPWS_LNX1_ROCM on
2019/11/13 12:29:19
SWDEV-144570 - Implementing ihipUnbindTextureImpl API.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#35 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#33 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#27 edit
---
api/hip/hip_hcc.def.in | 1 +
api/hip/hip_hcc.map.in | 1 +
api/hip/hip_texture.cpp | 7 +++++++
3 files changed, 9 insertions(+)
diff --git a/api/hip/hip_hcc.def.in b/api/hip/hip_hcc.def.in
index a2eade8ae7..51f0bcefe1 100644
--- a/api/hip/hip_hcc.def.in
+++ b/api/hip/hip_hcc.def.in
@@ -176,6 +176,7 @@ hipBindTexture2D
hipBindTextureToArray
hipBindTextureToMipmappedArray
hipUnbindTexture
+ihipUnbindTextureImpl
hipGetChannelDesc
hipGetTextureAlignmentOffset
hipGetTextureReference
diff --git a/api/hip/hip_hcc.map.in b/api/hip/hip_hcc.map.in
index 378ec5bf80..e9cb1498e9 100644
--- a/api/hip/hip_hcc.map.in
+++ b/api/hip/hip_hcc.map.in
@@ -189,6 +189,7 @@ global:
hipBindTextureToArray*;
hipBindTextureToMipmappedArray*;
hipUnbindTexture*;
+ ihipUnbindTextureImpl*;
hipGetChannelDesc*;
hipGetTextureAlignmentOffset*;
hipGetTextureReference*;
diff --git a/api/hip/hip_texture.cpp b/api/hip/hip_texture.cpp
index 23c1566c09..d0dac5d910 100644
--- a/api/hip/hip_texture.cpp
+++ b/api/hip/hip_texture.cpp
@@ -526,6 +526,13 @@ hipError_t hipBindTextureToMipmappedArray(textureReference* tex,
HIP_RETURN(hipErrorNotSupported);
}
+hipError_t ihipUnbindTextureImpl(const hipTextureObject_t& textureObject) {
+
+ ihipDestroyTextureObject(reinterpret_cast(textureObject));
+
+ return hipSuccess;
+}
+
hipError_t hipUnbindTexture(const textureReference* tex) {
HIP_INIT_API(NONE, tex);