Vulkan:验证层:验证错误:[ UNASSIGNED-GeneralParameterError-UnrecognizedValue ]

问题描述 投票:0回答:2

我正在尝试在 Vulkan 中编写“图形 Hello World 程序”,其目标是在屏幕上绘制一个三角形。

我正在关注这个教程

我遇到两种类型的错误。

第一个错误是:

validation layer: loaderAddLayerProperties: C:\VulkanSDK\1.2.198.1\Bin\VkLayer_api_dump.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: C:\VulkanSDK\1.2.198.1\Bin\VkLayer_device_simulation.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: C:\VulkanSDK\1.2.198.1\Bin\VkLayer_gfxreconstruct.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: C:\VulkanSDK\1.2.198.1\Bin\VkLayer_khronos_synchronization2.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: C:\VulkanSDK\1.2.198.1\Bin\VkLayer_khronos_validation.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: C:\VulkanSDK\1.2.198.1\Bin\VkLayer_screenshot.json invalid layer manifest file version 1.2.0.  May cause errors.

我可以在 stackoverflow 上的一篇文章中找到这里 但我检查了解决方案建议的所有内容,错误仍然存在。

第二个错误是:

validation layer: Validation Error: [ UNASSIGNED-GeneralParameterError-UnrecognizedValue ] Object 0: handle = 0x239e0488218, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbe6eff91 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pColorBlendState->pAttachments[0].blendEnable (-858993460) is neither VK_TRUE nor VK_FALSE. Applications MUST not pass any other values than VK_TRUE or VK_FALSE into a Vulkan implementation where a VkBool32 is expected.
validation layer: Validation Error: [ VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-parameter ] Object 0: handle = 0x239e0488218, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xeb9e690 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pColorBlendState->pAttachments[0].srcColorBlendFactor (-858993460) does not fall within the begin..end range of the core VkBlendFactor enumeration tokens and is not an extension added token. The Vulkan spec states: srcColorBlendFactor must be a valid VkBlendFactor value (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-parameter)
validation layer: Validation Error: [ VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-parameter ] Object 0: handle = 0x239e0488218, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x8db942fe | vkCreateGraphicsPipelines: value of pCreateInfos[0].pColorBlendState->pAttachments[0].dstColorBlendFactor (-858993460) does not fall within the begin..end range of the core VkBlendFactor enumeration tokens and is not an extension added token. The Vulkan spec states: dstColorBlendFactor must be a valid VkBlendFactor value (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-parameter)
validation layer: Validation Error: [ VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-parameter ] Object 0: handle = 0x239e0488218, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7978ef4f | vkCreateGraphicsPipelines: value of pCreateInfos[0].pColorBlendState->pAttachments[0].colorBlendOp (-858993460) does not fall within the begin..end range of the core VkBlendOp enumeration tokens and is not an extension added token. The Vulkan spec states: colorBlendOp must be a valid VkBlendOp value (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-parameter)
validation layer: Validation Error: [ VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-parameter ] Object 0: handle = 0x239e0488218, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x4a7f8ed8 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pColorBlendState->pAttachments[0].srcAlphaBlendFactor (-453845144) does not fall within the begin..end range of the core VkBlendFactor enumeration tokens and is not an extension added token. The Vulkan spec states: srcAlphaBlendFactor must be a valid VkBlendFactor value (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-parameter)
validation layer: Validation Error: [ VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-parameter ] Object 0: handle = 0x239e0488218, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x53ab1c8f | vkCreateGraphicsPipelines: value of pCreateInfos[0].pColorBlendState->pAttachments[0].dstAlphaBlendFactor (569) does not fall within the begin..end range of the core VkBlendFactor enumeration tokens and is not an extension added token. The Vulkan spec states: dstAlphaBlendFactor must be a valid VkBlendFactor value (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-parameter)
validation layer: Validation Error: [ VUID-VkPipelineColorBlendAttachmentState-alphaBlendOp-parameter ] Object 0: handle = 0x239e0488218, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x48f9f9b | vkCreateGraphicsPipelines: value of pCreateInfos[0].pColorBlendState->pAttachments[0].alphaBlendOp (-1467165950) does not fall within the begin..end range of the core VkBlendOp enumeration tokens and is not an extension added token. The Vulkan spec states: alphaBlendOp must be a valid VkBlendOp value (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-alphaBlendOp-parameter)
validation layer: Validation Error: [ VUID-VkPipelineColorBlendAttachmentState-colorWriteMask-parameter ] Object 0: handle = 0x239e0488218, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xb8f9c032 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pColorBlendState->pAttachments[0].colorWriteMask contains flag bits that are not recognized members of VkColorComponentFlagBits The Vulkan spec states: colorWriteMask must be a valid combination of VkColorComponentFlagBits values (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-colorWriteMask-parameter)
failed to submit draw command buffer!

我在 reddit 上找到了一篇帖子,描述了类似的问题here,但该帖子尚未解决。

failed to submit draw command buffer!
消息是由
std::runtime_error
引发的,而
false
返回值为

vkQueueSubmit(device.graphicsQueue(), 1, &submitInfo, inFlightFences[currentFrame])

我的程序在这两个错误消息之间打印出一些附加信息:

available extensions:
        VK_KHR_device_group_creation
        VK_KHR_external_fence_capabilities
        VK_KHR_external_memory_capabilities
        VK_KHR_external_semaphore_capabilities
        VK_KHR_get_physical_device_properties2
        VK_KHR_get_surface_capabilities2
        VK_KHR_surface
        VK_KHR_surface_protected_capabilities
        VK_KHR_win32_surface
        VK_EXT_debug_report
        VK_EXT_debug_utils
        VK_EXT_swapchain_colorspace
        VK_NV_external_memory_capabilities
required extensions:
        VK_KHR_surface
        VK_KHR_win32_surface
        VK_EXT_debug_utils
Device count: 1
physical device: GeForce RTX 2060 SUPER
Present mode: Mailbox

我使用的是 Windows 10。

validation vulkan
2个回答
0
投票

如果您的驱动程序的加载程序较旧,则第一个错误是正常的。应该是良性的。请参阅文档中的“已知问题”。

第二个错误似乎是由

pCreateInfos[0].pColorBlendState->pAttachments[0]
成员在代码中不存在或未初始化引起的。

第三个错误可能是第二个错误的结果(未能创建或创建无效的管道)。


0
投票
© www.soinside.com 2019 - 2024. All rights reserved.