A bunch of things. Section numbers are based on https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html
10.1
VK_SYSTEM_ALLOCATION_SCOPE_COMMAND - The allocation is scoped to the lifetime of the Vulkan command.
I don't understand what the "lifetime" of a command is - is that defined anywhere?
I guess it's just until the exit of the current vkFoo function call, in which case "duration of the Vulkan command" might be clearer.
(Lifetimes are much more obvious for all the other allocation scopes, because they're things that get explicitly created/allocated and destroyed/freed, so they're okay.)
pfnAllocation or pfnReallocation may be called in the following situations:
That doesn't list any cases where host memory scoped to the lifetime of a Vulkan command may be allocated. (I guess it should be added to the "may be allocated from any API command" category.)
11.1
Buffers represent linear arrays of data which are used for various purposes by binding them to the graphics pipeline via descriptor sets or via certain commands, or by directly specifying them as parameters to certain commands.
That just says "graphics pipeline", but I think they can be bound to compute pipelines too. Similar in the introduction to section 11.3 (Images).
11.2
- The value of range must be greater than 0
- The value of range, divided by the size of an element of format, must be less than or equal to the value of VkPhysicalDeviceLimits::maxTexelBufferElements
Is VK_WHOLE_SIZE greater than 0? and what is VK_WHOLE_SIZE divided by an integer? These probably need to be stated as "If range is not equal to VK_WHOLE_SIZE, ...".
11.3
The value of mipLevels must be less than or equal to or equal to the value of [...]
Duplication of "or equal to".
The value of mipLevels must be less than or equal to or equal to the value of ⌊log2(max(extent.width,extent.height,extent.depth))⌋+1
That means I can make an image with imageType = VK_IMAGE_TYPE_2D, extent = { 256, 256, 2^31 }, and mipLevels = 32, which seems silly.
I think either it should require extent.depth = 1 for 2D/1D and extent.height = 1 for 1D; or it should ignore the unused dimensions for the limit of mipLevels.
11.4
VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL: [...] This layout is valid only for subresources of images created with both the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage bit enabled.
Shouldn't say "both", it's only listing one bit.
- (baseMipLevel+levelCount) must be less than or equal to the mipLevels specified in VkImageCreateInfo when the image was created
- (baseArrayLayer+layerCount) must be less than or equal to the arrayLayers specified in VkImageCreateInfo when the image was created
These requirements should only apply when levelCount != VK_REMAINING_MIP_LEVELS, layerCount != VK_REMAINING_ARRAY_LAYERS.
11.6
if usage1 and usage2 of type VkBufferUsageFlags are such that usage2 contains a subset of the bits set in usage1 [...]
What does it mean to "contain a subset" here? I'd usually interpret "contain" as "is a superset of" - and the null set is always a subset of the bits set in usage1, and every set contains the null set, so this is trivially true and meaningless.
13.1.11
layout (input_attachment_index=i, set=m, binding=n) uniform subpass myInputAttachment;
The corresponding SPIR-V example doesn't use "i" anywhere. I guess it should have a "OpDecorate %7 InputAttachmentIndex i" to decorate the OpTypeImage.
13.2.1
myResult = vkCreateDescriptorSetLayout(
myDevice,
&myDescriptorSetLayoutCreateInfo[0],
&myDescriptorSetLayout[0]);
Missing the pAllocator argument.
13.2.2
const VkDescriptorSetLayout layouts = { layout1, layout2 };
Should be "layouts[]".
const VkPipelineLayoutCreateInfo createInfo =
{
VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, // sType
NULL, // pNext
2, // setLayoutCount
layouts, // pSetLayouts
2, // pushConstantRangeCount
ranges // pPushConstantRanges
};
Missing the flags argument.
myResult = vkCreatePipelineLayout(
myDevice,
&createInfo,
&myPipelineLayout);
Missing the pAllocator argument.
13.2.3
descriptorSetCount determines the number descriptor sets to be allocated from the pool.
Should be "number of".
All submitted commands that refer to any element of pDesciptorSets must have completed execution
Typo ("pDesciptorSets").
13.2.4
- If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, the VkBuffer that pTexelBufferView was created from must have been created with VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT set
- If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the VkBuffer that pTexelBufferView was created from must have been created with VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set
pTexelBufferView wasn't created from anything - it's just an array. Maybe this should say "If ..., the VkBuffer that any given element of pTexelBufferView was created from must ...".
- If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView must have been created with identity swizzle
What imageView? Maybe this should say "the imageView member of any given element of pImageInfo must have been ...".
[... VkDescriptorBufferInfo ...]
- If range is not equal to VK_WHOLE_SIZE, the sum of offset and range must be less than or equal to the size of buffer
What if range == VK_WHOLE_SIZE and offset > size_of_buffer? Seems like there should be a restriction that offset must be less than or equal to the size of buffer, to be consistent with the restriction on offset+size.
imageInfo is of type VkDescriptorImageInfo and is defined as:
What is "imageInfo"? That name isn't referenced anywhere else. Maybe should say "Each entry of pImageInfo is of type ...".
Each element in the pDescriptorCopies array in a VkCopyDescriptorSet structure describing an operation copying descriptors between sets.
Should be "describes", not "describing".
13.2.5
- commandbuffer is the command buffer that the descriptor sets will be bound to.
Should be "commandBuffer".
If any of the sets being bound include dynamic uniform or storage buffers, then pDynamicOffsets includes one element for each array element in each dynamic descriptor type binding in each set. Values are taken from
Unexpected end of sentence after "from".
within a set, entries are ordered by the binding numbers in the decriptor set layouts
Typo ("decriptor").
- Any given element of pDescriptorSets must have been created with a VkDescriptorSetLayout that matches the VkDescriptorSetLayout at set n in layout, where n is the sum of the index into pDescriptorSets and firstSet
I think it's unclear what "matches" means here. I guess it's like Pipeline Layout Compatibility's mention of "matching (the same, or identically defined)", rather than meaning handle equality, but it should be more explicit here.
13.2.6
- commandbuffer is the command buffer in which the push constant update will be recorded.
Should be "commandBuffer".