SWDEV-236178 - Store texture reference metadata for dynamically loaded modules.

Change-Id: I99ecc80da7e29c691341a01a09e4532972f1e3e5
This commit is contained in:
kjayapra-amd
2020-06-11 17:17:29 -04:00
committed by Karthik Jayaprakash
parent 0dd6123998
commit 173bb2af6e
4 changed files with 56 additions and 9 deletions
+3 -1
View File
@@ -533,7 +533,7 @@ hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const
}
/* Get address and size for the global symbol */
if (!PlatformState::instance().getDynTexRef(name, hmod, texRef)) {
if (hipSuccess != PlatformState::instance().getDynTexRef(name, hmod, texRef)) {
DevLogPrintfError("Cannot get texRef for name: %s at module:0x%x \n",
name, hmod);
HIP_RETURN(hipErrorNotFound);
@@ -543,5 +543,7 @@ hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const
// have the default read mode set to normalized float.
(*texRef)->readMode = hipReadModeNormalizedFloat;
PlatformState::instance().registerTexRef(*texRef, hmod, std::string(name));
HIP_RETURN(hipSuccess);
}