Fix #6: Rendering Shared 3D Models #10

Merged
SeanOMik merged 11 commits from bug/6-rendering-shared-models into main 2024-04-01 15:03:02 +00:00
3 changed files with 12 additions and 12 deletions
Showing only changes of commit a39d259bb4 - Show all commits

View File

@ -19,7 +19,9 @@ impl Drop for ComponentColumn {
unsafe {
// TODO: trigger drop on the components
let layout = self.info.layout();
// SAFETY: The size of the data buffer is the capcity times the size of a component
let size = self.info.layout().size() * self.capacity;
let layout = Layout::from_size_align_unchecked(size, self.info.layout().align());
dealloc(data, layout);
}
}

View File

@ -1,4 +1,4 @@
[toolchain]
channel = "nightly"
date = "2023-11-21"
channel = "nightly-2023-11-21"
#date = "2023-11-21"
targets = [ "x86_64-unknown-linux-gnu" ]

View File

@ -1,6 +1,10 @@
let
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
nixpkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
rust_overlay = import (builtins.fetchTarball https://github.com/oxalica/rust-overlay/archive/master.tar.gz);
nixpkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
rust = (nixpkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override {
extensions = [ "rust-analysis" "rust-src" "miri-preview" ];
};
in
with nixpkgs;
stdenv.mkDerivation rec {
@ -15,13 +19,7 @@ in
mold
udev
lua5_4_compat
((nixpkgs.rustChannelOf { rustToolchain = ./rust-toolchain.toml; }).rust.override {
extensions = [
"rust-src"
"rust-analysis"
"miri-preview"
];
})
rust
];
buildInputs = [
udev alsa-lib libGL gcc