SWDEV-299966 - Fix hipModuleGetTexRef
hipModuleGetTexRef() returns success for any global device variable name even if it's not a texture. This is wrong thus will fail "hipModuleTexture2dDrv --tests 0x14" This patch will compare the size to overcome this issue somehow. Change-Id: I4a4d96f947a68713036437ee525359ff412fefe2
Этот коммит содержится в:
@@ -875,6 +875,10 @@ hipError_t PlatformState::getDynTexRef(const char* hostVar, hipModule_t hmod, te
|
||||
hip::DeviceVar* dvar = nullptr;
|
||||
IHIP_RETURN_ONFAIL(it->second->getDeviceVar(&dvar, hostVar));
|
||||
|
||||
if (dvar->size() != sizeof(textureReference)) {
|
||||
return hipErrorNotFound; // Any better way to verify texture type?
|
||||
}
|
||||
|
||||
dvar->shadowVptr = new texture<char>();
|
||||
*texRef = reinterpret_cast<textureReference*>(dvar->shadowVptr);
|
||||
return hipSuccess;
|
||||
|
||||
Ссылка в новой задаче
Block a user