340: print usage required during usage validation r=kvark a=m4b

fixes #339

Co-authored-by: m4b <m4b.github.io@gmail.com>
This commit is contained in:
bors[bot] 2019-09-16 14:44:32 +00:00 committed by GitHub
commit ac16063c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1215,7 +1215,7 @@ pub fn device_create_bind_group<B: GfxBackend>(
.buffers .buffers
.use_extend(&*buffer_guard, bb.buffer, (), usage) .use_extend(&*buffer_guard, bb.buffer, (), usage)
.unwrap(); .unwrap();
assert!(buffer.usage.contains(usage)); assert!(buffer.usage.contains(usage), "Expected buffer usage {:?}", usage);
let end = if bb.size == 0 { let end = if bb.size == 0 {
None None