Skip to content

Commit

Permalink
[rs] Merge gfx-rs#373
Browse files Browse the repository at this point in the history
373: add test case for empty buffer r=kvark a=rukai

Depends on gfx-rs#720

Co-authored-by: Rukai <[email protected]>
  • Loading branch information
bors[bot] and rukai authored Jun 15, 2020
2 parents ee7e1c7 + 4b05349 commit 4804fe4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions wgpu/examples/hello-compute/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ async fn execute_gpu(numbers: Vec<u32>) -> Vec<u32> {
let slice_size = numbers.len() * std::mem::size_of::<u32>();
let size = slice_size as wgpu::BufferAddress;

let instace = wgpu::Instance::new();
let adapter = instace
let instance = wgpu::Instance::new();
let adapter = instance
.request_adapter(
&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::Default,
Expand Down Expand Up @@ -154,6 +154,12 @@ fn main() {
mod tests {
use super::*;

#[test]
fn test_compute_0() {
let input = vec![];
futures::executor::block_on(assert_execute_gpu(input, vec![]));
}

#[test]
fn test_compute_1() {
let input = vec![1, 2, 3, 4];
Expand Down

0 comments on commit 4804fe4

Please sign in to comment.