Skip to content

armgit / gecko

Public Imported from GitHub
0

A GameCube/Wii emulator and debugger written in Rust.

alpha/blend + fps graph

Layle6037000cd42d
diff --git a/Cargo.lock b/Cargo.lock
index 891fdcb..6c2f1ca 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18,6 +18,18 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618"
+[[package]]
+name = "accesskit"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf203f9d3bd8f29f98833d1fbef628df18f759248a547e7e01cfbf63cda36a99"
+
+[[package]]
+name = "adler2"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
+
[[package]]
name = "ahash"
version = "0.8.12"
@@ -56,8 +68,8 @@ dependencies = [
"bitflags 2.11.0",
"cc",
"cesu8",
- "jni",
- "jni-sys",
+ "jni 0.21.1",
+ "jni-sys 0.3.0",
"libc",
"log",
"ndk",
@@ -132,6 +144,26 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "arboard"
+version = "3.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf"
+dependencies = [
+ "clipboard-win",
+ "image 0.25.10",
+ "log",
+ "objc2 0.6.4",
+ "objc2-app-kit 0.3.2",
+ "objc2-core-foundation",
+ "objc2-core-graphics",
+ "objc2-foundation 0.3.2",
+ "parking_lot",
+ "percent-encoding",
+ "windows-sys 0.59.0",
+ "x11rb",
+]
+
[[package]]
name = "arrayref"
version = "0.3.9"
@@ -225,7 +257,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
dependencies = [
- "objc2",
+ "objc2 0.5.2",
]
[[package]]
@@ -254,6 +286,12 @@ dependencies = [
"syn",
]
+[[package]]
+name = "byteorder-lite"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
+
[[package]]
name = "bytes"
version = "1.11.1"
@@ -274,18 +312,43 @@ dependencies = [
"thiserror 1.0.69",
]
+[[package]]
+name = "calloop"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7"
+dependencies = [
+ "bitflags 2.11.0",
+ "polling",
+ "rustix 1.1.4",
+ "slab",
+ "tracing",
+]
+
[[package]]
name = "calloop-wayland-source"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20"
dependencies = [
- "calloop",
+ "calloop 0.13.0",
"rustix 0.38.44",
"wayland-backend",
"wayland-client",
]
+[[package]]
+name = "calloop-wayland-source"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa"
+dependencies = [
+ "calloop 0.14.4",
+ "rustix 1.1.4",
+ "wayland-backend",
+ "wayland-client",
+]
+
[[package]]
name = "cc"
version = "1.2.56"
@@ -380,6 +443,15 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
+[[package]]
+name = "clipboard-win"
+version = "5.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4"
+dependencies = [
+ "error-code",
+]
+
[[package]]
name = "codespan-reporting"
version = "0.12.0"
@@ -391,6 +463,15 @@ dependencies = [
"unicode-width",
]
+[[package]]
+name = "color"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a18ef4657441fb193b65f34dc39b3781f0dfec23d3bd94d0eeb4e88cde421edb"
+dependencies = [
+ "bytemuck",
+]
+
[[package]]
name = "colorchoice"
version = "1.0.4"
@@ -497,6 +578,15 @@ dependencies = [
"libc",
]
+[[package]]
+name = "crc32fast"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
+dependencies = [
+ "cfg-if",
+]
+
[[package]]
name = "crossbeam-utils"
version = "0.8.21"
@@ -551,6 +641,27 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
+[[package]]
+name = "dispatch2"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"
+dependencies = [
+ "bitflags 2.11.0",
+ "objc2 0.6.4",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "dlib"
version = "0.5.3"
@@ -581,6 +692,114 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76"
+[[package]]
+name = "ecolor"
+version = "0.33.3"
+source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"
+dependencies = [
+ "bytemuck",
+ "emath",
+]
+
+[[package]]
+name = "egui"
+version = "0.33.3"
+source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"
+dependencies = [
+ "accesskit",
+ "ahash",
+ "bitflags 2.11.0",
+ "emath",
+ "epaint",
+ "log",
+ "nohash-hasher",
+ "profiling",
+ "smallvec",
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "egui-wgpu"
+version = "0.33.3"
+source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"
+dependencies = [
+ "ahash",
+ "bytemuck",
+ "document-features",
+ "epaint",
+ "log",
+ "profiling",
+ "thiserror 2.0.18",
+ "type-map",
+ "web-time",
+ "wgpu",
+]
+
+[[package]]
+name = "egui-winit"
+version = "0.33.3"
+source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"
+dependencies = [
+ "arboard",
+ "bytemuck",
+ "egui",
+ "log",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
+ "objc2-ui-kit",
+ "profiling",
+ "raw-window-handle",
+ "smithay-clipboard",
+ "web-time",
+ "webbrowser",
+ "winit",
+]
+
+[[package]]
+name = "egui_plot"
+version = "0.34.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67fc9b427a837264e55381a5cade6e28fe83ac5b165a61b9c888548c732a9c95"
+dependencies = [
+ "ahash",
+ "egui",
+ "emath",
+]
+
+[[package]]
+name = "emath"
+version = "0.33.3"
+source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"
+dependencies = [
+ "bytemuck",
+]
+
+[[package]]
+name = "epaint"
+version = "0.33.3"
+source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"
+dependencies = [
+ "ahash",
+ "bytemuck",
+ "ecolor",
+ "emath",
+ "epaint_default_fonts",
+ "font-types",
+ "log",
+ "nohash-hasher",
+ "parking_lot",
+ "profiling",
+ "self_cell",
+ "skrifa",
+ "smallvec",
+ "vello_cpu",
+]
+
+[[package]]
+name = "epaint_default_fonts"
+version = "0.33.3"
+source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"
+
[[package]]
name = "equivalent"
version = "1.0.2"
@@ -597,12 +816,75 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "error-code"
+version = "3.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59"
+
+[[package]]
+name = "euclid"
+version = "0.22.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "fax"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab"
+dependencies = [
+ "fax_derive",
+]
+
+[[package]]
+name = "fax_derive"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "fdeflate"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
+dependencies = [
+ "simd-adler32",
+]
+
+[[package]]
+name = "fearless_simd"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fb2907d1f08b2b316b9223ced5b0e89d87028ba8deae9764741dba8ff7f3903"
+dependencies = [
+ "bytemuck",
+]
+
[[package]]
name = "find-msvc-tools"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
+[[package]]
+name = "flate2"
+version = "1.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
[[package]]
name = "foldhash"
version = "0.1.5"
@@ -615,6 +897,15 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
+[[package]]
+name = "font-types"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1e4d2d0cf79d38430cc9dc9aadec84774bff2e1ba30ae2bf6c16cfce9385a23"
+dependencies = [
+ "bytemuck",
+]
+
[[package]]
name = "foreign-types"
version = "0.5.0"
@@ -642,6 +933,15 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
+[[package]]
+name = "form_urlencoded"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
+dependencies = [
+ "percent-encoding",
+]
+
[[package]]
name = "futures-core"
version = "0.3.32"
@@ -673,7 +973,7 @@ dependencies = [
"clap",
"comfy-table",
"disasm",
- "image",
+ "image 0.1.0",
]
[[package]]
@@ -682,7 +982,7 @@ version = "0.1.0"
dependencies = [
"chapa",
"chipi",
- "image",
+ "image 0.1.0",
"tracing",
]
@@ -751,7 +1051,7 @@ dependencies = [
"log",
"presser",
"thiserror 2.0.18",
- "windows 0.58.0",
+ "windows",
]
[[package]]
@@ -824,6 +1124,108 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
+[[package]]
+name = "icu_collections"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
+dependencies = [
+ "displaydoc",
+ "potential_utf",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locale_core"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
+dependencies = [
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
+dependencies = [
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
+
+[[package]]
+name = "icu_properties"
+version = "2.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
+dependencies = [
+ "icu_collections",
+ "icu_locale_core",
+ "icu_properties_data",
+ "icu_provider",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "2.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
+
+[[package]]
+name = "icu_provider"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
+dependencies = [
+ "displaydoc",
+ "icu_locale_core",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "idna"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
+dependencies = [
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
+]
+
+[[package]]
+name = "idna_adapter"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
+]
+
[[package]]
name = "image"
version = "0.1.0"
@@ -831,6 +1233,20 @@ dependencies = [
"object",
]
+[[package]]
+name = "image"
+version = "0.25.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104"
+dependencies = [
+ "bytemuck",
+ "byteorder-lite",
+ "moxcms",
+ "num-traits",
+ "png",
+ "tiff",
+]
+
[[package]]
name = "indexmap"
version = "2.13.0"
@@ -856,19 +1272,68 @@ dependencies = [
"cesu8",
"cfg-if",
"combine",
- "jni-sys",
+ "jni-sys 0.3.0",
"log",
"thiserror 1.0.69",
"walkdir",
"windows-sys 0.45.0",
]
+[[package]]
+name = "jni"
+version = "0.22.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "295dc9997acda1562fdf8d299f56063c936443b60f078e63a5d8d3c34ef2642b"
+dependencies = [
+ "cfg-if",
+ "combine",
+ "jni-macros",
+ "jni-sys 0.4.1",
+ "log",
+ "simd_cesu8",
+ "thiserror 2.0.18",
+ "walkdir",
+ "windows-link",
+]
+
+[[package]]
+name = "jni-macros"
+version = "0.22.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c3d1da60c95c98847b26b9d45f4360fee718b31de746df016d9cd6de916a7ef"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "rustc_version",
+ "simd_cesu8",
+ "syn",
+]
+
[[package]]
name = "jni-sys"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
+[[package]]
+name = "jni-sys"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"
+dependencies = [
+ "jni-sys-macros",
+]
+
+[[package]]
+name = "jni-sys-macros"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
+dependencies = [
+ "quote",
+ "syn",
+]
+
[[package]]
name = "jobserver"
version = "0.1.34"
@@ -906,6 +1371,17 @@ version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
+[[package]]
+name = "kurbo"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7564e90fe3c0d5771e1f0bc95322b21baaeaa0d9213fa6a0b61c99f8b17b3bfb"
+dependencies = [
+ "arrayvec",
+ "euclid",
+ "smallvec",
+]
+
[[package]]
name = "lazy_static"
version = "1.5.0"
@@ -946,6 +1422,12 @@ dependencies = [
"redox_syscall 0.7.3",
]
+[[package]]
+name = "linebender_resource_handle"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
+
[[package]]
name = "linux-raw-sys"
version = "0.4.15"
@@ -958,6 +1440,12 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
+[[package]]
+name = "litemap"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
+
[[package]]
name = "litrs"
version = "1.0.0"
@@ -1027,6 +1515,26 @@ dependencies = [
"paste",
]
+[[package]]
+name = "miniz_oxide"
+version = "0.8.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
+[[package]]
+name = "moxcms"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b"
+dependencies = [
+ "num-traits",
+ "pxfm",
+]
+
[[package]]
name = "naga"
version = "28.0.0"
@@ -1047,7 +1555,7 @@ dependencies = [
"log",
"num-traits",
"once_cell",
- "rustc-hash",
+ "rustc-hash 1.1.0",
"spirv",
"thiserror 2.0.18",
"unicode-ident",
@@ -1060,7 +1568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
dependencies = [
"bitflags 2.11.0",
- "jni-sys",
+ "jni-sys 0.3.0",
"log",
"ndk-sys",
"num_enum",
@@ -1080,9 +1588,15 @@ version = "0.6.0+11769913"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
dependencies = [
- "jni-sys",
+ "jni-sys 0.3.0",
]
+[[package]]
+name = "nohash-hasher"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
+
[[package]]
name = "nu-ansi-term"
version = "0.50.3"
@@ -1149,6 +1663,15 @@ dependencies = [
"objc2-encode",
]
+[[package]]
+name = "objc2"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
+dependencies = [
+ "objc2-encode",
+]
+
[[package]]
name = "objc2-app-kit"
version = "0.2.2"
@@ -1158,13 +1681,25 @@ dependencies = [
"bitflags 2.11.0",
"block2",
"libc",
- "objc2",
+ "objc2 0.5.2",
"objc2-core-data",
"objc2-core-image",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
"objc2-quartz-core",
]
+[[package]]
+name = "objc2-app-kit"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c"
+dependencies = [
+ "bitflags 2.11.0",
+ "objc2 0.6.4",
+ "objc2-core-graphics",
+ "objc2-foundation 0.3.2",
+]
+
[[package]]
name = "objc2-cloud-kit"
version = "0.2.2"
@@ -1173,9 +1708,9 @@ checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
dependencies = [
"bitflags 2.11.0",
"block2",
- "objc2",
+ "objc2 0.5.2",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -1185,8 +1720,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"
dependencies = [
"block2",
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -1197,8 +1732,32 @@ checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
dependencies = [
"bitflags 2.11.0",
"block2",
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
+]
+
+[[package]]
+name = "objc2-core-foundation"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
+dependencies = [
+ "bitflags 2.11.0",
+ "dispatch2",
+ "objc2 0.6.4",
+]
+
+[[package]]
+name = "objc2-core-graphics"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807"
+dependencies = [
+ "bitflags 2.11.0",
+ "dispatch2",
+ "objc2 0.6.4",
+ "objc2-core-foundation",
+ "objc2-io-surface",
]
[[package]]
@@ -1208,8 +1767,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"
dependencies = [
"block2",
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
"objc2-metal",
]
@@ -1220,9 +1779,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"
dependencies = [
"block2",
- "objc2",
+ "objc2 0.5.2",
"objc2-contacts",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -1241,7 +1800,29 @@ dependencies = [
"block2",
"dispatch",
"libc",
- "objc2",
+ "objc2 0.5.2",
+]
+
+[[package]]
+name = "objc2-foundation"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
+dependencies = [
+ "bitflags 2.11.0",
+ "objc2 0.6.4",
+ "objc2-core-foundation",
+]
+
+[[package]]
+name = "objc2-io-surface"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d"
+dependencies = [
+ "bitflags 2.11.0",
+ "objc2 0.6.4",
+ "objc2-core-foundation",
]
[[package]]
@@ -1251,9 +1832,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"
dependencies = [
"block2",
- "objc2",
- "objc2-app-kit",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-app-kit 0.2.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -1264,8 +1845,8 @@ checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
dependencies = [
"bitflags 2.11.0",
"block2",
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -1276,8 +1857,8 @@ checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
dependencies = [
"bitflags 2.11.0",
"block2",
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
"objc2-metal",
]
@@ -1287,8 +1868,8 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"
dependencies = [
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -1299,12 +1880,12 @@ checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
dependencies = [
"bitflags 2.11.0",
"block2",
- "objc2",
+ "objc2 0.5.2",
"objc2-cloud-kit",
"objc2-core-data",
"objc2-core-image",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
"objc2-link-presentation",
"objc2-quartz-core",
"objc2-symbols",
@@ -1319,8 +1900,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"
dependencies = [
"block2",
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -1331,9 +1912,9 @@ checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
dependencies = [
"bitflags 2.11.0",
"block2",
- "objc2",
+ "objc2 0.5.2",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -1414,6 +1995,19 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
+[[package]]
+name = "peniko"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2b6aadb221872732e87d465213e9be5af2849b0e8cc5300a8ba98fffa2e00a"
+dependencies = [
+ "bytemuck",
+ "color",
+ "kurbo",
+ "linebender_resource_handle",
+ "smallvec",
+]
+
[[package]]
name = "percent-encoding"
version = "2.3.2"
@@ -1458,6 +2052,19 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+[[package]]
+name = "png"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
+dependencies = [
+ "bitflags 2.11.0",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
+]
+
[[package]]
name = "polling"
version = "3.11.0"
@@ -1493,6 +2100,15 @@ dependencies = [
"portable-atomic",
]
+[[package]]
+name = "potential_utf"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
+dependencies = [
+ "zerovec",
+]
+
[[package]]
name = "presser"
version = "0.3.1"
@@ -1523,6 +2139,18 @@ version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773"
+[[package]]
+name = "pxfm"
+version = "0.1.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d"
+
+[[package]]
+name = "quick-error"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
+
[[package]]
name = "quick-xml"
version = "0.39.2"
@@ -1559,6 +2187,16 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
+[[package]]
+name = "read-fonts"
+version = "0.37.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5"
+dependencies = [
+ "bytemuck",
+ "font-types",
+]
+
[[package]]
name = "redox_syscall"
version = "0.4.1"
@@ -1615,6 +2253,21 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+[[package]]
+name = "rustc-hash"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
[[package]]
name = "rustix"
version = "0.38.44"
@@ -1677,10 +2330,22 @@ dependencies = [
"ab_glyph",
"log",
"memmap2",
- "smithay-client-toolkit",
+ "smithay-client-toolkit 0.19.2",
"tiny-skia",
]
+[[package]]
+name = "self_cell"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89"
+
+[[package]]
+name = "semver"
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
+
[[package]]
name = "serde"
version = "1.0.228"
@@ -1726,6 +2391,38 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "simd-adler32"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
+
+[[package]]
+name = "simd_cesu8"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33"
+dependencies = [
+ "rustc_version",
+ "simdutf8",
+]
+
+[[package]]
+name = "simdutf8"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
+
+[[package]]
+name = "skrifa"
+version = "0.40.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac"
+dependencies = [
+ "bytemuck",
+ "read-fonts",
+]
+
[[package]]
name = "slab"
version = "0.4.12"
@@ -1754,8 +2451,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016"
dependencies = [
"bitflags 2.11.0",
- "calloop",
- "calloop-wayland-source",
+ "calloop 0.13.0",
+ "calloop-wayland-source 0.3.0",
"cursor-icon",
"libc",
"log",
@@ -1772,6 +2469,44 @@ dependencies = [
"xkeysym",
]
+[[package]]
+name = "smithay-client-toolkit"
+version = "0.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0"
+dependencies = [
+ "bitflags 2.11.0",
+ "calloop 0.14.4",
+ "calloop-wayland-source 0.4.1",
+ "cursor-icon",
+ "libc",
+ "log",
+ "memmap2",
+ "rustix 1.1.4",
+ "thiserror 2.0.18",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-csd-frame",
+ "wayland-cursor",
+ "wayland-protocols",
+ "wayland-protocols-experimental",
+ "wayland-protocols-misc",
+ "wayland-protocols-wlr",
+ "wayland-scanner",
+ "xkeysym",
+]
+
+[[package]]
+name = "smithay-clipboard"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226"
+dependencies = [
+ "libc",
+ "smithay-client-toolkit 0.20.0",
+ "wayland-backend",
+]
+
[[package]]
name = "smol_str"
version = "0.2.2"
@@ -1790,6 +2525,12 @@ dependencies = [
"bitflags 2.11.0",
]
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
+
[[package]]
name = "static_assertions"
version = "1.1.0"
@@ -1819,6 +2560,17 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "synstructure"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "termcolor"
version = "1.4.1"
@@ -1877,6 +2629,20 @@ dependencies = [
"cfg-if",
]
+[[package]]
+name = "tiff"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52"
+dependencies = [
+ "fax",
+ "flate2",
+ "half",
+ "quick-error",
+ "weezl",
+ "zune-jpeg",
+]
+
[[package]]
name = "tiny-skia"
version = "0.11.4"
@@ -1907,8 +2673,13 @@ name = "tinyapp"
version = "0.1.0"
dependencies = [
"backend-wgpu",
+ "bytemuck",
+ "egui",
+ "egui-wgpu",
+ "egui-winit",
+ "egui_plot",
"gekko",
- "image",
+ "image 0.1.0",
"pollster",
"wgpu",
"winit",
@@ -1923,11 +2694,21 @@ dependencies = [
"colored",
"disasm",
"gekko",
- "image",
+ "image 0.1.0",
"tracing",
"tracing-subscriber",
]
+[[package]]
+name = "tinystr"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
[[package]]
name = "toml_datetime"
version = "1.0.0+spec-1.1.0"
@@ -1964,6 +2745,7 @@ version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
+ "log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@@ -2025,6 +2807,15 @@ version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"
+[[package]]
+name = "type-map"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90"
+dependencies = [
+ "rustc-hash 2.1.1",
+]
+
[[package]]
name = "unicode-ident"
version = "1.0.24"
@@ -2043,6 +2834,24 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
+[[package]]
+name = "url"
+version = "2.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "utf8_iter"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
+
[[package]]
name = "utf8parse"
version = "0.2.2"
@@ -2055,6 +2864,32 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
+[[package]]
+name = "vello_common"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bd1a4c633ce09e7d713df1a6e036644a125e15e0c169cfb5180ddf5836ca04b"
+dependencies = [
+ "bytemuck",
+ "fearless_simd",
+ "hashbrown 0.16.1",
+ "log",
+ "peniko",
+ "skrifa",
+ "smallvec",
+]
+
+[[package]]
+name = "vello_cpu"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0162bfe48aabf6a9fdcd401b628c7d9f260c2cbabb343c70a65feba6f7849edc"
+dependencies = [
+ "bytemuck",
+ "hashbrown 0.16.1",
+ "vello_common",
+]
+
[[package]]
name = "version_check"
version = "0.9.5"
@@ -2199,6 +3034,32 @@ dependencies = [
"wayland-scanner",
]
+[[package]]
+name = "wayland-protocols-experimental"
+version = "20250721.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1"
+dependencies = [
+ "bitflags 2.11.0",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-protocols-misc"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "429b99200febaf95d4f4e46deff6fe4382bcff3280ee16a41cf887b3c3364984"
+dependencies = [
+ "bitflags 2.11.0",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols",
+ "wayland-scanner",
+]
+
[[package]]
name = "wayland-protocols-plasma"
version = "0.3.11"
@@ -2268,6 +3129,28 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "webbrowser"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe985f41e291eecef5e5c0770a18d28390addb03331c043964d9e916453d6f16"
+dependencies = [
+ "core-foundation 0.10.1",
+ "jni 0.22.3",
+ "log",
+ "ndk-context",
+ "objc2 0.6.4",
+ "objc2-foundation 0.3.2",
+ "url",
+ "web-sys",
+]
+
+[[package]]
+name = "weezl"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88"
+
[[package]]
name = "wgpu"
version = "28.0.0"
@@ -2320,7 +3203,7 @@ dependencies = [
"portable-atomic",
"profiling",
"raw-window-handle",
- "rustc-hash",
+ "rustc-hash 1.1.0",
"smallvec",
"thiserror 2.0.18",
"wgpu-core-deps-apple",
@@ -2401,8 +3284,8 @@ dependencies = [
"wasm-bindgen",
"web-sys",
"wgpu-types",
- "windows 0.62.2",
- "windows-core 0.62.2",
+ "windows",
+ "windows-core",
]
[[package]]
@@ -2449,16 +3332,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
-[[package]]
-name = "windows"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
-dependencies = [
- "windows-core 0.58.0",
- "windows-targets 0.52.6",
-]
-
[[package]]
name = "windows"
version = "0.62.2"
@@ -2466,7 +3339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
dependencies = [
"windows-collections",
- "windows-core 0.62.2",
+ "windows-core",
"windows-future",
"windows-numerics",
]
@@ -2477,20 +3350,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
dependencies = [
- "windows-core 0.62.2",
-]
-
-[[package]]
-name = "windows-core"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
-dependencies = [
- "windows-implement 0.58.0",
- "windows-interface 0.58.0",
- "windows-result 0.2.0",
- "windows-strings 0.1.0",
- "windows-targets 0.52.6",
+ "windows-core",
]
[[package]]
@@ -2499,11 +3359,11 @@ version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [
- "windows-implement 0.60.2",
- "windows-interface 0.59.3",
+ "windows-implement",
+ "windows-interface",
"windows-link",
- "windows-result 0.4.1",
- "windows-strings 0.5.1",
+ "windows-result",
+ "windows-strings",
]
[[package]]
@@ -2512,22 +3372,11 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
dependencies = [
- "windows-core 0.62.2",
+ "windows-core",
"windows-link",
"windows-threading",
]
-[[package]]
-name = "windows-implement"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "windows-implement"
version = "0.60.2"
@@ -2539,17 +3388,6 @@ dependencies = [
"syn",
]
-[[package]]
-name = "windows-interface"
-version = "0.58.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "windows-interface"
version = "0.59.3"
@@ -2573,19 +3411,10 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
dependencies = [
- "windows-core 0.62.2",
+ "windows-core",
"windows-link",
]
-[[package]]
-name = "windows-result"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
-dependencies = [
- "windows-targets 0.52.6",
-]
-
[[package]]
name = "windows-result"
version = "0.4.1"
@@ -2595,16 +3424,6 @@ dependencies = [
"windows-link",
]
-[[package]]
-name = "windows-strings"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
-dependencies = [
- "windows-result 0.2.0",
- "windows-targets 0.52.6",
-]
-
[[package]]
name = "windows-strings"
version = "0.5.1"
@@ -2792,7 +3611,7 @@ dependencies = [
"bitflags 2.11.0",
"block2",
"bytemuck",
- "calloop",
+ "calloop 0.13.0",
"cfg_aliases",
"concurrent-queue",
"core-foundation 0.9.4",
@@ -2803,9 +3622,9 @@ dependencies = [
"libc",
"memmap2",
"ndk",
- "objc2",
- "objc2-app-kit",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-app-kit 0.2.2",
+ "objc2-foundation 0.2.2",
"objc2-ui-kit",
"orbclient",
"percent-encoding",
@@ -2814,7 +3633,7 @@ dependencies = [
"redox_syscall 0.4.1",
"rustix 0.38.44",
"sctk-adwaita",
- "smithay-client-toolkit",
+ "smithay-client-toolkit 0.19.2",
"smol_str",
"tracing",
"unicode-segmentation",
@@ -2847,6 +3666,12 @@ version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
+[[package]]
+name = "writeable"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
+
[[package]]
name = "x11-dl"
version = "2.21.0"
@@ -2910,6 +3735,29 @@ version = "0.8.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f"
+[[package]]
+name = "yoke"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
+dependencies = [
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
+
[[package]]
name = "zerocopy"
version = "0.8.42"
@@ -2929,3 +3777,72 @@ dependencies = [
"quote",
"syn",
]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
+
+[[package]]
+name = "zerotrie"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+]
+
+[[package]]
+name = "zerovec"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zune-core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9"
+
+[[package]]
+name = "zune-jpeg"
+version = "0.5.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec5f41c76397b7da451efd19915684f727d7e1d516384ca6bd0ec43ec94de23c"
+dependencies = [
+ "zune-core",
+]
diff --git a/Cargo.toml b/Cargo.toml
index 4e32944..6c66e90 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,22 @@
[workspace]
resolver = "3"
-members = ["crates/gctool", "crates/disasm", "crates/gekko", "crates/tinyemu", "crates/image", "crates/tinyapp", "crates/backend-wgpu"]
+members = [
+ "crates/gctool",
+ "crates/disasm",
+ "crates/gekko",
+ "crates/tinyemu",
+ "crates/image",
+ "crates/tinyapp",
+ "crates/backend-wgpu",
+]
+
+[patch.crates-io]
+egui = { git = "https://github.com/ioncodes/egui.git" }
+epaint = { git = "https://github.com/ioncodes/egui.git" }
+emath = { git = "https://github.com/ioncodes/egui.git" }
+ecolor = { git = "https://github.com/ioncodes/egui.git" }
+egui-wgpu = { git = "https://github.com/ioncodes/egui.git" }
+egui-winit = { git = "https://github.com/ioncodes/egui.git" }
[profile.release]
lto = "fat"
diff --git a/crates/backend-wgpu/src/gx.wgsl b/crates/backend-wgpu/src/gx.wgsl
index 138d884..fc9d192 100644
--- a/crates/backend-wgpu/src/gx.wgsl
+++ b/crates/backend-wgpu/src/gx.wgsl
@@ -1,7 +1,11 @@
struct Uniforms {
mvp: mat4x4<f32>,
- has_texture: u32,
- _pad: vec3<u32>,
+ tev_color_source: u32, // 0 = vertex color, 1 = texture
+ alpha_ref0: f32,
+ alpha_ref1: f32,
+ alpha_comp0: u32, // CompareFunc (0=Never..7=Always)
+ alpha_comp1: u32,
+ alpha_op: u32, // AlphaOp (0=AND, 1=OR, 2=XOR, 3=XNOR)
};
@group(0) @binding(0)
@@ -36,12 +40,44 @@ fn vs_main(in: VsIn) -> VsOut {
return out;
}
+fn alpha_compare(a: f32, ref_val: f32, func: u32) -> bool {
+ switch func {
+ case 0u: { return false; } // Never
+ case 1u: { return a < ref_val; } // Less
+ case 2u: { return a == ref_val; } // Equal
+ case 3u: { return a <= ref_val; } // LessEqual
+ case 4u: { return a > ref_val; } // Greater
+ case 5u: { return a != ref_val; } // NotEqual
+ case 6u: { return a >= ref_val; } // GreaterEqual
+ case 7u: { return true; } // Always
+ default: { return true; }
+ }
+}
+
+fn alpha_combine(a: bool, b: bool, op: u32) -> bool {
+ switch op {
+ case 0u: { return a && b; } // AND
+ case 1u: { return a || b; } // OR
+ case 2u: { return a != b; } // XOR
+ case 3u: { return a == b; } // XNOR
+ default: { return true; }
+ }
+}
+
@fragment
fn fs_main(in: VsOut) -> @location(0) vec4<f32> {
- // TODO: pretty sure this is wrong but it works for texturetest.dol
- if uniforms.has_texture == 1u {
- return textureSample(tex, tex_sampler, in.tex0);
+ var color: vec4<f32>;
+ if uniforms.tev_color_source == 1u {
+ color = textureSample(tex, tex_sampler, in.tex0);
} else {
- return in.color;
+ color = in.color;
+ }
+
+ let c0 = alpha_compare(color.a, uniforms.alpha_ref0, uniforms.alpha_comp0);
+ let c1 = alpha_compare(color.a, uniforms.alpha_ref1, uniforms.alpha_comp1);
+ if !alpha_combine(c0, c1, uniforms.alpha_op) {
+ discard;
}
+
+ return color;
}
diff --git a/crates/backend-wgpu/src/lib.rs b/crates/backend-wgpu/src/lib.rs
index ce6eb65..562a2d6 100644
--- a/crates/backend-wgpu/src/lib.rs
+++ b/crates/backend-wgpu/src/lib.rs
@@ -1,6 +1,7 @@
mod texture;
use gekko::flipper::gx::draw::{DrawCall, DrawCommands, Primitive, TextureFormat};
+use gekko::flipper::gx::regs::{BlendFactor, CompareFunc};
use std::collections::HashMap;
#[repr(C)]
@@ -24,15 +25,76 @@ impl From<&gekko::flipper::gx::draw::Vertex> for GpuVertex {
#[repr(C)]
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
struct Uniforms {
- mvp: [[f32; 4]; 4], // 64 bytes
- has_texture: u32, // 4 bytes
- _padding: [u8; 28], // 28 bytes
+ mvp: [[f32; 4]; 4],
+ tev_color_source: u32, // 0 = vertex color, 1 = texture
+ alpha_ref0: f32,
+ alpha_ref1: f32,
+ alpha_comp0: u32, // CompareFunc as u32
+ alpha_comp1: u32,
+ alpha_op: u32, // AlphaOp as u32
+ _padding: [u32; 2],
}
const SHADER: &str = include_str!("gx.wgsl");
+#[derive(Clone, Copy, Hash, PartialEq, Eq)]
+struct PipelineKey {
+ blend_enable: bool,
+ src_factor: BlendFactor,
+ dst_factor: BlendFactor,
+ subtract: bool,
+ z_enable: bool,
+ z_func: CompareFunc,
+ z_write: bool,
+}
+
+impl PipelineKey {
+ fn from_draw_commands(commands: &DrawCommands) -> Self {
+ let blend = commands.bp_blend_mode;
+ let zmode = commands.bp_zmode;
+ PipelineKey {
+ blend_enable: blend.blend_enable(),
+ src_factor: blend.src_factor(),
+ dst_factor: blend.dst_factor(),
+ subtract: blend.subtract(),
+ z_enable: zmode.enable(),
+ z_func: zmode.func(),
+ z_write: zmode.update_enable(),
+ }
+ }
+}
+
+fn map_blend_factor(f: BlendFactor) -> wgpu::BlendFactor {
+ match f {
+ BlendFactor::Zero => wgpu::BlendFactor::Zero,
+ BlendFactor::One => wgpu::BlendFactor::One,
+ BlendFactor::SrcClr => wgpu::BlendFactor::Src,
+ BlendFactor::InvSrcClr => wgpu::BlendFactor::OneMinusSrc,
+ BlendFactor::SrcAlpha => wgpu::BlendFactor::SrcAlpha,
+ BlendFactor::InvSrcAlpha => wgpu::BlendFactor::OneMinusSrcAlpha,
+ BlendFactor::DstAlpha => wgpu::BlendFactor::DstAlpha,
+ BlendFactor::InvDstAlpha => wgpu::BlendFactor::OneMinusDstAlpha,
+ }
+}
+
+fn map_compare_func(f: CompareFunc) -> wgpu::CompareFunction {
+ match f {
+ CompareFunc::Never => wgpu::CompareFunction::Never,
+ CompareFunc::Less => wgpu::CompareFunction::Less,
+ CompareFunc::Equal => wgpu::CompareFunction::Equal,
+ CompareFunc::LessEqual => wgpu::CompareFunction::LessEqual,
+ CompareFunc::Greater => wgpu::CompareFunction::Greater,
+ CompareFunc::NotEqual => wgpu::CompareFunction::NotEqual,
+ CompareFunc::GreaterEqual => wgpu::CompareFunction::GreaterEqual,
+ CompareFunc::Always => wgpu::CompareFunction::Always,
+ }
+}
+
pub struct GxRenderer {
- pipeline: wgpu::RenderPipeline,
+ pipeline_cache: HashMap<PipelineKey, wgpu::RenderPipeline>,
+ shader: wgpu::ShaderModule,
+ pipeline_layout: wgpu::PipelineLayout,
+ surface_format: wgpu::TextureFormat,
bind_group_layout: wgpu::BindGroupLayout,
bind_group: wgpu::BindGroup,
uniform_buffer: wgpu::Buffer,
@@ -100,65 +162,6 @@ impl GxRenderer {
immediate_size: 0,
});
- let vertex_layout = wgpu::VertexBufferLayout {
- array_stride: std::mem::size_of::<GpuVertex>() as u64,
- step_mode: wgpu::VertexStepMode::Vertex,
- attributes: &[
- wgpu::VertexAttribute {
- format: wgpu::VertexFormat::Float32x3,
- offset: 0,
- shader_location: 0,
- },
- wgpu::VertexAttribute {
- format: wgpu::VertexFormat::Float32x4,
- offset: 12,
- shader_location: 1,
- },
- wgpu::VertexAttribute {
- format: wgpu::VertexFormat::Float32x2,
- offset: 28,
- shader_location: 2,
- },
- ],
- };
-
- let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
- label: Some("gx_pipeline"),
- layout: Some(&pipeline_layout),
- vertex: wgpu::VertexState {
- module: &shader,
- entry_point: Some("vs_main"),
- buffers: &[vertex_layout],
- compilation_options: Default::default(),
- },
- fragment: Some(wgpu::FragmentState {
- module: &shader,
- entry_point: Some("fs_main"),
- targets: &[Some(wgpu::ColorTargetState {
- format: surface_format,
- blend: None,
- write_mask: wgpu::ColorWrites::ALL,
- })],
- compilation_options: Default::default(),
- }),
- primitive: wgpu::PrimitiveState {
- topology: wgpu::PrimitiveTopology::TriangleList,
- front_face: wgpu::FrontFace::Cw,
- cull_mode: None,
- ..Default::default()
- },
- depth_stencil: Some(wgpu::DepthStencilState {
- format: wgpu::TextureFormat::Depth24Plus,
- depth_write_enabled: true,
- depth_compare: wgpu::CompareFunction::LessEqual,
- stencil: wgpu::StencilState::default(),
- bias: wgpu::DepthBiasState::default(),
- }),
- multisample: wgpu::MultisampleState::default(),
- multiview_mask: None,
- cache: None,
- });
-
let uniform_buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some("gx_uniforms"),
size: std::mem::size_of::<Uniforms>() as u64,
@@ -238,7 +241,10 @@ impl GxRenderer {
let (depth_texture, depth_view) = create_depth_texture(device, depth_width, depth_height);
GxRenderer {
- pipeline,
+ pipeline_cache: HashMap::new(),
+ shader,
+ pipeline_layout,
+ surface_format,
bind_group_layout,
bind_group,
uniform_buffer,
@@ -271,6 +277,101 @@ impl GxRenderer {
self.depth_height = height;
}
+ fn create_pipeline(&self, device: &wgpu::Device, key: &PipelineKey) -> wgpu::RenderPipeline {
+ let vertex_layout = wgpu::VertexBufferLayout {
+ array_stride: std::mem::size_of::<GpuVertex>() as u64,
+ step_mode: wgpu::VertexStepMode::Vertex,
+ attributes: &[
+ wgpu::VertexAttribute {
+ format: wgpu::VertexFormat::Float32x3,
+ offset: 0,
+ shader_location: 0,
+ },
+ wgpu::VertexAttribute {
+ format: wgpu::VertexFormat::Float32x4,
+ offset: 12,
+ shader_location: 1,
+ },
+ wgpu::VertexAttribute {
+ format: wgpu::VertexFormat::Float32x2,
+ offset: 28,
+ shader_location: 2,
+ },
+ ],
+ };
+
+ let blend = if key.blend_enable {
+ let operation = if key.subtract {
+ wgpu::BlendOperation::ReverseSubtract
+ } else {
+ wgpu::BlendOperation::Add
+ };
+ Some(wgpu::BlendState {
+ color: wgpu::BlendComponent {
+ src_factor: map_blend_factor(key.src_factor),
+ dst_factor: map_blend_factor(key.dst_factor),
+ operation,
+ },
+ alpha: wgpu::BlendComponent {
+ src_factor: map_blend_factor(key.src_factor),
+ dst_factor: map_blend_factor(key.dst_factor),
+ operation,
+ },
+ })
+ } else {
+ None
+ };
+
+ let depth_stencil = if key.z_enable {
+ Some(wgpu::DepthStencilState {
+ format: wgpu::TextureFormat::Depth24Plus,
+ depth_write_enabled: key.z_write,
+ depth_compare: map_compare_func(key.z_func),
+ stencil: wgpu::StencilState::default(),
+ bias: wgpu::DepthBiasState::default(),
+ })
+ } else {
+ Some(wgpu::DepthStencilState {
+ format: wgpu::TextureFormat::Depth24Plus,
+ depth_write_enabled: false,
+ depth_compare: wgpu::CompareFunction::Always,
+ stencil: wgpu::StencilState::default(),
+ bias: wgpu::DepthBiasState::default(),
+ })
+ };
+
+ device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
+ label: Some("gx_pipeline"),
+ layout: Some(&self.pipeline_layout),
+ vertex: wgpu::VertexState {
+ module: &self.shader,
+ entry_point: Some("vs_main"),
+ buffers: &[vertex_layout],
+ compilation_options: Default::default(),
+ },
+ fragment: Some(wgpu::FragmentState {
+ module: &self.shader,
+ entry_point: Some("fs_main"),
+ targets: &[Some(wgpu::ColorTargetState {
+ format: self.surface_format,
+ blend,
+ write_mask: wgpu::ColorWrites::ALL,
+ })],
+ compilation_options: Default::default(),
+ }),
+ primitive: wgpu::PrimitiveState {
+ topology: wgpu::PrimitiveTopology::TriangleList,
+ front_face: wgpu::FrontFace::Cw,
+ cull_mode: None,
+ ..Default::default()
+ },
+ depth_stencil,
+ multisample: wgpu::MultisampleState::default(),
+ multiview_mask: None,
+ cache: None,
+ })
+ }
+
pub fn render(
&mut self,
device: &wgpu::Device,
@@ -284,17 +385,33 @@ impl GxRenderer {
self.ensure_depth_texture(device, target_width, target_height);
let mvp = commands.projection * commands.modelview;
- let has_texture = commands.textures[0].is_some() as u32;
+ let tev_color_source = commands.textures[0].is_some() as u32;
+
+ let alpha_cmp = commands.bp_alpha_compare;
+
queue.write_buffer(
&self.uniform_buffer,
0,
bytemuck::bytes_of(&Uniforms {
mvp: mvp.0,
- has_texture,
- _padding: [0; 28],
+ tev_color_source,
+ alpha_ref0: alpha_cmp.ref0() as f32 / 255.0,
+ alpha_ref1: alpha_cmp.ref1() as f32 / 255.0,
+ alpha_comp0: alpha_cmp.comp0() as u32,
+ alpha_comp1: alpha_cmp.comp1() as u32,
+ alpha_op: alpha_cmp.op() as u32,
+ _padding: [0; 2],
}),
);
+ // Get or create the pipeline for current blend/z state
+ let pipeline_key = PipelineKey::from_draw_commands(commands);
+ if !self.pipeline_cache.contains_key(&pipeline_key) {
+ let pipeline = self.create_pipeline(device, &pipeline_key);
+ self.pipeline_cache.insert(pipeline_key, pipeline);
+ }
+ let pipeline = &self.pipeline_cache[&pipeline_key];
+
// Upload texture slot 0 if present, using cache to avoid redundant uploads
let tex_view = if let Some(desc) = &commands.textures[0] {
let key = (desc.ram_addr, desc.width, desc.height, desc.format);
@@ -368,7 +485,7 @@ impl GxRenderer {
timestamp_writes: None,
multiview_mask: None,
});
- rpass.set_pipeline(&self.pipeline);
+ rpass.set_pipeline(pipeline);
rpass.set_bind_group(0, &self.bind_group, &[]);
rpass.set_vertex_buffer(0, self.vertex_buffer.slice(..));
rpass.draw(0..vertices.len() as u32, 0..1);
diff --git a/crates/gekko/src/flipper/gx.rs b/crates/gekko/src/flipper/gx.rs
index 2a2a4cb..68ce9bb 100644
--- a/crates/gekko/src/flipper/gx.rs
+++ b/crates/gekko/src/flipper/gx.rs
@@ -7,13 +7,13 @@ use super::pi::InterruptFlag;
use crate::{
flipper::gx::{
constants::{
- ARRAY_BASE_REG, ARRAY_CLR0, ARRAY_POS, ARRAY_STRIDE_REG, BP_PE_DONE, BP_PE_DONE_FINISH_BIT, BP_REG_SIZE,
- BP_TX_SETIMAGE0_I0, BP_TX_SETIMAGE0_I4, BP_TX_SETIMAGE3_I0, BP_TX_SETIMAGE3_I4, CP_REG_SIZE, VATA_REG,
- VCD_HI_REG, VCD_LO_REG, XF_MEM_SIZE, XF_MODELVIEW_BASE, XF_MODELVIEW_END, XF_PROJECTION_BASE,
- XF_PROJECTION_END,
+ ARRAY_BASE_REG, ARRAY_CLR0, ARRAY_POS, ARRAY_STRIDE_REG, BP_PE_ALPHA_COMPARE, BP_PE_CMODE0, BP_PE_DONE,
+ BP_PE_DONE_FINISH_BIT, BP_PE_ZMODE, BP_REG_SIZE, BP_TX_SETIMAGE0_I0, BP_TX_SETIMAGE0_I4,
+ BP_TX_SETIMAGE3_I0, BP_TX_SETIMAGE3_I4, CP_REG_SIZE, VATA_REG, VCD_HI_REG, VCD_LO_REG, XF_MEM_SIZE,
+ XF_MODELVIEW_BASE, XF_MODELVIEW_END, XF_PROJECTION_BASE, XF_PROJECTION_END,
},
draw::DrawCommands,
- regs::{TxSetImage0, TxSetImage3, VatA, VcdHi, VcdLo},
+ regs::{AlphaCompare, BlendMode, TxSetImage0, TxSetImage3, VatA, VcdHi, VcdLo, ZMode},
},
gekko::Gekko,
mmio::Mmio,
@@ -364,6 +364,14 @@ impl Gx {
if idx == BP_PE_DONE && (val & BP_PE_DONE_FINISH_BIT) != 0 {
self.raise_interrupt = true;
}
+
+ // Forward PE render state to draw commands
+ match idx {
+ BP_PE_ZMODE => self.draw_commands.bp_zmode = ZMode::from_raw(val),
+ BP_PE_CMODE0 => self.draw_commands.bp_blend_mode = BlendMode::from_raw(val),
+ BP_PE_ALPHA_COMPARE => self.draw_commands.bp_alpha_compare = AlphaCompare::from_raw(val),
+ _ => {}
+ }
}
fn load_cp(&mut self, data: &[u8]) {
diff --git a/crates/gekko/src/flipper/gx/constants.rs b/crates/gekko/src/flipper/gx/constants.rs
index 6d1d5bc..ca740d5 100644
--- a/crates/gekko/src/flipper/gx/constants.rs
+++ b/crates/gekko/src/flipper/gx/constants.rs
@@ -49,5 +49,8 @@ pub const BP_TX_SETIMAGE2_I4: usize = 0xB0; // TX_SETIMAGE2 maps 4-7
pub const BP_TX_SETIMAGE3_I4: usize = 0xB4; // TX_SETIMAGE3 maps 4-7 (IMAGE_BASE = addr >> 5)
// BP PE (Pixel Engine) registers
+pub const BP_PE_ZMODE: usize = 0x40;
+pub const BP_PE_CMODE0: usize = 0x41; // blend mode
+pub const BP_PE_ALPHA_COMPARE: usize = 0xF3;
pub const BP_PE_DONE: usize = 0x45;
pub const BP_PE_DONE_FINISH_BIT: u32 = 0x02;
diff --git a/crates/gekko/src/flipper/gx/draw.rs b/crates/gekko/src/flipper/gx/draw.rs
index bc9c0c9..c62fb85 100644
--- a/crates/gekko/src/flipper/gx/draw.rs
+++ b/crates/gekko/src/flipper/gx/draw.rs
@@ -1,4 +1,5 @@
use chapa::BitEnum;
+use super::regs::{AlphaCompare, BlendMode, ZMode};
#[derive(Debug)]
pub enum Primitive {
@@ -97,4 +98,7 @@ pub struct DrawCommands {
pub projection: Matrix4,
pub commands: Vec<DrawCall>,
pub textures: [Option<TextureDescriptor>; 8],
+ pub bp_zmode: ZMode,
+ pub bp_blend_mode: BlendMode,
+ pub bp_alpha_compare: AlphaCompare,
}
diff --git a/crates/gekko/src/flipper/gx/regs.rs b/crates/gekko/src/flipper/gx/regs.rs
index 45e0852..e57a30e 100644
--- a/crates/gekko/src/flipper/gx/regs.rs
+++ b/crates/gekko/src/flipper/gx/regs.rs
@@ -2,6 +2,127 @@ use chapa::BitEnum;
use crate::flipper::gx::draw::TextureFormat;
+// GX compare function (shared by Z-mode and alpha compare)
+#[derive(Debug, PartialEq, BitEnum, Hash, Eq)]
+pub enum CompareFunc {
+ Never = 0,
+ Less = 1,
+ Equal = 2,
+ LessEqual = 3,
+ Greater = 4,
+ NotEqual = 5,
+ GreaterEqual = 6,
+ Always = 7,
+}
+
+// GX blend factor
+#[derive(Debug, PartialEq, BitEnum, Hash, Eq)]
+pub enum BlendFactor {
+ Zero = 0,
+ One = 1,
+ SrcClr = 2,
+ InvSrcClr = 3,
+ SrcAlpha = 4,
+ InvSrcAlpha = 5,
+ DstAlpha = 6,
+ InvDstAlpha = 7,
+}
+
+// GX alpha combine op
+#[derive(Debug, PartialEq, BitEnum, Hash, Eq)]
+pub enum AlphaOp {
+ And = 0,
+ Or = 1,
+ Xor = 2,
+ Xnor = 3,
+}
+
+// BP 0x40 Z-mode
+#[chapa::bitfield(u32, order = lsb0)]
+#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, Default)]
+pub struct ZMode {
+ #[bits(0)]
+ pub enable: bool,
+
+ #[bits(1..=3)]
+ pub func: CompareFunc,
+
+ #[bits(4)]
+ pub update_enable: bool,
+}
+
+#[derive(Debug, BitEnum)]
+pub enum LogicOp {
+ Clear = 0,
+ And = 1,
+ ReverseAnd = 2,
+ Copy = 3,
+ InvertedAnd = 4,
+ Noop = 5,
+ Xor = 6,
+ Or = 7,
+ Nor = 8,
+ Equivalent = 9,
+ Invert = 10,
+ ReverseOr = 11,
+ InvertedCopy = 12,
+ InvertedOr = 13,
+ Nand = 14,
+ Set = 15,
+}
+
+// BP 0x41 Blend mode (PE_CMODE0)
+#[chapa::bitfield(u32, order = lsb0)]
+#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, Default)]
+pub struct BlendMode {
+ #[bits(0)]
+ pub blend_enable: bool,
+
+ #[bits(1)]
+ pub logic_op_enable: bool,
+
+ #[bits(2)]
+ pub dither_enable: bool,
+
+ #[bits(3)]
+ pub color_update: bool,
+
+ #[bits(4)]
+ pub alpha_update: bool,
+
+ #[bits(5..=7)]
+ pub dst_factor: BlendFactor,
+
+ #[bits(8..=10)]
+ pub src_factor: BlendFactor,
+
+ #[bits(11)]
+ pub subtract: bool,
+
+ #[bits(12..=15)] // TODO: double check
+ pub logic_op: LogicOp,
+}
+
+// BP 0xF3 Alpha compare
+#[chapa::bitfield(u32, order = lsb0)]
+#[derive(Debug, Clone, Copy, Default)]
+pub struct AlphaCompare {
+ #[bits(0..=7)]
+ pub ref0: u8,
+
+ #[bits(8..=15)]
+ pub ref1: u8,
+
+ #[bits(16..=18)]
+ pub comp0: CompareFunc,
+
+ #[bits(19..=21)]
+ pub comp1: CompareFunc,
+
+ #[bits(22..=23)]
+ pub op: AlphaOp,
+}
+
#[derive(Debug, PartialEq, BitEnum)]
pub enum TexCount {
S, // 1D coordinate
diff --git a/crates/tinyapp/Cargo.toml b/crates/tinyapp/Cargo.toml
index ac723ad..81b8746 100644
--- a/crates/tinyapp/Cargo.toml
+++ b/crates/tinyapp/Cargo.toml
@@ -10,3 +10,8 @@ backend-wgpu = { path = "../backend-wgpu" }
wgpu = "28.0.0"
winit = "0.30"
pollster = "0.4"
+egui = "0.33"
+egui-wgpu = "0.33"
+egui-winit = { version = "0.33", features = ["wayland", "x11"] }
+egui_plot = "0.34"
+bytemuck = { version = "1", features = ["derive"] }
diff --git a/crates/tinyapp/src/main.rs b/crates/tinyapp/src/main.rs
index f5be8d1..e0a4a96 100644
--- a/crates/tinyapp/src/main.rs
+++ b/crates/tinyapp/src/main.rs
@@ -1,7 +1,12 @@
+use egui::ViewportId;
+use egui_plot::{Line, Plot, PlotPoints};
+use gekko::flipper::vi::regs::RefreshRate;
use gekko::gekko::Gekko;
use image::Dol;
+use std::collections::VecDeque;
use std::env;
use std::sync::Arc;
+use std::time::Instant;
use winit::{
application::ApplicationHandler,
event::WindowEvent,
@@ -23,6 +28,13 @@ struct State {
tex_width: u32,
tex_height: u32,
gx_renderer: backend_wgpu::GxRenderer,
+ // egui overlay
+ egui_ctx: egui::Context,
+ egui_renderer: egui_wgpu::Renderer,
+ egui_winit: egui_winit::State,
+ fps_history: VecDeque<[f64; 2]>,
+ start_time: Instant,
+ last_frame: Instant,
}
impl State {
@@ -136,6 +148,10 @@ impl State {
surface_config.height,
);
+ let egui_ctx = egui::Context::default();
+ let egui_renderer = egui_wgpu::Renderer::new(&device, surface_format, egui_wgpu::RendererOptions::default());
+ let egui_winit = egui_winit::State::new(egui_ctx.clone(), ViewportId::ROOT, window.as_ref(), None, None, None);
+
State {
surface,
surface_config,
@@ -148,6 +164,12 @@ impl State {
tex_width: w,
tex_height: h,
gx_renderer,
+ egui_ctx,
+ egui_renderer,
+ egui_winit,
+ fps_history: VecDeque::new(),
+ start_time: Instant::now(),
+ last_frame: Instant::now(),
}
}
@@ -161,7 +183,22 @@ impl State {
self.gx_renderer.resize(&self.device, width, height);
}
- fn render(&mut self, emulator: &mut Gekko) {
+ fn render(&mut self, emulator: &mut Gekko, window: &Window) {
+ // update FPS history
+ let delta = self.last_frame.elapsed().as_secs_f64();
+ self.last_frame = Instant::now();
+ let fps = if delta > 0.0 { 1.0 / delta } else { 0.0 };
+ let elapsed = self.start_time.elapsed().as_secs_f64();
+ self.fps_history.push_back([elapsed, fps]);
+ while self.fps_history.front().is_some_and(|e| elapsed - e[0] > 5.0) {
+ self.fps_history.pop_front();
+ }
+ let native_hz = match emulator.vi.dcr.video_format().refresh_rate() {
+ RefreshRate::Hz60 => 60.0_f64,
+ RefreshRate::Hz50 => 50.0_f64,
+ };
+ let native_pct = (fps / native_hz) * 100.0;
+
emulator.run_until_vsync();
let frame = match self.surface.get_current_texture() {
@@ -179,6 +216,84 @@ impl State {
self.render_xfb(emulator, &view);
}
+ // egui overlay
+ let raw_input = self.egui_winit.take_egui_input(window);
+ let fps_points: Vec<[f64; 2]> = self.fps_history.iter().copied().collect();
+ let full_output = self.egui_ctx.run_ui(raw_input, |ui| {
+ let ctx = ui.ctx().clone();
+ let frame =
+ egui::Frame::window(&ctx.global_style()).fill(egui::Color32::from_rgba_unmultiplied(20, 20, 20, 180));
+ egui::Window::new("perf_hud")
+ .title_bar(false)
+ .resizable(false)
+ .movable(false)
+ .anchor(egui::Align2::RIGHT_TOP, [-8.0, 8.0])
+ .frame(frame)
+ .show(&ctx, |ui| {
+ ui.label(egui::RichText::new(format!("{fps:.1} FPS {native_pct:.1}% native")).monospace());
+ Plot::new("fps_plot")
+ .height(60.0)
+ .width(180.0)
+ .show_axes(false)
+ .show_grid(false)
+ .allow_zoom(false)
+ .allow_drag(false)
+ .allow_scroll(false)
+ .show(ui, |plot_ui| {
+ plot_ui.line(
+ Line::new("fps", PlotPoints::from(fps_points.clone()))
+ .color(egui::Color32::from_rgb(100, 200, 100)),
+ );
+ });
+ });
+ });
+
+ self.egui_winit
+ .handle_platform_output(window, full_output.platform_output);
+
+ let screen_desc = egui_wgpu::ScreenDescriptor {
+ size_in_pixels: [self.surface_config.width, self.surface_config.height],
+ pixels_per_point: window.scale_factor() as f32,
+ };
+ let tris = self
+ .egui_ctx
+ .tessellate(full_output.shapes, screen_desc.pixels_per_point);
+
+ for (id, delta) in full_output.textures_delta.set {
+ self.egui_renderer.update_texture(&self.device, &self.queue, id, &delta);
+ }
+
+ let mut encoder = self
+ .device
+ .create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None });
+ self.egui_renderer
+ .update_buffers(&self.device, &self.queue, &mut encoder, &tris, &screen_desc);
+ {
+ let rpass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
+ label: Some("egui"),
+ color_attachments: &[Some(wgpu::RenderPassColorAttachment {
+ view: &view,
+ resolve_target: None,
+ ops: wgpu::Operations {
+ load: wgpu::LoadOp::Load,
+ store: wgpu::StoreOp::Store,
+ },
+ depth_slice: None,
+ })],
+ depth_stencil_attachment: None,
+ timestamp_writes: None,
+ occlusion_query_set: None,
+ multiview_mask: None,
+ });
+ self.egui_renderer
+ .render(&mut rpass.forget_lifetime(), &tris, &screen_desc);
+ }
+ self.queue.submit([encoder.finish()]);
+
+ for id in full_output.textures_delta.free {
+ self.egui_renderer.free_texture(&id);
+ }
+
frame.present();
}
@@ -326,6 +441,11 @@ impl ApplicationHandler for App {
}
fn window_event(&mut self, event_loop: &ActiveEventLoop, _id: WindowId, event: WindowEvent) {
+ // Forward events to egui first
+ if let (Some(state), Some(window)) = (&mut self.state, &self.window) {
+ let _ = state.egui_winit.on_window_event(window, &event);
+ }
+
match event {
WindowEvent::CloseRequested => event_loop.exit(),
WindowEvent::Resized(size) => {
@@ -335,7 +455,7 @@ impl ApplicationHandler for App {
}
WindowEvent::RedrawRequested => {
if let (Some(state), Some(window)) = (&mut self.state, &self.window) {
- state.render(&mut self.emulator);
+ state.render(&mut self.emulator, window);
window.request_redraw();
}
}