3.5. Command Syntax and Duration

Vulkan uses the standard C types for the base type of scalar parameters (e.g. types from ), with exceptions described below, or elsewhere in the text when appropriate:

Vulkan使用标准的C类型对于这些标量

VkBool32 represents boolean True and False values, since C does not have a sufficiently portable built-in boolean type:

VK_FALSE is a constant representing a VkBool32 False value.

#define VK_FALSE 0U

VK_FALSE是0

VkDeviceSize represents device memory size and offset values:

VKDevicesize代表设备内存的大小和偏移值:

// Provided by VK_VERSION_1_0 typedef uint64_t VkDeviceSize

VkDeviceAddress represents device buffer address values:

VKDeviceAddress表示设备buffer地址的值:

// Provided by VK_VERSION_1_0 typedef uint64_t VkDeviceAddress;

Commands that create Vulkan objects are of the form vkCreate* and take Vk*CreateInfo structures with the parameters needed to create the object. These Vulkan objects are destroyed with commands of the form vkDestroy*.

使用Vk*CreateInfo结构体作为参数来使用VkCreate*来创建Vulkan对象。这些对象使用vkDestory*来销毁它。

The last in-parameter to each command that creates or destroys a Vulkan object is pAllocator.

最后一个参数放到每个create或者销毁对象命令是pAllocator。

The pAllocator parameter can be set to a non-NULL value such that allocations for the given object are delegated to an application provided callback;

这个pAllocator参数可以被设置为 非NULL的,以至于对于给定对象的分配可以被代理给一个提供callback的应用程序。

refer to the Memory Allocation chapter for further Commands that allocate Vulkan objects owned by pool objects are of the form vkAllocate*, and take Vk*AllocateInfo structures.

使用vk*allocateInfo和vkAllocate*来进行内存分配。

These Vulkan objects are freed with commands of the form vkFree*.

Vulkan对象使用vkFree*来进行释放。

These objects do not take allocators; if host memory is needed, they will use the allocator that was specified when their parent pool was created.

这些对象并没有并没有使用allocator;如果主机内存被需要,他们讲会使用被指定的allocator。

Commands are recorded into a command buffer by calling API commands of the form vkCmd*.

通过callvkCmd*来记录Commands到Command buffer。

Each such command may have different restrictions on where it can be used: in a primary and/or secondary command buffer, inside and/or outside a render pass, and in one or more of the supported queue types.

每一个命令都有不同的限制它使用的地方:在主或者次级命令buffer,在渲染通道内或者外面,和在一个或多个支持的queue类型。

These restrictions are documented together with the definition of each such command. The duration of a Vulkan command refers to the interval between calling the command and its return to the caller。

这些限制写到了每一个命令的文档中。这个vulkan命令的时间在调用和它返回。

3.5.1. Lifetime of Retrieved Results

Information is retrieved from the implementation with commands of the form vkGet* and vkEnumerate*.

从VKGet*和vkEnumerate*获取命令的信息。

Unless otherwise specified for an individual command, the results are invariant;

除非明确指定对于一个单独命令,结果是不变的。

that is, they will remain unchanged when retrieved again by calling the same command with the same parameters, so long as those parameters themselves all remain valid.

如果使用同样的参数,使用同样的命令获取到的都是一样的。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值