From 4cb3c8309f878335589e39d779ac63b48f5baed9 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Wed, 24 Jul 2024 17:56:59 -0700 Subject: [PATCH] gpu: Delete unused `PaddedVec3`. --- all-is-cubes-gpu/src/in_wgpu/glue.rs | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/all-is-cubes-gpu/src/in_wgpu/glue.rs b/all-is-cubes-gpu/src/in_wgpu/glue.rs index 5f9cb5d36..471ce08cf 100644 --- a/all-is-cubes-gpu/src/in_wgpu/glue.rs +++ b/all-is-cubes-gpu/src/in_wgpu/glue.rs @@ -6,35 +6,10 @@ use core::ops::Range; use bytemuck::Pod; use wgpu::util::DeviceExt as _; -use all_is_cubes::euclid::{Point3D, Vector3D}; +use all_is_cubes::euclid::Point3D; use all_is_cubes::math::{GridAab, GridCoordinate, GridSize, Rgba}; use all_is_cubes_mesh::IndexSlice; -/// A vector of 3 f32s padded to resemble a vector of 4, to satisfy -/// GPU alignment expectations. -#[repr(C, align(16))] -#[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] -pub(crate) struct PaddedVec3 { - pub data: [f32; 3], - padding: f32, -} - -impl PartialEq for PaddedVec3 { - fn eq(&self, other: &Self) -> bool { - self.data == other.data - } -} -impl Eq for PaddedVec3 {} - -impl From> for PaddedVec3 { - fn from(data: Vector3D) -> Self { - Self { - data: data.into(), - padding: 0., - } - } -} - pub fn to_wgpu_color(color: Rgba) -> wgpu::Color { // TODO: Check whether this is gamma-correct wgpu::Color {