From 5fac4835f6e70e26c474d9fa8a57f254896de0f3 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Mon, 21 Dec 2020 15:33:34 -0500 Subject: [PATCH] [rs] Use only 1 and 4 samples for msaa-line example --- wgpu/examples/msaa-line/main.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wgpu/examples/msaa-line/main.rs b/wgpu/examples/msaa-line/main.rs index ad5256cb1d..04e382f4f7 100644 --- a/wgpu/examples/msaa-line/main.rs +++ b/wgpu/examples/msaa-line/main.rs @@ -193,15 +193,17 @@ impl framework::Example for Example { winit::event::WindowEvent::KeyboardInput { input, .. } => { if let winit::event::ElementState::Pressed = input.state { match input.virtual_keycode { + // TODO: Switch back to full scans of possible options when we expose + // supported sample counts to the user. Some(winit::event::VirtualKeyCode::Left) => { - if self.sample_count >= 2 { - self.sample_count = self.sample_count >> 1; + if self.sample_count == 4 { + self.sample_count = 1; self.rebuild_bundle = true; } } Some(winit::event::VirtualKeyCode::Right) => { - if self.sample_count <= 16 { - self.sample_count = self.sample_count << 1; + if self.sample_count == 1 { + self.sample_count = 4; self.rebuild_bundle = true; } }