diff options
-rw-r--r-- | native/src/widget/image.rs | 1 | ||||
-rw-r--r-- | wgpu/src/image.rs | 2 | ||||
-rw-r--r-- | wgpu/src/quad.rs | 2 | ||||
-rw-r--r-- | wgpu/src/renderer.rs | 2 |
4 files changed, 6 insertions, 1 deletions
diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs index 4c588c9d..bcfc40b2 100644 --- a/native/src/widget/image.rs +++ b/native/src/widget/image.rs @@ -100,6 +100,7 @@ where } fn hash_layout(&self, state: &mut Hasher) { + self.path.hash(state); self.width.hash(state); self.height.hash(state); } diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index 5dc972ac..40d9c318 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -427,6 +427,7 @@ pub struct Image { pub scale: [f32; 2], } +#[repr(C)] #[derive(Clone, Copy)] pub struct Vertex { _position: [f32; 2], @@ -449,6 +450,7 @@ const QUAD_VERTS: [Vertex; 4] = [ }, ]; +#[repr(C)] #[derive(Clone, Copy)] struct Instance { _position: [f32; 2], diff --git a/wgpu/src/quad.rs b/wgpu/src/quad.rs index 3d797758..c292dec3 100644 --- a/wgpu/src/quad.rs +++ b/wgpu/src/quad.rs @@ -248,6 +248,7 @@ impl Pipeline { } } +#[repr(C)] #[derive(Clone, Copy)] pub struct Vertex { _position: [f32; 2], @@ -270,6 +271,7 @@ const QUAD_VERTS: [Vertex; 4] = [ }, ]; +#[repr(C)] #[derive(Debug, Clone, Copy)] pub struct Quad { pub position: [f32; 2], diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs index f27a4b8a..268a3630 100644 --- a/wgpu/src/renderer.rs +++ b/wgpu/src/renderer.rs @@ -49,7 +49,7 @@ impl<'a> Layer<'a> { impl Renderer { fn new() -> Self { let adapter = Adapter::request(&RequestAdapterOptions { - power_preference: PowerPreference::LowPower, + power_preference: PowerPreference::Default, backends: BackendBit::all(), }) .expect("Request adapter"); |