summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/src/image.rs2
-rw-r--r--wgpu/src/quad.rs2
-rw-r--r--wgpu/src/renderer.rs2
3 files changed, 5 insertions, 1 deletions
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");