From 9c2fd315cfcde83e2e63b8d225adf7992e982a2c Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 26 Jan 2024 22:09:33 -0800 Subject: [PATCH 1/5] Add R8Unorm format --- blade-graphics/src/gles/mod.rs | 1 + blade-graphics/src/lib.rs | 1 + blade-graphics/src/metal/mod.rs | 1 + blade-graphics/src/util.rs | 1 + blade-graphics/src/vulkan/mod.rs | 1 + examples/scene/main.rs | 4 ++-- 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/blade-graphics/src/gles/mod.rs b/blade-graphics/src/gles/mod.rs index 0ee632f0..a218000f 100644 --- a/blade-graphics/src/gles/mod.rs +++ b/blade-graphics/src/gles/mod.rs @@ -451,6 +451,7 @@ struct FormatInfo { fn describe_texture_format(format: crate::TextureFormat) -> FormatInfo { use crate::TextureFormat as Tf; let (internal, external, data_type) = match format { + Tf::R8Unorm => (glow::R8, glow::RED, glow::UNSIGNED_BYTE), Tf::Rg8Unorm => (glow::RG8, glow::RG, glow::UNSIGNED_BYTE), Tf::Rg8Snorm => (glow::RG8, glow::RG, glow::BYTE), Tf::Rgba8Unorm => (glow::RGBA8, glow::RGBA, glow::UNSIGNED_BYTE), diff --git a/blade-graphics/src/lib.rs b/blade-graphics/src/lib.rs index 3e80ecbf..902aa6b5 100644 --- a/blade-graphics/src/lib.rs +++ b/blade-graphics/src/lib.rs @@ -214,6 +214,7 @@ impl From for TexturePiece { #[derive(Clone, Copy, Debug, Hash, Eq, Ord, PartialEq, PartialOrd)] pub enum TextureFormat { // color + R8Unorm, Rg8Unorm, Rg8Snorm, Rgba8Unorm, diff --git a/blade-graphics/src/metal/mod.rs b/blade-graphics/src/metal/mod.rs index 438e242b..2cf6c6ae 100644 --- a/blade-graphics/src/metal/mod.rs +++ b/blade-graphics/src/metal/mod.rs @@ -278,6 +278,7 @@ fn map_texture_format(format: crate::TextureFormat) -> metal::MTLPixelFormat { use crate::TextureFormat as Tf; use metal::MTLPixelFormat::*; match format { + Tf::R8Unorm => R8Unorm, Tf::Rg8Unorm => RG8Unorm, Tf::Rg8Snorm => RG8Snorm, Tf::Rgba8Unorm => RGBA8Unorm, diff --git a/blade-graphics/src/util.rs b/blade-graphics/src/util.rs index 8561c82b..545face0 100644 --- a/blade-graphics/src/util.rs +++ b/blade-graphics/src/util.rs @@ -56,6 +56,7 @@ impl super::TextureFormat { } } match *self { + Self::R8Unorm => uncompressed(1), Self::Rg8Unorm => uncompressed(2), Self::Rg8Snorm => uncompressed(2), Self::Rgba8Unorm => uncompressed(4), diff --git a/blade-graphics/src/vulkan/mod.rs b/blade-graphics/src/vulkan/mod.rs index 34fea133..7820a2d7 100644 --- a/blade-graphics/src/vulkan/mod.rs +++ b/blade-graphics/src/vulkan/mod.rs @@ -474,6 +474,7 @@ impl crate::traits::CommandDevice for Context { fn map_texture_format(format: crate::TextureFormat) -> vk::Format { use crate::TextureFormat as Tf; match format { + Tf::R8Unorm => vk::Format::R8_UNORM, Tf::Rg8Unorm => vk::Format::R8G8_UNORM, Tf::Rg8Snorm => vk::Format::R8G8_SNORM, Tf::Rgba8Unorm => vk::Format::R8G8B8A8_UNORM, diff --git a/examples/scene/main.rs b/examples/scene/main.rs index eefc761a..72082cff 100644 --- a/examples/scene/main.rs +++ b/examples/scene/main.rs @@ -1041,7 +1041,7 @@ fn main() { example.load_scene(Path::new(&path_to_scene)); struct Drag { - screen_pos: glam::IVec2, + _screen_pos: glam::IVec2, rotation: glam::Quat, } let mut drag_start = None::; @@ -1125,7 +1125,7 @@ fn main() { } => { drag_start = match state { winit::event::ElementState::Pressed => Some(Drag { - screen_pos: last_mouse_pos.into(), + _screen_pos: last_mouse_pos.into(), rotation: example.camera.rot.into(), }), winit::event::ElementState::Released => None, From 815b7bf134ae4bfcc0c61e9785a30eb511fd2e7f Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 26 Jan 2024 23:43:57 -0800 Subject: [PATCH 2/5] gpu: add Bgra8Unorm and R16Float texture formats --- blade-graphics/src/gles/mod.rs | 2 ++ blade-graphics/src/lib.rs | 2 ++ blade-graphics/src/metal/mod.rs | 2 ++ blade-graphics/src/util.rs | 2 ++ blade-graphics/src/vulkan/mod.rs | 2 ++ 5 files changed, 10 insertions(+) diff --git a/blade-graphics/src/gles/mod.rs b/blade-graphics/src/gles/mod.rs index a218000f..f9cc1899 100644 --- a/blade-graphics/src/gles/mod.rs +++ b/blade-graphics/src/gles/mod.rs @@ -456,8 +456,10 @@ fn describe_texture_format(format: crate::TextureFormat) -> FormatInfo { Tf::Rg8Snorm => (glow::RG8, glow::RG, glow::BYTE), Tf::Rgba8Unorm => (glow::RGBA8, glow::RGBA, glow::UNSIGNED_BYTE), Tf::Rgba8UnormSrgb => (glow::SRGB8_ALPHA8, glow::RGBA, glow::UNSIGNED_BYTE), + Tf::Bgra8Unorm => (glow::RGBA8, glow::BGRA, glow::UNSIGNED_BYTE), Tf::Bgra8UnormSrgb => (glow::SRGB8_ALPHA8, glow::BGRA, glow::UNSIGNED_BYTE), Tf::Rgba8Snorm => (glow::RGBA8, glow::RGBA, glow::BYTE), + Tf::R16Float => (glow::R16F, glow::RED, glow::FLOAT), Tf::Rgba16Float => (glow::RGBA16F, glow::RGBA, glow::FLOAT), Tf::R32Float => (glow::R32F, glow::RED, glow::FLOAT), Tf::Rg32Float => (glow::RG32F, glow::RG, glow::FLOAT), diff --git a/blade-graphics/src/lib.rs b/blade-graphics/src/lib.rs index 902aa6b5..a04068a3 100644 --- a/blade-graphics/src/lib.rs +++ b/blade-graphics/src/lib.rs @@ -219,8 +219,10 @@ pub enum TextureFormat { Rg8Snorm, Rgba8Unorm, Rgba8UnormSrgb, + Bgra8Unorm, Bgra8UnormSrgb, Rgba8Snorm, + R16Float, Rgba16Float, R32Float, Rg32Float, diff --git a/blade-graphics/src/metal/mod.rs b/blade-graphics/src/metal/mod.rs index 2cf6c6ae..3e18f6ec 100644 --- a/blade-graphics/src/metal/mod.rs +++ b/blade-graphics/src/metal/mod.rs @@ -283,8 +283,10 @@ fn map_texture_format(format: crate::TextureFormat) -> metal::MTLPixelFormat { Tf::Rg8Snorm => RG8Snorm, Tf::Rgba8Unorm => RGBA8Unorm, Tf::Rgba8UnormSrgb => RGBA8Unorm_sRGB, + Tf::Bgra8Unorm => BGRA8Unorm, Tf::Bgra8UnormSrgb => BGRA8Unorm_sRGB, Tf::Rgba8Snorm => RGBA8Snorm, + Tf::R16Float => R16Float, Tf::Rgba16Float => RGBA16Float, Tf::R32Float => R32Float, Tf::Rg32Float => RG32Float, diff --git a/blade-graphics/src/util.rs b/blade-graphics/src/util.rs index 545face0..23e876e0 100644 --- a/blade-graphics/src/util.rs +++ b/blade-graphics/src/util.rs @@ -61,8 +61,10 @@ impl super::TextureFormat { Self::Rg8Snorm => uncompressed(2), Self::Rgba8Unorm => uncompressed(4), Self::Rgba8UnormSrgb => uncompressed(4), + Self::Bgra8Unorm => uncompressed(4), Self::Bgra8UnormSrgb => uncompressed(4), Self::Rgba8Snorm => uncompressed(4), + Self::R16Float => uncompressed(2), Self::Rgba16Float => uncompressed(8), Self::R32Float => uncompressed(4), Self::Rg32Float => uncompressed(8), diff --git a/blade-graphics/src/vulkan/mod.rs b/blade-graphics/src/vulkan/mod.rs index 7820a2d7..37d25c30 100644 --- a/blade-graphics/src/vulkan/mod.rs +++ b/blade-graphics/src/vulkan/mod.rs @@ -479,8 +479,10 @@ fn map_texture_format(format: crate::TextureFormat) -> vk::Format { Tf::Rg8Snorm => vk::Format::R8G8_SNORM, Tf::Rgba8Unorm => vk::Format::R8G8B8A8_UNORM, Tf::Rgba8UnormSrgb => vk::Format::R8G8B8A8_SRGB, + Tf::Bgra8Unorm => vk::Format::B8G8R8A8_UNORM, Tf::Bgra8UnormSrgb => vk::Format::B8G8R8A8_SRGB, Tf::Rgba8Snorm => vk::Format::R8G8B8A8_SNORM, + Tf::R16Float => vk::Format::R16_SFLOAT, Tf::Rgba16Float => vk::Format::R16G16B16A16_SFLOAT, Tf::R32Float => vk::Format::R32_SFLOAT, Tf::Rg32Float => vk::Format::R32G32_SFLOAT, From 421f303ecd9b1e1fb8858be1c0f0e899c5586305 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sun, 28 Jan 2024 01:17:49 -0800 Subject: [PATCH 3/5] Borrow the command encoder mutably for destruction instead of moving --- blade-graphics/src/gles/mod.rs | 2 +- blade-graphics/src/metal/mod.rs | 2 +- blade-graphics/src/traits.rs | 2 +- blade-graphics/src/vulkan/mod.rs | 4 ++-- blade-render/src/util/frame_pacer.rs | 13 ++++++------- examples/bunnymark/main.rs | 17 ++++++++--------- examples/init/main.rs | 2 +- examples/mini/main.rs | 2 +- examples/particle/main.rs | 24 +++++++++++------------- examples/ray-query/main.rs | 5 +++-- 10 files changed, 35 insertions(+), 38 deletions(-) diff --git a/blade-graphics/src/gles/mod.rs b/blade-graphics/src/gles/mod.rs index f9cc1899..36ad63f1 100644 --- a/blade-graphics/src/gles/mod.rs +++ b/blade-graphics/src/gles/mod.rs @@ -381,7 +381,7 @@ impl crate::traits::CommandDevice for Context { } } - fn destroy_command_encoder(&self, _command_encoder: CommandEncoder) {} + fn destroy_command_encoder(&self, _command_encoder: &mut CommandEncoder) {} fn submit(&self, encoder: &mut CommandEncoder) -> SyncPoint { { diff --git a/blade-graphics/src/metal/mod.rs b/blade-graphics/src/metal/mod.rs index 3e18f6ec..54319a6b 100644 --- a/blade-graphics/src/metal/mod.rs +++ b/blade-graphics/src/metal/mod.rs @@ -422,7 +422,7 @@ impl crate::traits::CommandDevice for Context { } } - fn destroy_command_encoder(&self, _command_encoder: CommandEncoder) {} + fn destroy_command_encoder(&self, _command_encoder: &mut CommandEncoder) {} fn submit(&self, encoder: &mut CommandEncoder) -> SyncPoint { let cmd_buf = encoder.raw.take().unwrap(); diff --git a/blade-graphics/src/traits.rs b/blade-graphics/src/traits.rs index 3ecfb0a0..43e14a1d 100644 --- a/blade-graphics/src/traits.rs +++ b/blade-graphics/src/traits.rs @@ -27,7 +27,7 @@ pub trait CommandDevice { type SyncPoint: Clone + Debug; fn create_command_encoder(&self, desc: super::CommandEncoderDesc) -> Self::CommandEncoder; - fn destroy_command_encoder(&self, encoder: Self::CommandEncoder); + fn destroy_command_encoder(&self, encoder: &mut Self::CommandEncoder); fn submit(&self, encoder: &mut Self::CommandEncoder) -> Self::SyncPoint; fn wait_for(&self, sp: &Self::SyncPoint, timeout_ms: u32) -> bool; } diff --git a/blade-graphics/src/vulkan/mod.rs b/blade-graphics/src/vulkan/mod.rs index 37d25c30..0772970c 100644 --- a/blade-graphics/src/vulkan/mod.rs +++ b/blade-graphics/src/vulkan/mod.rs @@ -380,7 +380,7 @@ impl crate::traits::CommandDevice for Context { } } - fn destroy_command_encoder(&self, command_encoder: CommandEncoder) { + fn destroy_command_encoder(&self, command_encoder: &mut CommandEncoder) { for cmd_buf in command_encoder.buffers.iter() { let raw_cmd_buffers = [cmd_buf.raw]; unsafe { @@ -397,7 +397,7 @@ impl crate::traits::CommandDevice for Context { .core .destroy_command_pool(command_encoder.pool, None) }; - if let Some(crash_handler) = command_encoder.crash_handler { + if let Some(crash_handler) = command_encoder.crash_handler.take() { self.destroy_buffer(crash_handler.marker_buf); }; } diff --git a/blade-render/src/util/frame_pacer.rs b/blade-render/src/util/frame_pacer.rs index 41938dee..2228c9c9 100644 --- a/blade-render/src/util/frame_pacer.rs +++ b/blade-render/src/util/frame_pacer.rs @@ -8,7 +8,7 @@ pub struct FramePacer { frame_index: usize, prev_resources: FrameResources, prev_sync_point: Option, - command_encoder: Option, + command_encoder: blade_graphics::CommandEncoder, next_resources: FrameResources, } @@ -22,7 +22,7 @@ impl FramePacer { frame_index: 0, prev_resources: FrameResources::default(), prev_sync_point: None, - command_encoder: Some(encoder), + command_encoder: encoder, next_resources: FrameResources::default(), } } @@ -46,17 +46,16 @@ impl FramePacer { pub fn destroy(&mut self, context: &blade_graphics::Context) { self.wait_for_previous_frame(context); - context.destroy_command_encoder(self.command_encoder.take().unwrap()); + context.destroy_command_encoder(&mut self.command_encoder); } pub fn begin_frame(&mut self) -> (&mut blade_graphics::CommandEncoder, &mut FrameResources) { - let encoder = self.command_encoder.as_mut().unwrap(); - encoder.start(); - (encoder, &mut self.next_resources) + self.command_encoder.start(); + (&mut self.command_encoder, &mut self.next_resources) } pub fn end_frame(&mut self, context: &blade_graphics::Context) -> &blade_graphics::SyncPoint { - let sync_point = context.submit(self.command_encoder.as_mut().unwrap()); + let sync_point = context.submit(&mut self.command_encoder); self.frame_index += 1; // Wait for the previous frame immediately - this ensures that we are // only processing one frame at a time, and yet not stalling. diff --git a/examples/bunnymark/main.rs b/examples/bunnymark/main.rs index 2d762d10..ef3a8ab3 100644 --- a/examples/bunnymark/main.rs +++ b/examples/bunnymark/main.rs @@ -39,7 +39,7 @@ struct Sprite { struct Example { pipeline: gpu::RenderPipeline, - command_encoder: Option, + command_encoder: gpu::CommandEncoder, prev_sync_point: Option, texture: gpu::Texture, view: gpu::TextureView, @@ -169,7 +169,7 @@ impl Example { Self { pipeline, - command_encoder: Some(command_encoder), + command_encoder, prev_sync_point: None, texture, view, @@ -223,11 +223,10 @@ impl Example { fn render(&mut self) { let frame = self.context.acquire_frame(); - let encoder = self.command_encoder.as_mut().unwrap(); - encoder.start(); - encoder.init_texture(frame.texture()); + self.command_encoder.start(); + self.command_encoder.init_texture(frame.texture()); - if let mut pass = encoder.render(gpu::RenderTargetSet { + if let mut pass = self.command_encoder.render(gpu::RenderTargetSet { colors: &[gpu::RenderTarget { view: frame.texture_view(), init_op: gpu::InitOp::Clear(gpu::TextureColor::TransparentBlack), @@ -259,8 +258,8 @@ impl Example { rc.draw(0, 4, 0, 1); } } - encoder.present(frame); - let sync_point = self.context.submit(encoder); + self.command_encoder.present(frame); + let sync_point = self.context.submit(&mut self.command_encoder); if let Some(sp) = self.prev_sync_point.take() { self.context.wait_for(&sp, !0); } @@ -273,7 +272,7 @@ impl Example { } self.context.destroy_texture(self.texture); self.context - .destroy_command_encoder(self.command_encoder.take().unwrap()); + .destroy_command_encoder(&mut self.command_encoder); } } diff --git a/examples/init/main.rs b/examples/init/main.rs index 5d6b713c..200a8d25 100644 --- a/examples/init/main.rs +++ b/examples/init/main.rs @@ -223,7 +223,7 @@ fn main() { let sync_point = context.submit(&mut command_encoder); context.wait_for(&sync_point, !0); - context.destroy_command_encoder(command_encoder); + context.destroy_command_encoder(&mut command_encoder); for buffer in temp_buffers { context.destroy_buffer(buffer); } diff --git a/examples/mini/main.rs b/examples/mini/main.rs index bbb4797e..8a8f3c07 100644 --- a/examples/mini/main.rs +++ b/examples/mini/main.rs @@ -167,7 +167,7 @@ fn main() { let answer = unsafe { *(result_buffer.data() as *mut u32) }; println!("Output: 0x{:x}", answer); - context.destroy_command_encoder(command_encoder); + context.destroy_command_encoder(&mut command_encoder); context.destroy_buffer(result_buffer); context.destroy_buffer(upload_buffer); for view in views { diff --git a/examples/particle/main.rs b/examples/particle/main.rs index 294a3df1..2b45eb3d 100644 --- a/examples/particle/main.rs +++ b/examples/particle/main.rs @@ -5,7 +5,7 @@ use blade_graphics as gpu; mod particle; struct Example { - command_encoder: Option, + command_encoder: gpu::CommandEncoder, prev_sync_point: Option, context: gpu::Context, gui_painter: blade_egui::GuiPainter, @@ -54,7 +54,7 @@ impl Example { let sync_point = context.submit(&mut command_encoder); Self { - command_encoder: Some(command_encoder), + command_encoder, prev_sync_point: Some(sync_point), context, gui_painter, @@ -66,8 +66,8 @@ impl Example { if let Some(sp) = self.prev_sync_point.take() { self.context.wait_for(&sp, !0); } - let encoder = self.command_encoder.take().unwrap(); - self.context.destroy_command_encoder(encoder); + self.context + .destroy_command_encoder(&mut self.command_encoder); self.gui_painter.destroy(&self.context); self.particle_system.destroy(&self.context); } @@ -79,17 +79,15 @@ impl Example { screen_desc: &blade_egui::ScreenDescriptor, ) { let frame = self.context.acquire_frame(); - let encoder = self.command_encoder.as_mut().unwrap(); - - encoder.start(); - encoder.init_texture(frame.texture()); + self.command_encoder.start(); + self.command_encoder.init_texture(frame.texture()); self.gui_painter - .update_textures(encoder, gui_textures, &self.context); + .update_textures(&mut self.command_encoder, gui_textures, &self.context); - self.particle_system.update(encoder); + self.particle_system.update(&mut self.command_encoder); - if let mut pass = encoder.render(gpu::RenderTargetSet { + if let mut pass = self.command_encoder.render(gpu::RenderTargetSet { colors: &[gpu::RenderTarget { view: frame.texture_view(), init_op: gpu::InitOp::Clear(gpu::TextureColor::TransparentBlack), @@ -101,8 +99,8 @@ impl Example { self.gui_painter .paint(&mut pass, gui_primitives, screen_desc, &self.context); } - encoder.present(frame); - let sync_point = self.context.submit(encoder); + self.command_encoder.present(frame); + let sync_point = self.context.submit(&mut self.command_encoder); self.gui_painter.after_submit(&sync_point); if let Some(sp) = self.prev_sync_point.take() { diff --git a/examples/ray-query/main.rs b/examples/ray-query/main.rs index 464a0034..377e015e 100644 --- a/examples/ray-query/main.rs +++ b/examples/ray-query/main.rs @@ -245,11 +245,12 @@ impl Example { } } - fn delete(self) { + fn delete(mut self) { if let Some(sp) = self.prev_sync_point { self.context.wait_for(&sp, !0); } - self.context.destroy_command_encoder(self.command_encoder); + self.context + .destroy_command_encoder(&mut self.command_encoder); self.context.destroy_texture_view(self.target_view); self.context.destroy_texture(self.target); self.context.destroy_acceleration_structure(self.blas); From 3793ddd0bf04f9dcdf9141662ee7254a90270dc4 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Thu, 1 Feb 2024 21:21:33 -0800 Subject: [PATCH 4/5] vulkan: fix the validation warning on resize --- blade-graphics/src/vulkan/init.rs | 34 ++++++++++++++++++++++++++++++- blade-graphics/src/vulkan/mod.rs | 3 ++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/blade-graphics/src/vulkan/init.rs b/blade-graphics/src/vulkan/init.rs index 7ef78687..c90541a2 100644 --- a/blade-graphics/src/vulkan/init.rs +++ b/blade-graphics/src/vulkan/init.rs @@ -287,6 +287,11 @@ impl super::Context { &entry, &core_instance, ), + surface: if surface_handles.is_some() { + Some(khr::Surface::new(&entry, &core_instance)) + } else { + None + }, core: core_instance, }; @@ -536,7 +541,7 @@ impl super::Context { last_progress, }), surface, - _physical_device: physical_device, + physical_device, naga_flags, instance, _entry: entry, @@ -587,7 +592,34 @@ impl super::Context { impl super::Context { pub fn resize(&self, config: crate::SurfaceConfig) -> crate::TextureFormat { + let surface_khr = self.instance.surface.as_ref().unwrap(); let mut surface = self.surface.as_ref().unwrap().lock().unwrap(); + + let capabilities = unsafe { + surface_khr + .get_physical_device_surface_capabilities(self.physical_device, surface.raw) + .unwrap() + }; + if config.size.width < capabilities.min_image_extent.width + || config.size.width > capabilities.max_image_extent.width + || config.size.height < capabilities.min_image_extent.height + || config.size.height > capabilities.max_image_extent.height + { + log::warn!( + "Requested size {}x{} is outside of surface capabilities", + config.size.width, + config.size.height + ); + } + if config.frame_count < capabilities.min_image_count + || config.frame_count > capabilities.max_image_count + { + log::warn!( + "Requested frame count {} is outside of surface capabilities", + config.frame_count + ); + } + let queue_families = [self.queue_family_index]; let format = crate::TextureFormat::Bgra8UnormSrgb; let vk_format = super::map_texture_format(format); diff --git a/blade-graphics/src/vulkan/mod.rs b/blade-graphics/src/vulkan/mod.rs index 0772970c..ae3bc92a 100644 --- a/blade-graphics/src/vulkan/mod.rs +++ b/blade-graphics/src/vulkan/mod.rs @@ -13,6 +13,7 @@ struct Instance { core: ash::Instance, debug_utils: ext::DebugUtils, get_physical_device_properties2: khr::GetPhysicalDeviceProperties2, + surface: Option, } #[derive(Clone)] @@ -101,7 +102,7 @@ pub struct Context { queue_family_index: u32, queue: Mutex, surface: Option>, - _physical_device: vk::PhysicalDevice, + physical_device: vk::PhysicalDevice, naga_flags: naga::back::spv::WriterFlags, instance: Instance, _entry: ash::Entry, From 4c4e200aed20d8e0b88e4bbdf1f7c694651b19c2 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sat, 3 Feb 2024 13:59:30 -0800 Subject: [PATCH 5/5] Fix del-msh version to avoid breakage from their non-semver --- Cargo.toml | 2 +- examples/ray-query/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e26fec6b..30417cf3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ egui-gizmo = "0.12" egui_plot = "0.23" egui-winit = "0.23" env_logger = "0.10" -del-msh = "0.1.22" +del-msh = "=0.1.24" # not following semver :( glam = { workspace = true } log = { workspace = true } mint = { workspace = true, features = ["serde"] } diff --git a/examples/ray-query/main.rs b/examples/ray-query/main.rs index 377e015e..9f9dbb4f 100644 --- a/examples/ray-query/main.rs +++ b/examples/ray-query/main.rs @@ -113,7 +113,7 @@ impl Example { }); let (indices_usize, vertex_values) = - del_msh::trimesh3_primitive::from_torus(TORUS_RADIUS, 1.0, 100, 20); + del_msh::trimesh3_primitive::torus_yup(TORUS_RADIUS, 1.0, 100, 20); let vertex_buf = context.create_buffer(gpu::BufferDesc { name: "vertices", size: (vertex_values.len() * mem::size_of::()) as u64,