Merge "Start the lifetime of the texture reference" into amd-master-next
Этот коммит содержится в:
@@ -528,6 +528,10 @@ hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const
|
|||||||
HIP_RETURN(hipErrorNotFound);
|
HIP_RETURN(hipErrorNotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Texture references created by HIP driver API
|
||||||
|
// have the default read mode set to normalized float.
|
||||||
|
(*texRef)->readMode = hipReadModeNormalizedFloat;
|
||||||
|
|
||||||
HIP_RETURN(hipSuccess);
|
HIP_RETURN(hipSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -361,7 +361,8 @@ bool PlatformState::getTexRef(const char* hostVar, hipModule_t hmod, textureRefe
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*texRef = reinterpret_cast<textureReference *>(dvar->shadowVptr);
|
*texRef = new (dvar->shadowVptr) texture<char>{};
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user