Skip to content

Commit

Permalink
vk: don't cleanup when panicking
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Sep 3, 2024
1 parent 07486b1 commit bf40d4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions blade-graphics/src/vulkan/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,9 @@ impl super::Surface {

impl Drop for super::Context {
fn drop(&mut self) {
if std::thread::panicking() {
return;
}
unsafe {
if let Some(surface_mutex) = self.surface.take() {
let mut surface = surface_mutex.into_inner().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion blade-render/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub use env_map::EnvironmentMap;

use std::{collections::HashMap, mem, num::NonZeroU32, path::Path, ptr};

const MAX_RESOURCES: u32 = 1000;
const MAX_RESOURCES: u32 = 8192;
const RADIANCE_FORMAT: blade_graphics::TextureFormat = blade_graphics::TextureFormat::Rgba16Float;

fn mat4_transform(t: &blade_graphics::Transform) -> glam::Mat4 {
Expand Down

0 comments on commit bf40d4f

Please sign in to comment.