A GameCube/Wii emulator and debugger written in Rust.
logs
Layle700012d59515
diff --git a/crates/backend-wgpu/src/action.rs b/crates/backend-wgpu/src/action.rsindex d130009..e2699c5 100644--- a/crates/backend-wgpu/src/action.rs+++ b/crates/backend-wgpu/src/action.rs@@ -141,6 +141,7 @@ impl GxRenderer {triangulate_draw_data(draw, &mut self.scratch_vertices);let added = self.scratch_vertices.len() - prev_len;if added == 0 {+ tracing::warn!("draw call produced zero triangulated vertices, skipping");return;}@@ -375,6 +376,8 @@ 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() {rpass.set_viewport(vp.x, vp.y, vp_w, vp_h, vp.min_depth, vp.max_depth);+ } else {+ tracing::warn!(x = vp.x, y = vp.y, w = vp_w, h = vp_h, "non-finite viewport, skipping set_viewport");}let sc = &self.draw_scissors[index];@@ -433,6 +436,7 @@ fn triangulate_draw_data(draw: &DrawData, out: &mut Vec<GpuVertex>) {Primitive::Quads => {for quad in verts.chunks(4) {if quad.len() < 4 {+ tracing::error!(count = quad.len(), "quad primitive with less than 4 vertices, skipping");continue;}out.push(to_gpu(&quad[0]));diff --git a/crates/backend-wgpu/src/clear.rs b/crates/backend-wgpu/src/clear.rsindex 9f266b1..487553d 100644--- a/crates/backend-wgpu/src/clear.rs+++ b/crates/backend-wgpu/src/clear.rs@@ -127,6 +127,7 @@ impl EfbClear {depth: f32,) {if w == 0 || h == 0 {+ tracing::warn!(x, y, w, h, "clear: zero-area clear region, skipping");return;}let x = x.min(target_width);@@ -134,6 +135,7 @@ impl EfbClear {let w = w.min(target_width.saturating_sub(x));let h = h.min(target_height.saturating_sub(y));if w == 0 || h == 0 {+ tracing::warn!(x, y, w, h, "clear: zero-area after clamping to target, skipping");return;}diff --git a/crates/backend-wgpu/src/render.rs b/crates/backend-wgpu/src/render.rsindex f56297a..b4f3e41 100644--- a/crates/backend-wgpu/src/render.rs+++ b/crates/backend-wgpu/src/render.rs@@ -75,10 +75,9 @@ impl GxRenderer {let width = src_w.min(crate::EFB_WIDTH.saturating_sub(src_x));let height = src_h.min(crate::EFB_HEIGHT.saturating_sub(src_y));if width == 0 || height == 0 {+ tracing::warn!(src_x, src_y, src_w, src_h, "efb_copy: zero-area region after clamping, skipping");return;}-- // Create (or reuse) the temp texture for this copy id.let entry = self.xfb_copies.entry(id).or_insert_with(|| {let tex = device.create_texture(&wgpu::TextureDescriptor {label: Some("xfb_copy_tmp"),@@ -208,12 +207,14 @@ impl GxRenderer {for part in parts {let Some((tex, _)) = self.xfb_copies.get(&part.id) else {+ tracing::warn!(id = part.id, "present_xfb: XFB copy not found in cache, skipping part");continue;};let src_size = tex.size();let width = src_size.width.min(xfb_size.width.saturating_sub(part.offset_x));let height = src_size.height.min(xfb_size.height.saturating_sub(part.offset_y));if width == 0 || height == 0 {+ tracing::warn!(id = part.id, "present_xfb: zero-area XFB part after clamping, skipping");continue;}encoder.copy_texture_to_texture(diff --git a/crates/gecko/src/flipper/gx.rs b/crates/gecko/src/flipper/gx.rsindex 537b10a..d8a2f72 100644--- a/crates/gecko/src/flipper/gx.rs+++ b/crates/gecko/src/flipper/gx.rs@@ -152,6 +152,7 @@ pub fn present_xfb(gc: &mut GameCube) {let stride = gc.gx.xfb_copies[0].dest_stride as u32;let bytes_per_row = stride as u64 * 32;if bytes_per_row == 0 {+ tracing::warn!("present_xfb: zero bytes_per_row, dropping XFB copies");gc.gx.xfb_copies.clear();return;}@@ -196,6 +197,7 @@ pub fn present_xfb(gc: &mut GameCube) {};if parts.is_empty() {+ tracing::warn!("present_xfb: no XFB copies matched the frame buffer region");gc.gx.xfb_copies.clear();return;}diff --git a/crates/gecko/src/flipper/gx/bp.rs b/crates/gecko/src/flipper/gx/bp.rsindex e2ec90f..994dd63 100644--- a/crates/gecko/src/flipper/gx/bp.rs+++ b/crates/gecko/src/flipper/gx/bp.rs@@ -398,6 +398,7 @@ fn texture_data_changed() -> bool {let size = texture::raw_data_size(width, height, format);let Some(slice) = ram.get(addr..addr + size) else {+ tracing::warn!(addr, size, "texture_changed: RAM slice OOB, assuming changed");return true;};let hash = twox_hash::xxhash3_64::Hasher::oneshot(slice);diff --git a/crates/gecko/src/flipper/gx/texture.rs b/crates/gecko/src/flipper/gx/texture.rsindex d4c01bc..e125c12 100644--- a/crates/gecko/src/flipper/gx/texture.rs+++ b/crates/gecko/src/flipper/gx/texture.rs@@ -49,6 +49,7 @@ fn decode_i4(ram: &[u8], desc: &TextureDescriptor, rgba: &mut [u8], w: usize, h:let bcx = w.div_ceil(BW);let bcy = h.div_ceil(BH);if desc.ram_addr + bcx * bcy * BB > ram.len() {+ tracing::warn!(addr = desc.ram_addr, w, h, "decode_i4: texture OOB, skipping");return;}@@ -85,6 +86,7 @@ fn decode_i8(ram: &[u8], desc: &TextureDescriptor, rgba: &mut [u8], w: usize, h:let bcx = w.div_ceil(BW);let bcy = h.div_ceil(BH);if desc.ram_addr + bcx * bcy * BB > ram.len() {+ tracing::warn!(addr = desc.ram_addr, w, h, "decode_i8: texture OOB, skipping");return;}@@ -119,6 +121,7 @@ fn decode_ia4(ram: &[u8], desc: &TextureDescriptor, rgba: &mut [u8], w: usize, hlet bcx = w.div_ceil(BW);let bcy = h.div_ceil(BH);if desc.ram_addr + bcx * bcy * BB > ram.len() {+ tracing::warn!(addr = desc.ram_addr, w, h, "decode_ia4: texture OOB, skipping");return;}@@ -156,6 +159,7 @@ fn decode_ia8(ram: &[u8], desc: &TextureDescriptor, rgba: &mut [u8], w: usize, hlet bcy = h.div_ceil(BH);if desc.ram_addr + bcx * bcy * BB > ram.len() {+ tracing::warn!(addr = desc.ram_addr, w, h, "decode_ia8: texture OOB, skipping");return;}@@ -192,6 +196,7 @@ fn decode_rgb565(ram: &[u8], desc: &TextureDescriptor, rgba: &mut [u8], w: usizelet bcx = w.div_ceil(BW);let bcy = h.div_ceil(BH);if desc.ram_addr + bcx * bcy * BB > ram.len() {+ tracing::warn!(addr = desc.ram_addr, w, h, "decode_rgb565: texture OOB, skipping");return;}@@ -227,6 +232,7 @@ fn decode_rgb5a3(ram: &[u8], desc: &TextureDescriptor, rgba: &mut [u8], w: usizelet bcx = w.div_ceil(BW);let bcy = h.div_ceil(BH);if desc.ram_addr + bcx * bcy * BB > ram.len() {+ tracing::warn!(addr = desc.ram_addr, w, h, "decode_rgb5a3: texture OOB, skipping");return;}@@ -273,6 +279,7 @@ fn decode_rgba8(ram: &[u8], desc: &TextureDescriptor, rgba: &mut [u8], w: usize,let bcx = w.div_ceil(BW);let bcy = h.div_ceil(BH);if desc.ram_addr + bcx * bcy * BB > ram.len() {+ tracing::warn!(addr = desc.ram_addr, w, h, "decode_rgba8: texture OOB, skipping");return;}@@ -314,6 +321,7 @@ fn decode_cmpr(ram: &[u8], desc: &TextureDescriptor, rgba: &mut [u8], w: usize,let bcx = w.div_ceil(MW);let bcy = h.div_ceil(MH);if desc.ram_addr + bcx * bcy * MB > ram.len() {+ tracing::warn!(addr = desc.ram_addr, w, h, "decode_cmpr: texture OOB, skipping");return;}