Files
compute-runtime/unit_tests/mem_obj/buffer_tests.cpp
Michal Mrozek 04b4198228 Use castToUint64 while casting form void* to uint64_t.
- Otherwise the uint64_t GPU address may not be proper
- The sign bit is propagated while reinterpret_cast is happening
causing wrong address to be generated.

i.e. in 32 bit application:
void* address = 0xffff0000;
unit64_t gpuAddress = reinterpret_cast<uint64_t>(address);

gpuAddress is equal to 0xffffffffffff0000 instead of 0x00000000ffff0000.

Change-Id: I36665651d615c3ab612b2cea375fa539edc7d08d
2019-12-02 12:50:33 +01:00

107 KiB