3.2 Execution Model

Vulkan exposes one or more devices, each of which exposes one or more queues which may process work asynchronously to one another.

Vulkan可以拥有一个或多个设备,每一个设备都有用用一个或者多个可以拥有异步处理工作的队列。

The set of queues supported by a device is partitioned into families.

一个设备支持的队列集合被分为不同的种类。

Each family supports one or more types of functionality and may contain multiple queues with similar characteristics.

每一个种类支持一个或者更多类型的功能,和可能包含具备相似特征的多个队列。

Queues within a single family are considered compatible with one another, and work produced for a family of queues can be executed on any queue within that family.

处于同一个单独种类的队列被认为是相互兼容的,和一个种类的队列产生的工作可以在任何一个同种种类的队列上执行。

This specification defines the following types of functionality that queues may support: graphics, compute, transfer and sparse memory management.

这个标准定义了如下的队列可能支持的功能的类型:图像,计算,转移和稀疏内存管理。

Device memory is explicitly managed by the application.

应用程序明确管理设备内存。

Each device may advertise one or more heaps, representing different areas of memory.

每一个设备可能展示一个或者多个堆,代表不同的内存区域。

Memory heaps are either device-local or host-local,but are always visible to the device. Further detail about memory heaps is exposed via memory types available on that heap.

内存堆是本地设备类或者本地主机类,但是对设备总是可见的。通过设备的内存类型来暴露内存堆的更多细节。

Examples of memory areas that may be available on an implementation include:

可能已经实现的内存区域的例子包括:

• device-local is memory that is physically connected to the device.

本地设备是物理上直接连接到设备的内存。

• device-local, host visible is device-local memory that is visible to the host.

本地设备,对主机可见的本地设备内存时主机可见的。

• host-local, host visible is memory that is local to the host and visible to the device and host.

本地主机,主机可见的内存,它是主机本地和对设备和主机可见。

On other architectures, there may only be a single heap that can be used for any purpose.

在其他的架构,有可能是单独的堆被用来任何的目的。

3.2.1. Queue Operation

Vulkan queues provide an interface to the execution engines of a device.

Vulkan队列提供了一个设备执行引擎的接口。

Commands for these execution engines are recorded into command buffers ahead of execution time, and then submitted to a queue for execution.

在执行以前那些执行引擎的命令被记录在命令buffer中,然后被提交到队列进行执行。

Once submitted to a queue, command buffers will begin and complete execution without further application intervention, though the order of this execution is dependent on a number of implicit and explicit ordering constraints.

一旦被提交到队列,在没有应用程序干扰下命令buffer将开始完成执行,尽管执行的顺序是依赖于隐含或者明确的顺序限制。

Work is submitted to queues using queue submission commands that typically take the form vkQueue* (e.g. vkQueueSubmit, vkQueueBindSparse), and can take a list of semaphores upon which to wait before work begins and a list of semaphores to signal once work has completed.

使用队列提交命令把工作提交到队列,典型的队列提交的命令是vkQueue*(例如:vkQueueSubmit, vkQueueBindSparse),和带有多个信号量,在工作开始前等待,在工作完成后触发signal。

The work itself, as well as signaling and waiting on the semaphores are all queue operations.

工作本身和信号的触发和等待都是队列的操作。

Queue submission commands return control to the application once queue operations have been submitted - they do not wait for completion.

完成提交后,他们并不会等待完成,队列提交命令将控制权交回给应用。

There are no implicit ordering constraints between queue operations on different queues, or between queues and the host, so these may operate in any order with respect to each other.

不同队列的队列命令的执行没有固定的顺序。

Explicit ordering constraints between different queues or with the host can be expressed with semaphores and fences.

可以使用信号量和fence来确保不同队列或者主机的执行顺序。

Command buffer submissions to a single queue respect submission order and other implicit ordering guarantees, but otherwise may overlap or execute out of order.

提交到单独的队列的命令buffer会依赖提交的顺序和其他的隐藏的顺序,但是也可能是重叠或者执行乱序的。

Other types of batches and queue submissions against a single queue (e.g. sparse memory binding) have no implicit ordering constraints with any other queue submission or batch.

其他非单独队列的队列提交没有隐藏的顺序限制。

Additional explicit ordering constraints between queue submissions and individual batches can be expressed with semaphores and fences.

明确的队列限制可以使用semaphores和fence。

Before a fence or semaphore is signaled, it is guaranteed that any previously submitted queue operations have completed execution, and that memory writes from those queue operations are available to future queue operations.

在一个fence或者semaphore被触发以前,它保证了任何以前提交的队列操作已经完成了执行,和来自其他的队列的操作可以进行内存的写操作。

Waiting on a signaled semaphore or fence guarantees that previous writes that are available are also visible to subsequent commands.

等待信号量或者fence保证了这次的写操作对后续的命令是可见。

Command buffer boundaries, both between primary command buffers of the same or different batches or submissions as well as between primary and secondary command buffers, do not introduce any additional ordering constraints.

相同或不同批次或提交的主命令缓冲区之间以及主命令缓冲区和辅助命令缓冲区之间的命令缓冲区边界不会引入任何额外的排序约束。

In other words, submitting the set of command buffers (which can include executing secondary command buffers) between any semaphore or fence operations execute the recorded commands as if they had all been recorded into a single primary command buffer, except that the current state is reset on each boundary. Explicit ordering constraints can be expressed with explicit synchronization primitives.

在不同semaphore或者fence操作的命令buffer是同步的,好像被记录到一个单独的主命令buffer。

Commands recorded in command buffers either perform actions (draw, dispatch, clear, copy, query/timestamp operations, begin/end subpass operations), set state (bind pipelines, descriptor sets, and buffers, set dynamic state, push constants, set render pass/subpass state), or perform synchronization (set/wait events, pipeline barrier, render pass/subpass dependencies).

命令buffer中的命令,可以执行操作(draw,dispatch等等),设置状态(绑定pipelines等),或者执行同步(设置/等待事件,pipeline屏障,渲染通道或者子通道的依赖)。

Some commands perform more than one of these tasks.

一些命令执行多个task。

State setting commands update the current state of the command buffer.

状态设定命令更新当前命令buffer的状态。

Some commands that perform actions (e.g. draw/dispatch) do so based on the current state set cumulatively since the start of the command buffer.

一些命令的执行依赖于当前命令buffer的状态。

The work involved in performing action commands is often allowed to overlap or to be reordered, but doing so must not alter the state to be used by each action command.

在执行action命令的工作总是被运行重叠或者被排序,但是这样做一定不能修改每一个action命令的状态。

In general, action commands are those commands that alter framebuffer attachments, read/write buffer or image memory, or write to query pools.

一般来说,action命令是那些修改framebuffer附件,读写buffer或者图像内存,或者写入查询的pools。

Synchronization commands introduce explicit execution and memory dependencies between two sets of action commands, where the second set of commands depends on the first set of commands.

同步命令用于有相互依赖的命令。

These dependencies enforce both that the execution of certain pipeline stages in the later set occurs after the execution of certain stages in the source set, and that the effects of memory accesses performed by certain pipeline stages occur in order and are visible to each other.

相互依赖影响到某些内存的访问,或者可见性。

When not enforced by an explicit dependency or implicit ordering guarantees, action commands may overlap execution or execute out of order, and may not see the side effects of each other’s memory accesses.

如果没有明确或者隐含的顺序保证,action命令可以任意执行,没有可能的相互内存访问的影响。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值