简体   繁体   English

Vulkan命令执行顺序

[英]Vulkan command execution order

Quoting Vulkan 1.0 specification document, chapter.5(Command Buffers) 4th paragraph, 引用Vulkan 1.0规范文档,第5章(命令缓冲区)第4段,

"Unless otherwise specified, and without explicit synchronization, the various commands submitted to a queue via command buffers may execute in arbitrary order relative to each other, and/or concurrently" “除非另有说明,否则没有明确同步,通过命令缓冲区提交给队列的各种命令可以相对于彼此以任意顺序执行,和/或同时执行”

In 1st paragraph of chapter 2.1.1(Queue Operation), it also states 在第2.1.1章(队列操作)的第1段中,它也说明了

"... Command buffers submitted to a single queue are played back in the order they were submitted, and commands within each buffer are played back in the order they were recorded" “...提交到单个队列的命令缓冲区按照它们提交的顺序播放,每个缓冲区内的命令按照它们记录的顺序播放”

Does "arbitrary order" in chapter 5 mean even out-of-order? 第5章中的“任意顺序”是否意味着无序? Then isn't it a conflict to statement of chapter 2.1.1 "played back in the order they were submitted"? 然后,对于第2.1.1章“按照提交顺序播放”的陈述,这不是冲突吗? Or are commands just "PLAYED BACK" in-order but "EXECUTED" out-of-order? 或者命令只是按顺序“回放”但是“执行”无序?

Chapter 2.1.1 is defining the API ordering of commands: the order of command buffers submitted into the queue, and the order of commands within the command buffer (and the order of primitives within a command). 第2.1.1节定义了命令的API排序:提交到队列中的命令缓冲区的顺序,以及命令缓冲区中命令的顺序(以及命令中基元的顺序)。

Chapter 5 is saying that the API ordering doesn't mean anything about execution ordering unless some text specifically says otherwise. 第5章说, 除非某些文本另有说明,否则A​​PI排序并不意味着执行顺序。 Chapter 2.1.1 includes specific exceptions to this (blending, depth test), and Chapter 6 introduces execution dependencies which can enforce execution ordering, based on the API ordering defined in 2.1.1. 第2.1.1章包含了特定的例外情况(混合,深度测试),第6章介绍了可以根据2.1.1中定义的API排序强制执行顺序的执行依赖性。 But outside of cases that explicitly declare ordering, the API ordering does not prohibit the queue from doing whatever else it wants with regard to execution. 但是在明确声明排序的情况之外,API排序并不禁止队列在执行方面做任何其他想要的事情。

That being said, the spec explains that poorly. 话虽如此,该规范解释得很糟糕。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM