From 3ff490fc136fc0a3694b22aece2d8d0ae766cb3b Mon Sep 17 00:00:00 2001 From: Arman Uguray Date: Thu, 13 Apr 2023 20:17:19 -0700 Subject: [PATCH] [vello_encoding] Declare padding in binding types to match WGSL layout --- crates/encoding/src/clip.rs | 1 + crates/encoding/src/path.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/encoding/src/clip.rs b/crates/encoding/src/clip.rs index 1ecbadb..7006ea4 100644 --- a/crates/encoding/src/clip.rs +++ b/crates/encoding/src/clip.rs @@ -16,6 +16,7 @@ pub struct ClipBic { #[repr(C)] pub struct ClipElement { pub parent_ix: u32, + _padding: [u8; 12], pub bbox: [f32; 4], } diff --git a/crates/encoding/src/path.rs b/crates/encoding/src/path.rs index 45f679f..9e20490 100644 --- a/crates/encoding/src/path.rs +++ b/crates/encoding/src/path.rs @@ -209,6 +209,7 @@ pub struct Path { pub bbox: [f32; 4], /// Offset (in u32s) to tile rectangle. pub tiles: u32, + _padding: [u32; 3], } /// Tile object.