Updated memory barriers to include staging buffers
This commit is contained in:
parent
1d1018fa0c
commit
263f392cbb
7 changed files with 230 additions and 175 deletions
|
|
@ -30,8 +30,14 @@ OpTensorSyncLocal::record(const vk::CommandBuffer& commandBuffer)
|
|||
|
||||
for (size_t i = 0; i < this->mTensors.size(); i++) {
|
||||
if (this->mTensors[i]->tensorType() == Tensor::TensorTypes::eDevice) {
|
||||
this->mTensors[i]->recordCopyFromDeviceToStaging(commandBuffer,
|
||||
true);
|
||||
|
||||
this->mTensors[i]->recordCopyFromDeviceToStaging(commandBuffer);
|
||||
|
||||
this->mTensors[i]->recordStagingBufferMemoryBarrier(commandBuffer,
|
||||
vk::AccessFlagBits::eTransferWrite,
|
||||
vk::AccessFlagBits::eHostRead,
|
||||
vk::PipelineStageFlagBits::eTransfer,
|
||||
vk::PipelineStageFlagBits::eHost);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue