A GameCube/Wii emulator and debugger written in Rust.
oopsies
Layle8a355d8787ed
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 9028a0e..86fb05a 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -56,6 +56,10 @@ jobs:sudo apt-get updatesudo apt-get install -y libwayland-dev libxkbcommon-dev libx11-dev libxi-dev libxrandr-dev libxcursor-dev libasound2-dev+ - name: Enable panic = abort for release builds+ shell: bash+ run: perl -pi -e 's/^# panic = "abort"$/panic = "abort"/' Cargo.toml+- name: Build debugger + multitool (release)run: cargo build --release --target ${{ matrix.target }} -p debugger -p multitooldiff --git a/Cargo.toml b/Cargo.tomlindex d62d242..55dff45 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -47,7 +47,7 @@ egui-winit = { git = "https://github.com/ioncodes/egui.git" }codegen-units = 1lto = "fat"debug = true-panic = "abort"+# panic = "abort"[profile.dev]opt-level = 3diff --git a/crates/backend-wgpu/src/action.rs b/crates/backend-wgpu/src/action.rsindex ac68415..96ffc56 100644--- a/crates/backend-wgpu/src/action.rs+++ b/crates/backend-wgpu/src/action.rs@@ -671,10 +671,12 @@ impl GxRenderer {let index_used = (self.scratch_indices.len() * std::mem::size_of::<u32>()) as u64;let index_off = self.draw_buffer_layout.index_offset;- rpass.set_index_buffer(- self.draw_buffer.slice(index_off..index_off + index_used),- wgpu::IndexFormat::Uint32,- );+ if index_used > 0 {+ rpass.set_index_buffer(+ self.draw_buffer.slice(index_off..index_off + index_used),+ wgpu::IndexFormat::Uint32,+ );+ }let mut last_pipeline_ptr: *const wgpu::RenderPipeline = std::ptr::null();let mut last_vertex_slice: Option<(u64, u64)> = None;@@ -748,9 +750,14 @@ impl GxRenderer {let vp_h = vp.h.clamp(1.0, max_dim);if vp.x.is_finite() && vp.y.is_finite() && vp_w.is_finite() && vp_h.is_finite() {- let vp_tuple = (vp.x, vp.y, vp_w, vp_h, vp.min_depth, vp.max_depth);+ let mut min_d = vp.min_depth.clamp(0.0, 1.0);+ let mut max_d = vp.max_depth.clamp(0.0, 1.0);+ if min_d > max_d {+ std::mem::swap(&mut min_d, &mut max_d);+ }+ let vp_tuple = (vp.x, vp.y, vp_w, vp_h, min_d, max_d);if last_viewport != Some(vp_tuple) {- rpass.set_viewport(vp.x, vp.y, vp_w, vp_h, vp.min_depth, vp.max_depth);+ rpass.set_viewport(vp.x, vp.y, vp_w, vp_h, min_d, max_d);last_viewport = Some(vp_tuple);}} else {diff --git a/crates/web/Cargo.lock b/crates/web/Cargo.lockindex 26f8430..3fc235c 100644--- a/crates/web/Cargo.lock+++ b/crates/web/Cargo.lock@@ -1086,6 +1086,7 @@ dependencies = ["image","multiversion","rustc-hash 2.1.2",+ "smallvec","tracing","twox-hash","zerocopy",