Skip to content

armgit / gecko

Public Imported from GitHub
0

A GameCube/Wii emulator and debugger written in Rust.

fix tev orders

Laylef68719bd9b18
diff --git a/crates/backend-wgpu/src/shader_specialization.rs b/crates/backend-wgpu/src/shader_specialization.rs
index a29d4f5..99f0802 100644
--- a/crates/backend-wgpu/src/shader_specialization.rs
+++ b/crates/backend-wgpu/src/shader_specialization.rs
@@ -43,6 +43,7 @@ impl ShaderKey {
let op = alpha_cmp.op();
let always_pass =
comp0 == CompareFunc::Always && comp1 == CompareFunc::Always && matches!(op, AlphaOp::And | AlphaOp::Or);
+
let mut stages = [StageKey::default(); 16];
for i in 0..num_tev_stages as usize {
stages[i] = StageKey {
@@ -52,6 +53,7 @@ impl ShaderKey {
ind_cmd: draw.tev_indirect[i],
};
}
+
Self {
num_tev_stages,
num_indirect_stages,
diff --git a/crates/gecko/src/host.rs b/crates/gecko/src/host.rs
index 4bc033c..81cb156 100644
--- a/crates/gecko/src/host.rs
+++ b/crates/gecko/src/host.rs
@@ -175,7 +175,7 @@ pub struct DrawData {
// TEV combiner state
pub tev_color_env: [u32; 16],
pub tev_alpha_env: [u32; 16],
- pub tev_orders: [u32; 8],
+ pub tev_orders: [u32; 16],
pub tev_ksel: [u32; 8],
pub tev_color_regs: [[f32; 4]; 4],
pub tev_konst_colors: [[f32; 4]; 16],