| 68 | } |
| 69 | |
| 70 | void CopyContext::submit(bool wait) |
| 71 | { |
| 72 | if (mCommandsPending) |
| 73 | { |
| 74 | mpLowLevelData->submitCommandBuffer(); |
| 75 | mCommandsPending = false; |
| 76 | } |
| 77 | else |
| 78 | { |
| 79 | // We need to signal even if there are no commands to execute. We need this because some resources may have been released since the |
| 80 | // last flush(), and unless we signal they will not be released |
| 81 | signal(mpLowLevelData->getFence().get()); |
| 82 | } |
| 83 | |
| 84 | bindDescriptorHeaps(); |
| 85 | |
| 86 | if (wait) |
| 87 | { |
| 88 | mpLowLevelData->getFence()->wait(); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | uint64_t CopyContext::signal(Fence* pFence, uint64_t value) |
| 93 | { |