首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DirectX12 - ExecuteCommandLists与现函数

DirectX12 - ExecuteCommandLists与现函数
EN

Stack Overflow用户
提问于 2015-10-29 14:17:52
回答 1查看 1.1K关注 0票数 3

我发现在Microsoft示例示例中:

代码语言:javascript
复制
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仍在绘图时,它不能显示缓冲区。是这样吗?有人能解释一下这里发生了什么吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-29 22:24:46

现在还有一个异步命令,它告诉GPU从交换链中的下一个缓冲区开始扫描(显示)。您不必担心GPU在“翻转”发生之前还没有完成所有以前发布的工作(在图形命令队列上)。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33416715

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档