I turned on the Vulkan validation layer and ran my program. In the bad case, using PFG_D32_FLOAT
, I get two error reports that may be relevant. When VulkanQueue::prepareForDownload
calls vkCmdPipelineBarrier
, I get this:
Code: Select all
VUID-vkCmdPipelineBarrier-srcAccessMask-02815(ERROR / SPEC): msgNum: 618171435 - Validation Error: [ VUID-vkCmdPipelineBarrier-srcAccessMask-02815 ] Object 0: handle = 0x27a0adc0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x24d88c2b | vkCmdPipelineBarrier(): .pImageMemoryBarriers[0].srcAccessMask bit VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT is not supported by stage mask (VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT|VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT). The Vulkan spec states: The srcAccessMask member of each element of pMemoryBarriers must only include access flags that are supported by one or more of the pipeline stages in srcStageMask, as specified in the table of supported access types (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdPipelineBarrier-srcAccessMask-02815)
Objects: 1
[0] 0x27a0adc0, type: 6, name: NULL
and when VulkanAsyncTextureTicket::downloadFromGpu
calls vkCmdCopyImageToBuffer
, I get this:
Code: Select all
Ogre: ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkCmdPipelineBarrier-srcAccessMask-02815 ] Object 0: handle = 0x27a0adc0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x24d88c2b | vkCmdPipelineBarrier(): .pImageMemoryBarriers[0].srcAccessMask bit VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT is not supported by stage mask (VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT|VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT). The Vulkan spec states: The srcAccessMask member of each element of pMemoryBarriers must only include access flags that are supported by one or more of the pipeline stages in srcStageMask, as specified in the table of supported access types (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdPipelineBarrier-srcAccessMask-02815)
VUID-vkCmdCopyImageToBuffer-aspectMask-00211(ERROR / SPEC): msgNum: 376861408 - Validation Error: [ VUID-vkCmdCopyImageToBuffer-aspectMask-00211 ] Object 0: handle = 0x4f42790000000ebf, name = OSTX2, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x167672e0 | vkCmdCopyImageToBuffer: pRegion[0] subresource aspectMask 0x1 specifies aspects that are not present in image format 0x7e. The Vulkan spec states: For each element of pRegions, imageSubresource.aspectMask must specify aspects present in pname:srcImage (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdCopyImageToBuffer-aspectMask-00211)
Objects: 1
[0] 0x4f42790000000ebf, type: 10, name: OSTX2
In the better case, using PFG_D32_FLOAT_S8X24_UINT
, vkCmdCopyImageToBuffer
also produces an error but with different text:
Code: Select all
Ogre: ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkCmdPipelineBarrier-srcAccessMask-02815 ] Object 0: handle = 0x28032070, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x24d88c2b | vkCmdPipelineBarrier(): .pImageMemoryBarriers[0].srcAccessMask bit VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT is not supported by stage mask (VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT|VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT). The Vulkan spec states: The srcAccessMask member of each element of pMemoryBarriers must only include access flags that are supported by one or more of the pipeline stages in srcStageMask, as specified in the table of supported access types (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdPipelineBarrier-srcAccessMask-02815)
VUID-VkBufferImageCopy-aspectMask-00212(ERROR / SPEC): msgNum: -1123803970 - Validation Error: [ VUID-VkBufferImageCopy-aspectMask-00212 ] Object 0: handle = 0x1fd5740000000e65, name = OSTX2, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0xbd041cbe | vkCmdCopyImageToBuffer: aspectMasks for imageSubresource in pRegion[0] must have only a single bit set. The Vulkan spec states: The aspectMask member of imageSubresource must only have a single bit set (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkBufferImageCopy-aspectMask-00212)
Objects: 1
[0] 0x1fd5740000000e65, type: 10, name: OSTX2