-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The following is implemented in this change: - Codified VU parsing - Codified VU reformatting in source (reflow.py) - Codified VU formatting for build - Codified VU type checking - Unit tests There is no mention of codified VUs in the spec text however at this point. That will be added as VUs are converted.
- Loading branch information
Showing
14 changed files
with
3,707 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Copyright 2015-2022 The Khronos Group Inc. | ||
// | ||
// SPDX-License-Identifier: CC-BY-4.0 | ||
|
||
[[clears]] | ||
= Clear Commands | ||
|
||
|
||
[[clears-outside]] | ||
== Clearing Images Outside A Render Pass Instance | ||
|
||
[open,refpage='vkCmdClearColorImage',desc='Clear regions of a color image',type='protos'] | ||
-- | ||
To clear one or more subranges of a color image, call: | ||
|
||
include::{generated}/api/protos/vkCmdClearColorImage.adoc[] | ||
|
||
.Valid Usage | ||
**** | ||
ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[] | ||
* [[VUID-vkCmdClearColorImage-image-01993]] | ||
The <<resources-image-format-features,format features>> of pname:image | ||
must: contain ename:VK_FORMAT_FEATURE_TRANSFER_DST_BIT | ||
endif::VK_VERSION_1_1,VK_KHR_maintenance1[] | ||
* [[VUID-vkCmdClearColorImage-image-10000]] | ||
require(image.create_info().usage.has_bit(VK_IMAGE_USAGE_TRANSFER_DST_BIT)) | ||
ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] | ||
* [[VUID-vkCmdClearColorImage-image-01545]] | ||
pname:image must: not use any of the | ||
<<formats-requiring-sampler-ycbcr-conversion, formats that require a | ||
sampler {YCbCr} conversion>> | ||
endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] | ||
* [[VUID-vkCmdClearColorImage-image-10001]] | ||
If pname:image is non-sparse then it must: be bound completely and | ||
contiguously to a single sname:VkDeviceMemory object | ||
* [[VUID-vkCmdClearColorImage-imageLayout-00004]] | ||
pname:imageLayout must: specify the layout of the image subresource | ||
ranges of pname:image specified in pname:pRanges at the time this | ||
command is executed on a sname:VkDevice | ||
ifndef::VK_KHR_shared_presentable_image[] | ||
* [[VUID-vkCmdClearColorImage-imageLayout-00005]] | ||
pname:imageLayout must: be ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or | ||
ename:VK_IMAGE_LAYOUT_GENERAL | ||
endif::VK_KHR_shared_presentable_image[] | ||
ifdef::VK_KHR_shared_presentable_image[] | ||
* [[VUID-vkCmdClearColorImage-imageLayout-10002]] | ||
require(imageLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or | ||
imageLayout == VK_IMAGE_LAYOUT_GENERAL or | ||
imageLayout == VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR) | ||
endif::VK_KHR_shared_presentable_image[] | ||
* [[VUID-vkCmdClearColorImage-aspectMask-02498]] | ||
The slink:VkImageSubresourceRange::pname:aspectMask members of the | ||
elements of the pname:pRanges array must: each only include | ||
ename:VK_IMAGE_ASPECT_COLOR_BIT | ||
* [[VUID-vkCmdClearColorImage-image-10003]] | ||
mipLevels = image.create_info().mipLevels | ||
for range in pRanges: | ||
require(range.baseMipLevel < mipLevels) | ||
* [[VUID-vkCmdClearColorImage-image-10004]] | ||
mipLevels = image.create_info().mipLevels | ||
for range in pRanges: | ||
if range.levelCount != VK_REMAINING_MIP_LEVELS: | ||
require(range.baseMipLevel + range.levelCount <= mipLevels) | ||
* [[VUID-vkCmdClearColorImage-baseArrayLayer-01472]] | ||
The slink:VkImageSubresourceRange::pname:baseArrayLayer members of the | ||
elements of the pname:pRanges array must: each be less than the | ||
pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image | ||
was created | ||
* [[VUID-vkCmdClearColorImage-pRanges-01693]] | ||
For each slink:VkImageSubresourceRange element of pname:pRanges, if the | ||
pname:layerCount member is not ename:VK_REMAINING_ARRAY_LAYERS, then | ||
[eq]#pname:baseArrayLayer {plus} pname:layerCount# must: be less than or | ||
equal to the pname:arrayLayers specified in slink:VkImageCreateInfo when | ||
pname:image was created | ||
* [[VUID-vkCmdClearColorImage-image-10005]] | ||
pname:image must: not have a compressed or depth/stencil format | ||
* [[VUID-vkCmdClearColorImage-pColor-10006]] | ||
pname:pColor must: be a valid pointer to a slink:VkClearColorValue union | ||
ifdef::VK_VERSION_1_1[] | ||
* [[VUID-vkCmdClearColorImage-commandBuffer-01805]] | ||
If pname:commandBuffer is an unprotected command buffer and | ||
<<limits-protectedNoFault, pname:protectedNoFault>> is not supported, | ||
pname:image must: not be a protected image | ||
* [[VUID-vkCmdClearColorImage-commandBuffer-01806]] | ||
If pname:commandBuffer is a protected command buffer and | ||
<<limits-protectedNoFault, pname:protectedNoFault>> is not supported, | ||
must: not be an unprotected image | ||
endif::VK_VERSION_1_1[] | ||
**** | ||
|
||
include::{generated}/validity/protos/vkCmdClearColorImage.adoc[] | ||
-- |
Oops, something went wrong.