Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vulkan] Validation errors for DST bit usage on transfer buffers #8466

Closed
mcourteaux opened this issue Nov 6, 2024 · 1 comment · Fixed by #8452
Closed

[vulkan] Validation errors for DST bit usage on transfer buffers #8466

mcourteaux opened this issue Nov 6, 2024 · 1 comment · Fixed by #8452
Assignees
Labels

Comments

@mcourteaux
Copy link
Contributor

I noticed this on the build bot:

https://buildbot.halide-lang.org/master/#/builders/67/builds/630

at correctness_async_device_copy:

VUID-vkCmdCopyBuffer-dstBuffer-00120(ERROR / SPEC): msgNum: 1355715885 - Validation Error: [ VUID-vkCmdCopyBuffer-dstBuffer-00120 ] Object 0: handle = 0x5bb80721eea0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2cfba2000000001c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x50ce952d | vkCmdCopyBuffer(): dstBuffer (VkBuffer 0x2cfba2000000001c[]) was created with VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR but requires VK_BUFFER_USAGE_TRANSFER_DST_BIT.
The Vulkan spec states: dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-00120)
    Objects: 2
        [0] 0x5bb80721eea0, type: 6, name: NULL
        [1] 0x2cfba2000000001c, type: 9, name: NULL
VUID-vkCmdCopyBuffer-dstBuffer-00120(ERROR / SPEC): msgNum: 1355715885 - Validation Error: [ VUID-vkCmdCopyBuffer-dstBuffer-00120 ] Object 0: handle = 0x5bb80721eea0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2cfba2000000001c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x50ce952d | vkCmdCopyBuffer(): dstBuffer (VkBuffer 0x2cfba2000000001c[]) was created with VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR but requires VK_BUFFER_USAGE_TRANSFER_DST_BIT.
The Vulkan spec states: dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-00120)
    Objects: 2
        [0] 0x5bb80721eea0, type: 6, name: NULL
        [1] 0x2cfba2000000001c, type: 9, name: NULL
VUID-vkCmdCopyBuffer-dstBuffer-00120(ERROR / SPEC): msgNum: 1355715885 - Validation Error: [ VUID-vkCmdCopyBuffer-dstBuffer-00120 ] Object 0: handle = 0x5bb80721eea0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2cfba2000000001c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x50ce952d | vkCmdCopyBuffer(): dstBuffer (VkBuffer 0x2cfba2000000001c[]) was created with VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR but requires VK_BUFFER_USAGE_TRANSFER_DST_BIT.
The Vulkan spec states: dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-00120)
    Objects: 2
        [0] 0x5bb80721eea0, type: 6, name: NULL
        [1] 0x2cfba2000000001c, type: 9, name: NULL
VUID-vkCmdCopyBuffer-dstBuffer-00120(ERROR / SPEC): msgNum: 1355715885 - Validation Error: [ VUID-vkCmdCopyBuffer-dstBuffer-00120 ] Object 0: handle = 0x5bb80721eea0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2cfba2000000001c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x50ce952d | vkCmdCopyBuffer(): dstBuffer (VkBuffer 0x2cfba2000000001c[]) was created with VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR but requires VK_BUFFER_USAGE_TRANSFER_DST_BIT.
The Vulkan spec states: dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-00120)
    Objects: 2
        [0] 0x5bb80721eea0, type: 6, name: NULL
        [1] 0x2cfba2000000001c, type: 9, name: NULL
VUID-vkCmdCopyBuffer-dstBuffer-00120(ERROR / SPEC): msgNum: 1355715885 - Validation Error: [ VUID-vkCmdCopyBuffer-dstBuffer-00120 ] Object 0: handle = 0x5bb80721eea0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2cfba2000000001c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x50ce952d | vkCmdCopyBuffer(): dstBuffer (VkBuffer 0x2cfba2000000001c[]) was created with VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR but requires VK_BUFFER_USAGE_TRANSFER_DST_BIT.
The Vulkan spec states: dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-00120)
    Objects: 2
        [0] 0x5bb80721eea0, type: 6, name: NULL
        [1] 0x2cfba2000000001c, type: 9, name: NULL
VUID-vkCmdCopyBuffer-dstBuffer-00120(ERROR / SPEC): msgNum: 1355715885 - Validation Error: [ VUID-vkCmdCopyBuffer-dstBuffer-00120 ] Object 0: handle = 0x5bb80721eea0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2cfba2000000001c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x50ce952d | vkCmdCopyBuffer(): dstBuffer (VkBuffer 0x2cfba2000000001c[]) was created with VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR but requires VK_BUFFER_USAGE_TRANSFER_DST_BIT.
The Vulkan spec states: dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-00120)
    Objects: 2
        [0] 0x5bb80721eea0, type: 6, name: NULL
        [1] 0x2cfba2000000001c, type: 9, name: NULL
VUID-vkCmdCopyBuffer-dstBuffer-00120(ERROR / SPEC): msgNum: 1355715885 - Validation Error: [ VUID-vkCmdCopyBuffer-dstBuffer-00120 ] Object 0: handle = 0x5bb80721eea0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2cfba2000000001c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x50ce952d | vkCmdCopyBuffer(): dstBuffer (VkBuffer 0x2cfba2000000001c[]) was created with VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR but requires VK_BUFFER_USAGE_TRANSFER_DST_BIT.
The Vulkan spec states: dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-00120)
    Objects: 2
        [0] 0x5bb80721eea0, type: 6, name: NULL
        [1] 0x2cfba2000000001c, type: 9, name: NULL
Case 1: 1.816708
Case 2: 0.021070
Case 3: 0.019726
Success!

Looking at vulkan.cpp there are a few places that use MemoryUsage::TransferSrc for buffer copies indeed.

@mcourteaux mcourteaux added the bug label Nov 6, 2024
@derek-gerstmann derek-gerstmann changed the title Vulkan validation error. [vulkan] Validation errors for DST bit usage on transfer buffers Nov 6, 2024
@derek-gerstmann
Copy link
Contributor

Fixed in #8452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants