Fully working end to end flow

This commit is contained in:
Alejandro Saucedo 2020-08-22 20:13:30 +01:00
parent 622b8c4bc7
commit 9f74679dd5
10 changed files with 57 additions and 41 deletions

View file

@ -211,6 +211,10 @@ Tensor::mapDataIntoHostMemory()
void* mapped = this->mDevice->mapMemory(
*this->mMemory, 0, bufferSize, vk::MemoryMapFlags());
memcpy(mapped, this->mData.data(), bufferSize);
this->mDevice->unmapMemory(*this->mMemory);
mapped = this->mDevice->mapMemory(
*this->mMemory, 0, bufferSize, vk::MemoryMapFlags());
vk::MappedMemoryRange mappedRange(*this->mMemory, 0, bufferSize);
this->mDevice->flushMappedMemoryRanges(1, &mappedRange);
this->mDevice->unmapMemory(*this->mMemory);