我发现在Microsoft示例示例中:
void D3D12HelloTriangle::OnRender()
{
// Record all the commands we need to render the scene into the command list.
PopulateCommandList();
// Execute the command list.
ID3D12CommandList* ppCommandLists[] = { m_commandList.Get() };
m_commandQueue->ExecuteCommandLists(_countof(ppCommandLists), ppCommandLists);
// Present the frame.
ThrowIfFailed(m_swapChain->Present(1, 0));
WaitForPreviousFrame();
}实际上是如何工作的?ExecuteCommandLists是一个异步函数调用,因此它意味着代码执行将继续,并击中当前函数。
打完电话后会发生什么?比方说,GPU仍然在绘图,工作和现在被称为。现在是同步电话吗?当gpu仍在绘图时,它不能显示缓冲区。是这样吗?有人能解释一下这里发生了什么吗?
发布于 2015-10-29 22:24:46
现在还有一个异步命令,它告诉GPU从交换链中的下一个缓冲区开始扫描(显示)。您不必担心GPU在“翻转”发生之前还没有完成所有以前发布的工作(在图形命令队列上)。
https://stackoverflow.com/questions/33416715
复制相似问题