| 27 | } |
| 28 | |
| 29 | void |
| 30 | OpMemoryBarrier::record(const vk::CommandBuffer& commandBuffer) |
| 31 | { |
| 32 | KP_LOG_DEBUG("Kompute OpMemoryBarrier record called"); |
| 33 | |
| 34 | // Barrier to ensure the data is finished writing to buffer memory |
| 35 | if (this->mBarrierOnPrimary) { |
| 36 | for (const std::shared_ptr<Tensor>& tensor : this->mTensors) { |
| 37 | tensor->recordPrimaryBufferMemoryBarrier(commandBuffer, |
| 38 | this->mSrcAccessMask, |
| 39 | this->mDstAccessMask, |
| 40 | this->mSrcStageMask, |
| 41 | this->mDstStageMask); |
| 42 | } |
| 43 | } else { |
| 44 | for (const std::shared_ptr<Tensor>& tensor : this->mTensors) { |
| 45 | tensor->recordStagingBufferMemoryBarrier(commandBuffer, |
| 46 | this->mSrcAccessMask, |
| 47 | this->mDstAccessMask, |
| 48 | this->mSrcStageMask, |
| 49 | this->mDstStageMask); |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | void |
| 55 | OpMemoryBarrier::preEval(const vk::CommandBuffer& /*commandBuffer*/) |
nothing calls this directly
no test coverage detected