Use GPU pointer when programming constant/global surfaces

Related-To: NEO-3127

Change-Id: I29fd5e3f3f370c21a20f403f66c0a3604be884fd
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-06-21 10:35:05 +02:00
committed by sys_ocldev
parent be7087ec66
commit 7a3b2e583b
3 changed files with 36 additions and 28 deletions

View File

@@ -899,7 +899,7 @@ cl_int Program::parseProgramScopePatchList() {
if (globalSurface->is32BitAllocation()) {
*reinterpret_cast<uint32_t *>(pPtr) += static_cast<uint32_t>(globalSurface->getGpuAddressToPatch());
} else {
*reinterpret_cast<uintptr_t *>(pPtr) += reinterpret_cast<uintptr_t>(globalSurface->getUnderlyingBuffer());
*reinterpret_cast<uintptr_t *>(pPtr) += static_cast<uintptr_t>(globalSurface->getGpuAddressToPatch());
}
} else {
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "Program::parseProgramScopePatchList. Unhandled Data parameter: %d\n", pPatch->Token);
@@ -922,7 +922,7 @@ cl_int Program::parseProgramScopePatchList() {
if (constantSurface->is32BitAllocation()) {
*reinterpret_cast<uint32_t *>(pPtr) += static_cast<uint32_t>(constantSurface->getGpuAddressToPatch());
} else {
*reinterpret_cast<uintptr_t *>(pPtr) += reinterpret_cast<uintptr_t>(constantSurface->getUnderlyingBuffer());
*reinterpret_cast<uintptr_t *>(pPtr) += static_cast<uintptr_t>(constantSurface->getGpuAddressToPatch());
}
} else {