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 + panic #8

Closed
rukai opened this issue Jul 14, 2019 · 1 comment · Fixed by #9
Closed

vulkan validation errors + panic #8

rukai opened this issue Jul 14, 2019 · 1 comment · Fixed by #9
Labels
bug Something isn't working
Milestone

Comments

@rukai
Copy link
Contributor

rukai commented Jul 14, 2019

After adding wgpu_glyph to my application everything works fine.
However once when running, I got these repeating validation errors:

ERROR gfx_backend_vulkan 
VALIDATION [VUID-VkBufferImageCopy-imageOffset-00197 (0)] : vkCmdCopyBufferToImage(): Both pRegion[0] imageoffset.x (264) and (imageExtent.width + imageOffset.x) (312) must be >= zero or <= image subresource width (256). The Vulkan spec states: imageOffset.x and (imageExtent.width + imageOffset.x) must both be greater than or equal to 0 and less than or equal to the image subresource width (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkBufferImageCopy-imageOffset-00197)
object info: (type: IMAGE, hndl: 22)

ERROR gfx_backend_vulkan 
VALIDATION [VUID-vkCmdCopyBufferToImage-pRegions-00172 (0)] : vkCmdCopyBufferToImage(): pRegion[0] exceeds image bounds.. The Vulkan spec states: The image region specified by each element of pRegions must be a region that is contained within dstImage (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCmdCopyBufferToImage-pRegions-00172)
object info: (type: COMMAND_BUFFER, hndl: 0)

And then it panicked with:

thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `Ok(false)`,
 right: `Ok(true)`: GPU got stuck on a frame (image 1) :(', /home/rubic/.cargo/git/checkouts/wgpu-53e70f8674b08dd4/dbef9f3/wgpu-native/src/swap_chain.rs:178:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:214
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
   7: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:384
   8: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:339
   9: wgpu_swap_chain_get_next_texture
  10: wgpu::SwapChain::get_next_texture
  11: pf_sandbox::wgpu::WgpuGraphics::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Illegal instruction (core dumped)

I believe this was caused by wgpu_glyph as my application does not copy buffers to images, but wgpu_glyph does.

@rukai rukai changed the title vulkan validation layers vulkan validation errors + panic Jul 14, 2019
@hecrj hecrj mentioned this issue Jul 14, 2019
@hecrj
Copy link
Owner

hecrj commented Jul 14, 2019

This should be related to #7. Check the fix in #9!

Thank you for the reports!

@hecrj hecrj added the bug Something isn't working label Jul 14, 2019
@hecrj hecrj closed this as completed in #9 Jul 15, 2019
@hecrj hecrj added this to the 0.4.0 milestone Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants