| 84 | } |
| 85 | |
| 86 | void PixelDebug::endFrame(RenderContext* pRenderContext) |
| 87 | { |
| 88 | FALCOR_CHECK(mRunning, "Logging is not running, did you forget to call beginFrame()?"); |
| 89 | |
| 90 | mRunning = false; |
| 91 | |
| 92 | if (mEnabled) |
| 93 | { |
| 94 | // Copy logged data to staging buffers. |
| 95 | uint32_t dst = 0; |
| 96 | pRenderContext->copyBufferRegion(mpReadbackBuffer.get(), dst, mpCounterBuffer.get(), 0, mpCounterBuffer->getSize()); |
| 97 | dst += mpCounterBuffer->getSize(); |
| 98 | pRenderContext->copyBufferRegion(mpReadbackBuffer.get(), dst, mpPrintBuffer.get(), 0, mpPrintBuffer->getSize()); |
| 99 | dst += mpPrintBuffer->getSize(); |
| 100 | pRenderContext->copyBufferRegion(mpReadbackBuffer.get(), dst, mpAssertBuffer.get(), 0, mpAssertBuffer->getSize()); |
| 101 | dst += mpAssertBuffer->getSize(); |
| 102 | FALCOR_ASSERT(dst == mpReadbackBuffer->getSize()); |
| 103 | |
| 104 | // Create fence first time we need it. |
| 105 | if (!mpFence) |
| 106 | mpFence = mpDevice->createFence(); |
| 107 | |
| 108 | // Submit command list and insert signal. |
| 109 | pRenderContext->submit(false); |
| 110 | pRenderContext->signal(mpFence.get()); |
| 111 | |
| 112 | mWaitingForData = true; |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | void PixelDebug::prepareProgram(const ref<Program>& pProgram, const ShaderVar& var) |
| 117 | { |
nothing calls this directly
no test coverage detected