gpt4 book ai didi

directx-12 - 在 DX12 中,多个 ExecuteCommandLists 调用提供什么排序保证?

转载 作者:行者123 更新时间:2023-12-04 13:21:14 57 4
gpt4 key购买 nike

假设一个单线程应用程序。如果您拨打 ExecuteCommandLists两次( A B )。是 一个 保证在启动来自 的任何命令之前在 GPU 上执行其所有命令乙 ?我可以在文档中找到的最接近的东西是这个,但它似乎并不能保证 一个 结束前 开始:

Applications can submit command lists to any command queue from multiple threads. The runtime will perform the work of serializing these requests in the order of submission.



作为比较,我知道这是明确的 不是 在 Vulkan 中保证:

vkQueueSubmit is a queue submission command, with each batch defined by an element of pSubmits as an instance of the VkSubmitInfo structure. Batches begin execution in the order they appear in pSubmits, but may complete out of order.



但是,我不确定 DX12 是否以相同的方式工作。

Frank Luna's book说:

The command lists are executed in order starting with the first array element



然而,在这种情况下,他正在谈论调用 ExecuteCommandLists一次使用两个命令列表( C D )。这些操作与两个单独的调用相同吗?我的同事认为这仍然只能保证它们按顺序启动,而不是 C 结束前 D 开始。

我遗漏的地方是否有更清晰的文档?

最佳答案

我在 Direct X 论坛上问了同样的问题,这是微软工程师 Jesse Natalie 的回答:

Calling ExecuteCommandLists twice guarantees that the first workload (A) finishes before the second workload (B). Calling ExecuteCommandLists with two command lists allows the driver to merge the two command lists such that the second command list (D) may begin executing work before all work from the first (C) has finished.

Specifically, the application is allowed to insert a fence signal or wait between A and B, and the driver has no visibility into this, so the driver must ensure that everything in A is complete before the fence operation. There is no such opportunity in a single call to the API, so the driver can optimize that scenario.



来源:
http://forums.directxtech.com/index.php?topic=5975.0

关于directx-12 - 在 DX12 中,多个 ExecuteCommandLists 调用提供什么排序保证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52385998/

57 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com