forked from 1b-agent/opencadstudio-upstream
Fix layout cache correctness and GPU resource recovery
This commit is contained in:
1 parent
1a4b389b0e
commit
ac8a545669
11 files changed
+352
-326
No files matched your search
@@ -159,6 +159,19 @@ impl HatchGpu {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn clear(&mut self) {
|
||||
match &mut self.backend {
|
||||
HatchBackend::Storage { resident, preview } => {
|
||||
resident.clear();
|
||||
preview.clear();
|
||||
}
|
||||
HatchBackend::Texture { resident, preview } => {
|
||||
resident.clear();
|
||||
preview.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn upload(&mut self, device: &wgpu::Device, queue: &wgpu::Queue, hatches: &[HatchModel]) {
|
||||
match &mut self.backend {
|
||||
HatchBackend::Storage { resident, .. } => {
|
||||
|
||||
Reference in new issue
Block a user