From 5a2ad708ea694297509e89b6bf1149facf7f07bd Mon Sep 17 00:00:00 2001 From: Michael LIAO Date: Thu, 23 Apr 2020 23:05:28 -0400 Subject: [PATCH] [vdi] Fix texture reference sample. - The driver code should not re-define `tex` again as it's already defined in the kernel code. Eventually, the driver code should be as regular C++ code instad of HIP code. Change-Id: I8c7cab204b98990619d6e7109b990d7089ea9261 [ROCm/hip commit: 74ba25602bc7422c23e529093046df627c4f6e73] --- .../hip/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100755 => 100644 projects/hip/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp diff --git a/projects/hip/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp b/projects/hip/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp old mode 100755 new mode 100644 index b42ac86ad1..01729222ee --- a/projects/hip/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp +++ b/projects/hip/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp @@ -27,7 +27,6 @@ THE SOFTWARE. #define fileName "tex2dKernel.code" -texture tex; bool testResult = true; #define HIP_CHECK(cmd) \ @@ -122,7 +121,7 @@ bool runTest(int argc, char** argv) { } } } - HIP_CHECK(hipUnbindTexture(tex)); + HIP_CHECK(hipUnbindTexture(texref)); HIP_CHECK(hipFree(dData)); HIP_CHECK(hipFreeArray(array)); return testResult;