From 6ec4eb34f4eee5239004214cff16b449fd07d100 Mon Sep 17 00:00:00 2001 From: Karthik Jayaprakash Date: Tue, 18 Feb 2020 11:20:50 -0500 Subject: [PATCH] SWDEV-223394 - Pass module info from hipModuleGetTexRef to internal Platformstate:: functions. Change-Id: I7d1ba3f940f595c3fca74a57fa20f484c52d4741 --- vdi/hip_internal.hpp | 2 +- vdi/hip_module.cpp | 2 +- vdi/hip_platform.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 vdi/hip_internal.hpp mode change 100644 => 100755 vdi/hip_module.cpp mode change 100644 => 100755 vdi/hip_platform.cpp diff --git a/vdi/hip_internal.hpp b/vdi/hip_internal.hpp old mode 100644 new mode 100755 index 377d5bef9d..5645c88f59 --- a/vdi/hip_internal.hpp +++ b/vdi/hip_internal.hpp @@ -197,7 +197,7 @@ public: bool getFuncAttr(const void* hostFunction, hipFuncAttributes* func_attr); bool getGlobalVar(const void* hostVar, int deviceId, hipModule_t hmod, hipDeviceptr_t* dev_ptr, size_t* size_ptr); - bool getTexRef(const char* hostVar, textureReference** texRef); + bool getTexRef(const char* hostVar, hipModule_t hmod, textureReference** texRef); bool getShadowVarInfo(std::string var_name, hipModule_t hmod, void** var_addr, size_t* var_size); diff --git a/vdi/hip_module.cpp b/vdi/hip_module.cpp old mode 100644 new mode 100755 index 4a52b7d7df..9708955f33 --- a/vdi/hip_module.cpp +++ b/vdi/hip_module.cpp @@ -520,7 +520,7 @@ hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const } /* Get address and size for the global symbol */ - if (!PlatformState::instance().getTexRef(name, texRef)) { + if (!PlatformState::instance().getTexRef(name, hmod, texRef)) { HIP_RETURN(hipErrorNotFound); } diff --git a/vdi/hip_platform.cpp b/vdi/hip_platform.cpp old mode 100644 new mode 100755 index 11a5c043c6..0c6f281d15 --- a/vdi/hip_platform.cpp +++ b/vdi/hip_platform.cpp @@ -351,9 +351,9 @@ bool PlatformState::getFuncAttr(const void* hostFunction, return true; } -bool PlatformState::getTexRef(const char* hostVar, textureReference** texRef) { +bool PlatformState::getTexRef(const char* hostVar, hipModule_t hmod, textureReference** texRef) { amd::ScopedLock lock(lock_); - DeviceVar* dvar = findVar(std::string(hostVar), ihipGetDevice(), nullptr); + DeviceVar* dvar = findVar(std::string(hostVar), ihipGetDevice(), hmod); if (dvar == nullptr) { return false; }