Vulkan Graphics pipeline Dynamic State(图形管线之动态状态)

29 篇文章 2 订阅
10 篇文章 3 订阅

Vulkan官方英文原文:请见 Vulkan® 1.3.236 - A Specification 10.9 章节。

对应的Vulkan技术规格说明书版本: Vulkan 1.3.2

A dynamic pipeline state is a state that can be changed by a command buffer command during the execution of a command buffer. Advance notification of what states are dynamic during command buffer execution may be useful for a driver as it sets up the GPU for command buffer execution.

动态管线状态是一个能被命令缓冲区的命令在一个命令缓冲区命令执行期间改变的状态。在命令缓冲区执行期间提前知道状态是动态的,这有助于驱动对GPU做相关设置。

When a pipeline object is bound, any pipeline object state that is not specified as dynamic is applied to the command buffer state. Pipeline object state that is specified as dynamic is not applied to the command buffer state at this time. Instead, dynamic state can be modified at any time and persists for the lifetime of the command buffer, or until modified by another dynamic state setting command, or made invalid by another pipeline bound with that state specified as static.

绑定管道对象时,任何未指定为动态的管管线对象状态都将应用于命令缓冲区状态。此时被指定为动态的管线对象状态不会被用作命令缓冲区状态。相反,动态状态在任何时间都能被修改,修改后在命令缓冲区的生命周期里持续有效,或者直到被另外的动态状态设置命令修改为止,再或者被另外指定静态状态的管线绑定而变为无效的。

When a pipeline object is bound, the following applies to each state parameter:

• If the state is not specified as dynamic in the new pipeline object, then that command buffer

state is overwritten by the state in the new pipeline object. Before any draw or dispatch call with this pipeline there must not have been any calls to any of the corresponding dynamic state setting commands after this pipeline was bound.

• If the state is specified as dynamic in the new pipeline object, then that command buffer state is not disturbed. Before any draw or dispatch call with this pipeline there must have been at least one call to each of the corresponding dynamic state setting commands. The state-setting commands must be recorded after command buffer recording has begun, or after the last command binding a pipeline object with that state specified as static, whichever was the latter.

• If the state is not included (corresponding pointer in VkGraphicsPipelineCreateInfo was NULL or was ignored) in the new pipeline object, then that command buffer state is not disturbed.

管线对象被绑定时,后续应用到各个状态参数的情况如下:

• 假如在新的管线对象里状态没有被指定为动态的,则命令缓冲区状态会被新的管线状态对象覆盖。在使用此管线进行绘制或者发送调用之前,在当前管线被绑定之后,不能有任何对于相应的动态状态设置命令的调用。

• 假如在新的管线对象里状态被指定为动态的,那么命令缓冲区状态不受干扰。在使用此管线进行绘制或者发送调用之前,对每一个相应的动态状态设置命令必须至少有一个调用。命令缓冲区记录开始后必须记录状态设置命令,或者最后一个指定为静态状态的命令绑定到管线对象以后记录,以后者为准。

• 假设状态没有包括(VkGraphicsPipelineCreateInfo 中的相应的指针是NULL或者被忽略)在新的管线对象中,那么命令缓冲区状态不会被干扰。

Dynamic state that does not affect the result of operations can be left undefined.

不影响操作结果的动态状态可以不用定义。

Note:

For example, if blending is disabled by the pipeline object state, then the dynamic color blend constants do not need to be specified in the command buffer, even if this state is specified as dynamic in the pipeline object.

注意:

例如,假设混合操作被管线对象状态去掉,这时颜色混合常量不必在命令缓冲区中指定, 即使管线对象的状态指定为动态的。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值