Skip to content

Queue write_buffer issue with Vulkan backend on NVidia #1323

@simast

Description

@simast

After upgrading wgpu from 0.7 to latest master I am seeing really strange issue with Queue::write_buffer() calls. This issue happens only when Vulkan backend is used - cannot reproduce with DX12 and Metal backends.

Some background how I render a scene.

  1. When renderer starts I pre-allocate a large buffer using Device::create_buffer(). I do this to not allocate memory during subsequent render calls.
  2. When changes are detected I update vertex instance data in this buffer using Queue::write_buffer() calls.
  3. I then render vertices using instance drawing with RenderPass::draw_indexed().

The strange issue is that when I write, for example, 5 items with write_buffer() - only 4 are actually written to the buffer. So one item is lost somehow.. Here are some screenshots:

Debugger active just before write_buffer() call showing 5 items:

debugger-output

And afterwards RenderDoc view for the same buffer showing only 4 items.

renderdoc-output

Since this started only after upgrading wgpu and only while Vulkan backend is used - I don't think the bug is in my code. There must be some issue in wgpu or any dependencies?

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: vulkanIssues with Vulkanexternal: driver-bugA driver is causing the bug, though we may still want to work around it

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions