diff --git a/Cargo.lock b/Cargo.lock index 6b5601e..f260609 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.23" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80179d7dd5d7e8c285d67c4a1e652972a92de7475beddfb92028c76463b13225" +checksum = "ec3672c180e71eeaaac3a541fbbc5f5ad4def8b747c595ad30d674e43049f7b0" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -19,10 +19,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -31,10 +31,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -53,7 +53,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" dependencies = [ "android-properties", - "bitflags 2.5.0", + "bitflags 2.9.0", "cc", "cesu8", "jni", @@ -75,9 +75,9 @@ checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "approx" @@ -90,15 +90,15 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "as-raw-xcb-connection" @@ -114,9 +114,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -126,9 +126,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "block" @@ -157,21 +157,21 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "calloop" @@ -179,7 +179,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "log", "polling", "rustix", @@ -201,12 +201,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -269,9 +270,9 @@ dependencies = [ [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -279,9 +280,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -298,15 +299,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -328,18 +329,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "cursor-icon" @@ -364,9 +365,9 @@ dependencies = [ [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "env_logger" @@ -383,34 +384,34 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "fdeflate" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" dependencies = [ "simd-adler32", ] [[package]] name = "flate2" -version = "1.0.28" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", "miniz_oxide", @@ -455,32 +456,50 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "hermit-abi" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" [[package]] name = "humantime" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" [[package]] name = "icrate" @@ -495,9 +514,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", "hashbrown", @@ -505,13 +524,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ - "hermit-abi", + "hermit-abi 0.5.0", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -538,60 +557,62 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ + "getrandom 0.3.2", "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "libc" -version = "0.2.153" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] name = "libredox" -version = "0.0.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.10", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "log" -version = "0.4.21" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "malloc_buf" @@ -604,15 +625,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -623,7 +644,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "block", "core-graphics-types", "foreign-types", @@ -634,11 +655,11 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "ff70ce3e48ae43fa075863cef62e8b43b71a4f2382229920e0df362592919430" dependencies = [ - "adler", + "adler2", "simd-adler32", ] @@ -648,7 +669,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "jni-sys", "log", "ndk-sys", @@ -674,27 +695,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -714,9 +735,9 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" @@ -745,33 +766,33 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "orbclient" -version = "0.3.47" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" +checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" dependencies = [ "libredox", ] [[package]] name = "owned_ttf_parser" -version = "0.20.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7" +checksum = "22ec719bbf3b2a81c109a4e20b1f129b5566b7dce654bc3872f6a05abf82b2c4" dependencies = [ "ttf-parser", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" @@ -781,21 +802,21 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "png" -version = "0.17.13" +version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -806,24 +827,27 @@ dependencies = [ [[package]] name = "polling" -version = "3.6.0" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", "rustix", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy 0.8.24", +] [[package]] name = "pretty_env_logger" @@ -837,40 +861,46 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.37.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "a4ce8c88de324ff838700f36fb6ab86c96df0e3c4ab6ef3a9b2044465cce1369" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "rand" version = "0.8.5" @@ -898,14 +928,14 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] name = "raw-window-handle" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "redox_syscall" @@ -918,18 +948,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.0", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -939,9 +969,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -950,29 +980,35 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] +[[package]] +name = "rustversion" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" + [[package]] name = "same-file" version = "1.0.6" @@ -990,9 +1026,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "sctk-adwaita" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" +checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7" dependencies = [ "ab_glyph", "log", @@ -1003,24 +1039,30 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.200" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.200" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "simd-adler32" version = "0.3.7" @@ -1038,9 +1080,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "smithay-client-toolkit" @@ -1048,7 +1090,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "calloop", "calloop-wayland-source", "cursor-icon", @@ -1069,9 +1111,9 @@ dependencies = [ [[package]] name = "smol_str" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" dependencies = [ "serde", ] @@ -1084,9 +1126,9 @@ checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" [[package]] name = "syn" -version = "2.0.58" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -1104,18 +1146,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", @@ -1159,15 +1201,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap", "toml_datetime", @@ -1176,9 +1218,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-core", @@ -1186,33 +1228,33 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" [[package]] name = "ttf-parser" -version = "0.20.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vulkan-tutorial" @@ -1272,24 +1314,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasm-bindgen" -version = "0.2.92" +name = "wasi" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -1298,21 +1350,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1320,9 +1373,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -1333,15 +1386,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wayland-backend" -version = "0.3.3" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" +checksum = "b7208998eaa3870dad37ec8836979581506e0c5c64c20c9e79e9d2a10d6f47bf" dependencies = [ "cc", "downcast-rs", @@ -1353,11 +1409,11 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.2" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" +checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "rustix", "wayland-backend", "wayland-scanner", @@ -1369,16 +1425,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "cursor-icon", "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.31.1" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" +checksum = "a93029cbb6650748881a00e4922b076092a6a08c11e7fbdb923f064b23968c5d" dependencies = [ "rustix", "wayland-client", @@ -1391,7 +1447,7 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -1403,7 +1459,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -1416,7 +1472,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -1425,9 +1481,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.1" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" +checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" dependencies = [ "proc-macro2", "quick-xml", @@ -1436,9 +1492,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.1" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" dependencies = [ "dlib", "log", @@ -1448,9 +1504,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -1466,37 +1522,15 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.45.0" @@ -1517,11 +1551,11 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -1556,17 +1590,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -1583,9 +1618,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -1601,9 +1636,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -1619,9 +1654,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -1637,9 +1678,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -1655,9 +1696,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -1673,9 +1714,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -1691,9 +1732,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" @@ -1704,7 +1745,7 @@ dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.5.0", + "bitflags 2.9.0", "bytemuck", "calloop", "cfg_aliases", @@ -1745,13 +1786,22 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.40" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.0", +] + [[package]] name = "x11-dl" version = "2.21.0" @@ -1765,9 +1815,9 @@ dependencies = [ [[package]] name = "x11rb" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" dependencies = [ "as-raw-xcb-connection", "gethostname", @@ -1780,15 +1830,15 @@ dependencies = [ [[package]] name = "x11rb-protocol" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xcursor" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" +checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61" [[package]] name = "xkbcommon-dl" @@ -1796,7 +1846,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.9.0", "dlib", "log", "once_cell", @@ -1805,24 +1855,44 @@ dependencies = [ [[package]] name = "xkeysym" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +dependencies = [ + "zerocopy-derive 0.8.24", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" dependencies = [ "proc-macro2", "quote", diff --git a/shaders/compiled/rt_compute.spv b/shaders/compiled/rt_compute.spv index f7b7067..77f16d8 100644 Binary files a/shaders/compiled/rt_compute.spv and b/shaders/compiled/rt_compute.spv differ diff --git a/shaders/rt_compute.comp b/shaders/rt_compute.comp index 2b33f9c..e51587a 100644 --- a/shaders/rt_compute.comp +++ b/shaders/rt_compute.comp @@ -11,17 +11,244 @@ layout(binding = 0) uniform UniformBufferObject { } ubo; layout(binding = 3) readonly buffer SceneInfoBuffer { - uint gridsIn[]; + uint compounds[]; }; layout(binding = 4) buffer SceneInfoBuffer2 { uint volumes[]; }; +layout(binding = 5) buffer SizedVertices { + float vertices[]; +}; + +layout(binding = 6) buffer Indices { + uint indices[]; +}; + layout (local_size_x = 256, local_size_y = 1, local_size_z = 1) in; -void main() { - uint index = gl_GlobalInvocationID.x; +uvec4 unpack_color(uint val) { + // left most 8 bits first + uint val1 = (val >> 24); + uint val2 = (val << 8) >> 24; + uint val3 = (val << 16) >> 24; + uint val4 = (val << 24) >> 24; - volumes[index] = gridsIn[index]; + return uvec4(val4, val3, val2, val1); +} + +void add_cube(uint cube_num, float scale, vec3 pos, vec3 color) { + // add node info for the cube + //vertice 0 + vertices[(cube_num * 8 + 0) * 11 + 0] = pos.x - 0.5 * scale; + vertices[(cube_num * 8 + 0) * 11 + 1] = pos.y + 0.5 * scale; + vertices[(cube_num * 8 + 0) * 11 + 2] = pos.z + 0.5 * scale; + + vertices[(cube_num * 8 + 0) * 11 + 3] = color.x; + vertices[(cube_num * 8 + 0) * 11 + 4] = color.y; + vertices[(cube_num * 8 + 0) * 11 + 5] = color.z; + + //vertice 1 + vertices[(cube_num * 8 + 1) * 11 + 0] = pos.x + 0.5 * scale; + vertices[(cube_num * 8 + 1) * 11 + 1] = pos.y + 0.5 * scale; + vertices[(cube_num * 8 + 1) * 11 + 2] = pos.z + 0.5 * scale; + + vertices[(cube_num * 8 + 1) * 11 + 3] = color.x; + vertices[(cube_num * 8 + 1) * 11 + 4] = color.y; + vertices[(cube_num * 8 + 1) * 11 + 5] = color.z; + + //vertice 2 + vertices[(cube_num * 8 + 2) * 11 + 0] = pos.x - 0.5 * scale; + vertices[(cube_num * 8 + 2) * 11 + 1] = pos.y - 0.5 * scale; + vertices[(cube_num * 8 + 2) * 11 + 2] = pos.z + 0.5 * scale; + + vertices[(cube_num * 8 + 2) * 11 + 3] = color.x; + vertices[(cube_num * 8 + 2) * 11 + 4] = color.y; + vertices[(cube_num * 8 + 2) * 11 + 5] = color.z; + + //vertice 3 + vertices[(cube_num * 8 + 3) * 11 + 0] = pos.x + 0.5 * scale; + vertices[(cube_num * 8 + 3) * 11 + 1] = pos.y - 0.5 * scale; + vertices[(cube_num * 8 + 3) * 11 + 2] = pos.z + 0.5 * scale; + + vertices[(cube_num * 8 + 3) * 11 + 3] = color.x; + vertices[(cube_num * 8 + 3) * 11 + 4] = color.y; + vertices[(cube_num * 8 + 3) * 11 + 5] = color.z; + + //vertice 4 + vertices[(cube_num * 8 + 4) * 11 + 0] = pos.x - 0.5 * scale; + vertices[(cube_num * 8 + 4) * 11 + 1] = pos.y + 0.5 * scale; + vertices[(cube_num * 8 + 4) * 11 + 2] = pos.z - 0.5 * scale; + + vertices[(cube_num * 8 + 4) * 11 + 3] = color.x; + vertices[(cube_num * 8 + 4) * 11 + 4] = color.y; + vertices[(cube_num * 8 + 4) * 11 + 5] = color.z; + + //vertice 5 + vertices[(cube_num * 8 + 5) * 11 + 0] = pos.x + 0.5 * scale; + vertices[(cube_num * 8 + 5) * 11 + 1] = pos.y + 0.5 * scale; + vertices[(cube_num * 8 + 5) * 11 + 2] = pos.z - 0.5 * scale; + + vertices[(cube_num * 8 + 5) * 11 + 3] = color.x; + vertices[(cube_num * 8 + 5) * 11 + 4] = color.y; + vertices[(cube_num * 8 + 5) * 11 + 5] = color.z; + + //vertice 6 + vertices[(cube_num * 8 + 6) * 11 + 0] = pos.x - 0.5 * scale; + vertices[(cube_num * 8 + 6) * 11 + 1] = pos.y - 0.5 * scale; + vertices[(cube_num * 8 + 6) * 11 + 2] = pos.z - 0.5 * scale; + + vertices[(cube_num * 8 + 6) * 11 + 3] = color.x; + vertices[(cube_num * 8 + 6) * 11 + 4] = color.y; + vertices[(cube_num * 8 + 6) * 11 + 5] = color.z; + + //vertice 7 + vertices[(cube_num * 8 + 7) * 11 + 0] = pos.x + 0.5 * scale; + vertices[(cube_num * 8 + 7) * 11 + 1] = pos.y - 0.5 * scale; + vertices[(cube_num * 8 + 7) * 11 + 2] = pos.z - 0.5 * scale; + + vertices[(cube_num * 8 + 7) * 11 + 3] = color.x; + vertices[(cube_num * 8 + 7) * 11 + 4] = color.y; + vertices[(cube_num * 8 + 7) * 11 + 5] = color.z; + + //add indices for the cube + //top + indices[cube_num * 36 + 0] = cube_num * 8 + 3; + indices[cube_num * 36 + 1] = cube_num * 8 + 0; + indices[cube_num * 36 + 2] = cube_num * 8 + 2; + + indices[cube_num * 36 + 3] = cube_num * 8 + 3; + indices[cube_num * 36 + 4] = cube_num * 8 + 1; + indices[cube_num * 36 + 5] = cube_num * 8 + 0; + + //bottom + indices[cube_num * 36 + 6] = cube_num * 8 + 6; + indices[cube_num * 36 + 7] = cube_num * 8 + 4; + indices[cube_num * 36 + 8] = cube_num * 8 + 7; + + indices[cube_num * 36 + 9] = cube_num * 8 + 4; + indices[cube_num * 36 + 10] = cube_num * 8 + 5; + indices[cube_num * 36 + 11] = cube_num * 8 + 7; + + //left + indices[cube_num * 36 + 12] = cube_num * 8 + 0; + indices[cube_num * 36 + 13] = cube_num * 8 + 4; + indices[cube_num * 36 + 14] = cube_num * 8 + 2; + + indices[cube_num * 36 + 15] = cube_num * 8 + 6; + indices[cube_num * 36 + 16] = cube_num * 8 + 2; + indices[cube_num * 36 + 17] = cube_num * 8 + 4; + + //right + indices[cube_num * 36 + 18] = cube_num * 8 + 1; + indices[cube_num * 36 + 19] = cube_num * 8 + 3; + indices[cube_num * 36 + 20] = cube_num * 8 + 5; + + indices[cube_num * 36 + 21] = cube_num * 8 + 5; + indices[cube_num * 36 + 22] = cube_num * 8 + 3; + indices[cube_num * 36 + 23] = cube_num * 8 + 7; + + //near + indices[cube_num * 36 + 24] = cube_num * 8 + 6; + indices[cube_num * 36 + 25] = cube_num * 8 + 3; + indices[cube_num * 36 + 26] = cube_num * 8 + 2; + + indices[cube_num * 36 + 27] = cube_num * 8 + 3; + indices[cube_num * 36 + 28] = cube_num * 8 + 6; + indices[cube_num * 36 + 29] = cube_num * 8 + 7; + + //far + indices[cube_num * 36 + 30] = cube_num * 8 + 0; + indices[cube_num * 36 + 31] = cube_num * 8 + 1; + indices[cube_num * 36 + 32] = cube_num * 8 + 4; + + indices[cube_num * 36 + 33] = cube_num * 8 + 5; + indices[cube_num * 36 + 34] = cube_num * 8 + 4; + indices[cube_num * 36 + 35] = cube_num * 8 + 1; + +} + +void main() { + uint index = gl_GlobalInvocationID.x; + uint output_offset = 0; + uint compound_start = 0; + // iterate over the compounds and find the work index inside of it + while (index > compounds[compound_start] * compounds[compound_start]) { + compound_start = compounds[compound_start + 2]; + index -= compounds[compound_start] * compounds[compound_start]; + output_offset += compounds[compound_start] * compounds[compound_start] * compounds[compound_start]; + } + // grid pos in the task + uint compound_grid_size = compounds[compound_start]; + float compound_scale = uintBitsToFloat(compounds[compound_start + 1]); + vec3 mid_offset = vec3(compound_scale * 0.5, compound_scale * 0.5, compound_scale * 0.5); + uint y = index % compound_grid_size; + uint x = (index - y) / compound_grid_size; + vec3 compound_pos = vec3(uintBitsToFloat(compounds[compound_start + 5]), uintBitsToFloat(compounds[compound_start + 6]), uintBitsToFloat(compounds[compound_start + 7])); + // iterate upwards along the z axis + for (uint z=0; z < compound_grid_size; z++) { + // iterate over the included shapes + vec3 check_pos = compound_pos + vec3(float(x) * compound_scale, float(y) * compound_scale, float(z) * compound_scale) + mid_offset; + uvec4 color_roughness; + bool render = false; + vec3 color = vec3(0.0, 0.0, 1.0); + bool transparent = false; + //handle included shapes + for (uint o=0; o < compounds[compound_start + 3]; o++) { + uint component_index = compounds[compound_start + 9 + o]; + uint component_type = compounds[component_index]; + vec3 component_pos = vec3(uintBitsToFloat(compounds[component_index + 1]), uintBitsToFloat(compounds[component_index + 2]), uintBitsToFloat(compounds[component_index + 3])); + vec3 component_rot = vec3(uintBitsToFloat(compounds[component_index + 4]), uintBitsToFloat(compounds[component_index + 5]), uintBitsToFloat(compounds[component_index + 6])); + + uvec4 component_color = unpack_color(compounds[component_index + 7]); + + uint transparent = compounds[component_index + 8]; + + if (component_type == 0) { + // handle sphere + float radius = uintBitsToFloat(compounds[component_index + 9]); + + render = length(component_pos - check_pos) <= radius; + if (render) { + color = vec3(float(component_color.x) / 255.0, float(component_color.y) / 255.0, float(component_color.z) / 255.0); + break; + } + } + + + } + //handle excluded shapes + for (uint o=0; o < compounds[compound_start + 4]; o++) { + uint component_index = compounds[compound_start + 9 + compounds[compound_start + 3] + o]; + uint component_type = compounds[component_index]; + vec3 component_pos = vec3(uintBitsToFloat(compounds[component_index + 1]), uintBitsToFloat(compounds[component_index + 2]), uintBitsToFloat(compounds[component_index + 3])); + vec3 component_rot = vec3(uintBitsToFloat(compounds[component_index + 4]), uintBitsToFloat(compounds[component_index + 5]), uintBitsToFloat(compounds[component_index + 6])); + + uvec4 color = unpack_color(compounds[component_index + 7]); + + uint transparent = compounds[component_index + 8]; + + if (component_type == 0) { + // handle sphere + float radius = uintBitsToFloat(compounds[component_index + 9]); + + render = render && !(length(component_pos - check_pos) <= radius); + if (!render) { + break; + } + } + } + + if (render) { + add_cube(index * compound_grid_size + z, compound_scale, check_pos, color); + } + + + } + + //add_cube(0, compound_scale, compound_pos + mid_offset, vec3(1.0, 0.0, 0.0)); + //add_cube(1, compound_scale, compound_pos + vec3(float(compound_grid_size) * compound_scale, float(compound_grid_size) * compound_scale, float(compound_grid_size) * compound_scale) + mid_offset, vec3(1.0, 0.0, 0.0)); + + volumes[index] = compounds[index]; } \ No newline at end of file diff --git a/src/app_data.rs b/src/app_data.rs index 4c47c30..3bcb10b 100644 --- a/src/app_data.rs +++ b/src/app_data.rs @@ -47,6 +47,12 @@ pub struct AppData { pub compute_out_storage_buffers: Vec<vk::Buffer>, pub compute_out_storage_buffers_memory: Vec<vk::DeviceMemory>, + pub compute_out_cuboid_buffers: Vec<vk::Buffer>, + pub compute_out_cuboid_buffers_memory: Vec<vk::DeviceMemory>, + + pub compute_out_cuboid_index_buffers: Vec<vk::Buffer>, + pub compute_out_cuboid_index_buffers_memory: Vec<vk::DeviceMemory>, + pub descriptor_pool: vk::DescriptorPool, pub descriptor_sets: Vec<vk::DescriptorSet>, @@ -71,6 +77,8 @@ pub struct AppData { pub scene_rt_memory_size: u64, pub scene_rt_volumetric_size: u64, pub compute_task_one_size: usize, + pub compute_task_one_out_buffer_size: u64, + pub compute_task_one_out_size: u64, // values passed to shader pub num_lights_per_volume: u32, pub min_light_weight: f32, diff --git a/src/buffer.rs b/src/buffer.rs index ae8d656..f8ee31d 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -10,6 +10,8 @@ pub type Mat4 = cgmath::Matrix4<f32>; use crate::app_data; use crate::command_buffer; +use crate::primitives; +use crate::vertex; use crate::vertex::VertexContainer; use crate::scene; @@ -218,7 +220,19 @@ pub unsafe fn create_descriptor_set_layout( .descriptor_count(1) .stage_flags(vk::ShaderStageFlags::FRAGMENT | vk::ShaderStageFlags::COMPUTE); - let bindings = &[ubo_binding, sampler_binding, storage_binding_render, storage_binding_compute_in, storage_binding_compute_out]; + let storage_binding_compute_cuboid_out = vk::DescriptorSetLayoutBinding::builder() + .binding(5) + .descriptor_type(vk::DescriptorType::STORAGE_BUFFER) + .descriptor_count(1) + .stage_flags(vk::ShaderStageFlags::VERTEX | vk::ShaderStageFlags::COMPUTE); + + let storage_binding_compute_cuboid_index_out = vk::DescriptorSetLayoutBinding::builder() + .binding(6) + .descriptor_type(vk::DescriptorType::STORAGE_BUFFER) + .descriptor_count(1) + .stage_flags(vk::ShaderStageFlags::VERTEX | vk::ShaderStageFlags::COMPUTE); + + let bindings = &[ubo_binding, sampler_binding, storage_binding_render, storage_binding_compute_in, storage_binding_compute_out, storage_binding_compute_cuboid_out, storage_binding_compute_cuboid_index_out]; let info = vk::DescriptorSetLayoutCreateInfo::builder() .bindings(bindings); @@ -265,6 +279,12 @@ pub unsafe fn create_storage_buffers( data.compute_out_storage_buffers.clear(); data.compute_out_storage_buffers_memory.clear(); + data.compute_out_cuboid_buffers.clear(); + data.compute_out_cuboid_buffers_memory.clear(); + + data.compute_out_cuboid_index_buffers.clear(); + data.compute_out_cuboid_index_buffers_memory.clear(); + for _ in 0..data.swapchain_images.len() { let (storage_buffer, storage_buffer_memory) = create_buffer( instance, @@ -293,13 +313,37 @@ pub unsafe fn create_storage_buffers( instance, device, data, - data.scene_rt_memory_size.max(1), - vk::BufferUsageFlags::TRANSFER_DST | vk::BufferUsageFlags::STORAGE_BUFFER, + data.compute_task_one_out_buffer_size.max(1), + vk::BufferUsageFlags::STORAGE_BUFFER, vk::MemoryPropertyFlags::DEVICE_LOCAL, )?; data.compute_out_storage_buffers.push(storage_buffer); data.compute_out_storage_buffers_memory.push(storage_buffer_memory); + + let (storage_buffer, storage_buffer_memory) = create_buffer( + instance, + device, + data, + (size_of::<vertex::SizedVertex>() * 8) as u64 * data.compute_task_one_out_size, + vk::BufferUsageFlags::STORAGE_BUFFER | vk::BufferUsageFlags::VERTEX_BUFFER, + vk::MemoryPropertyFlags::DEVICE_LOCAL, + )?; + + data.compute_out_cuboid_buffers.push(storage_buffer); + data.compute_out_cuboid_buffers_memory.push(storage_buffer_memory); + + let (storage_buffer, storage_buffer_memory) = create_buffer( + instance, + device, + data, + (size_of::<u32>() * 36) as u64 * data.compute_task_one_out_size, + vk::BufferUsageFlags::STORAGE_BUFFER | vk::BufferUsageFlags::INDEX_BUFFER, + vk::MemoryPropertyFlags::DEVICE_LOCAL, + )?; + + data.compute_out_cuboid_index_buffers.push(storage_buffer); + data.compute_out_cuboid_index_buffers_memory.push(storage_buffer_memory); } Ok(()) @@ -368,6 +412,43 @@ pub unsafe fn update_render_storage_buffer( Ok(()) } +pub unsafe fn update_compute_storage_buffer( + instance: &Instance, + device: &Device, + data: &app_data::AppData, + image_index: usize, + scene_handler: &scene::Scene, +) -> Result<()> { + // rt compute buffer + if scene_handler.volumetrics.len() > 0 { + let (staging_buffer, staging_buffer_memory) = create_buffer( + instance, + device, + data, + data.scene_rt_volumetric_size, + vk::BufferUsageFlags::TRANSFER_SRC, + vk::MemoryPropertyFlags::HOST_COHERENT | vk::MemoryPropertyFlags::HOST_VISIBLE, + )?; + + let memory = device.map_memory( + staging_buffer_memory, + 0, + data.scene_rt_volumetric_size, + vk::MemoryMapFlags::empty(), + )?; + + memcpy(scene_handler.volumetrics_memory.as_ptr(), memory.cast(), scene_handler.volumetrics_memory.len()); + + device.unmap_memory(staging_buffer_memory); + + copy_buffer(device, data, staging_buffer, data.compute_in_storage_buffers[image_index], data.scene_rt_volumetric_size)?; + + device.destroy_buffer(staging_buffer, None); + device.free_memory(staging_buffer_memory, None); + } + Ok(()) +} + pub unsafe fn create_descriptor_pool(device: &Device, data: &mut app_data::AppData) -> Result<()> { let ubo_size = vk::DescriptorPoolSize::builder() .type_(vk::DescriptorType::UNIFORM_BUFFER) @@ -388,8 +469,16 @@ pub unsafe fn create_descriptor_pool(device: &Device, data: &mut app_data::AppDa let compute_out_storage_size = vk::DescriptorPoolSize::builder() .type_(vk::DescriptorType::STORAGE_BUFFER) .descriptor_count(data.swapchain_images.len() as u32); + + let compute_out_cuboid_size = vk::DescriptorPoolSize::builder() + .type_(vk::DescriptorType::STORAGE_BUFFER) + .descriptor_count(data.swapchain_images.len() as u32); + + let compute_out_cuboid_index_size = vk::DescriptorPoolSize::builder() + .type_(vk::DescriptorType::STORAGE_BUFFER) + .descriptor_count(data.swapchain_images.len() as u32); - let pool_sizes = &[ubo_size, sampler_size, render_storage_size, compute_in_storage_size, compute_out_storage_size]; + let pool_sizes = &[ubo_size, sampler_size, render_storage_size, compute_in_storage_size, compute_out_storage_size, compute_out_cuboid_size, compute_out_cuboid_index_size]; let info = vk::DescriptorPoolCreateInfo::builder() .pool_sizes(pool_sizes) .max_sets(data.swapchain_images.len() as u32); @@ -462,7 +551,7 @@ pub unsafe fn create_descriptor_sets(device: &Device, data: &mut app_data::AppDa let info = vk::DescriptorBufferInfo::builder() .buffer(data.compute_out_storage_buffers[i]) .offset(0) - .range(data.scene_rt_memory_size); + .range(data.compute_task_one_out_buffer_size); let storage_info = &[info]; let storage_write_compute_out = vk::WriteDescriptorSet::builder() @@ -471,10 +560,36 @@ pub unsafe fn create_descriptor_sets(device: &Device, data: &mut app_data::AppDa .dst_array_element(0) .descriptor_type(vk::DescriptorType::STORAGE_BUFFER) .buffer_info(storage_info); + + let info = vk::DescriptorBufferInfo::builder() + .buffer(data.compute_out_cuboid_buffers[i]) + .offset(0) + .range((size_of::<vertex::SizedVertex>() * 8) as u64 * data.compute_task_one_out_size); + let storage_info = &[info]; + + let storage_write_compute_cuboid_out = vk::WriteDescriptorSet::builder() + .dst_set(data.descriptor_sets[i]) + .dst_binding(5) + .dst_array_element(0) + .descriptor_type(vk::DescriptorType::STORAGE_BUFFER) + .buffer_info(storage_info); + + let info = vk::DescriptorBufferInfo::builder() + .buffer(data.compute_out_cuboid_index_buffers[i]) + .offset(0) + .range((size_of::<u32>() * 36) as u64 * data.compute_task_one_out_size); + let storage_info = &[info]; + + let storage_write_compute_cuboid_index_out = vk::WriteDescriptorSet::builder() + .dst_set(data.descriptor_sets[i]) + .dst_binding(6) + .dst_array_element(0) + .descriptor_type(vk::DescriptorType::STORAGE_BUFFER) + .buffer_info(storage_info); device.update_descriptor_sets( - &[ubo_write, sampler_write, storage_write_render, storage_write_compute_in, storage_write_compute_out], + &[ubo_write, sampler_write, storage_write_render, storage_write_compute_in, storage_write_compute_out, storage_write_compute_cuboid_out, storage_write_compute_cuboid_index_out], &[] as &[vk::CopyDescriptorSet], ); } diff --git a/src/command_buffer.rs b/src/command_buffer.rs index e856f7c..00159eb 100644 --- a/src/command_buffer.rs +++ b/src/command_buffer.rs @@ -69,8 +69,29 @@ pub unsafe fn create_command_buffers(device: &Device, data: &mut app_data::AppDa 0, &[data.descriptor_sets[i]], &[]); - + device.cmd_dispatch(*command_buffer, (data.compute_task_one_size as f64 / 256.0).ceil() as u32, 1, 1); + + let buffer_memory_barrier_vertex = vk::BufferMemoryBarrier::builder() + .buffer(data.compute_out_cuboid_buffers[i]) + .src_access_mask(vk::AccessFlags::SHADER_READ | vk::AccessFlags::SHADER_WRITE) + .dst_access_mask(vk::AccessFlags::VERTEX_ATTRIBUTE_READ) + .size(vk::WHOLE_SIZE as u64) + .build(); + let buffer_memory_barrier_index = vk::BufferMemoryBarrier::builder() + .buffer(data.compute_out_cuboid_index_buffers[i]) + .src_access_mask(vk::AccessFlags::SHADER_READ | vk::AccessFlags::SHADER_WRITE) + .dst_access_mask(vk::AccessFlags::INDEX_READ) + .size(vk::WHOLE_SIZE as u64) + .build(); + + device.cmd_pipeline_barrier(*command_buffer, + vk::PipelineStageFlags::COMPUTE_SHADER, + vk::PipelineStageFlags::VERTEX_INPUT, + vk::DependencyFlags::DEVICE_GROUP, + &[] as &[vk::MemoryBarrier], + &[buffer_memory_barrier_index, buffer_memory_barrier_vertex], + &[] as &[vk::ImageMemoryBarrier]); } // start render pass let clear_values = &[color_clear_value, depth_clear_value]; @@ -122,6 +143,26 @@ pub unsafe fn create_command_buffers(device: &Device, data: &mut app_data::AppDa device.cmd_draw_indexed(*command_buffer, scene_handler.indices_cuboid.len() as u32, 1, 0, 0, 0); } + // draw sized vertices from compute shader + if scene_handler.volumetrics.len() != 0 { + device.cmd_bind_pipeline( + *command_buffer, vk::PipelineBindPoint::GRAPHICS, data.pipeline_cuboid); + + device.cmd_bind_vertex_buffers(*command_buffer, 0, &[data.compute_out_cuboid_buffers[i]], &[0]); + device.cmd_bind_index_buffer(*command_buffer, data.compute_out_cuboid_index_buffers[i], 0, vk::IndexType::UINT32); + + + device.cmd_bind_descriptor_sets( + *command_buffer, + vk::PipelineBindPoint::GRAPHICS, + data.pipeline_layout, + 0, + &[data.descriptor_sets[i]], + &[], + ); + + device.cmd_draw_indexed(*command_buffer, (data.compute_task_one_out_size * 36) as u32, 1, 0, 0, 0); + } if scene_handler.rt_vertices.len() != 0 { device.cmd_bind_pipeline( diff --git a/src/main.rs b/src/main.rs index 4d7c060..9b36399 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,7 +57,8 @@ const VALIDATION_ENABLED: bool = const VALIDATION_LAYER: vk::ExtensionName = vk::ExtensionName::from_bytes(b"VK_LAYER_KHRONOS_validation"); const DEVICE_EXTENSIONS: &[vk::ExtensionName] = &[ - vk::KHR_SWAPCHAIN_EXTENSION.name + vk::KHR_SWAPCHAIN_EXTENSION.name, + vk::EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION.name, ]; const MAX_FRAMES_IN_FLIGHT: usize = 30; @@ -288,6 +289,7 @@ impl App { self.scene_handler.update_memory(&mut self.data, true) } buffer::update_render_storage_buffer(&self.instance, &self.device, &self.data, image_index, &self.scene_handler)?; + buffer::update_compute_storage_buffer(&self.instance, &self.device, &self.data, image_index, &self.scene_handler)?; self.synchronized += 1 } @@ -424,6 +426,20 @@ impl App { self.data.compute_out_storage_buffers_memory .iter() .for_each(|m| self.device.free_memory(*m, None)); + + self.data.compute_out_cuboid_buffers + .iter() + .for_each(|b| self.device.destroy_buffer(*b, None)); + self.data.compute_out_cuboid_buffers_memory + .iter() + .for_each(|m| self.device.free_memory(*m, None)); + + self.data.compute_out_cuboid_index_buffers + .iter() + .for_each(|b| self.device.destroy_buffer(*b, None)); + self.data.compute_out_cuboid_index_buffers_memory + .iter() + .for_each(|m| self.device.free_memory(*m, None)); self.data.framebuffers .iter() diff --git a/src/scene/empty_volume.rs b/src/scene/empty_volume.rs index f3d851a..36e3a1f 100644 --- a/src/scene/empty_volume.rs +++ b/src/scene/empty_volume.rs @@ -115,7 +115,7 @@ impl EmptyVolume { // abort if it is already covered continue; } - println!("new starting pos: {}, {}, {}", x_index, y_index, z_index); + //println!("new starting pos: {}, {}, {}", x_index, y_index, z_index); // MARK: Start new Volume let mut x_size = 0; let mut y_size = 0; @@ -127,9 +127,9 @@ impl EmptyVolume { x_size = query_result.1 - 1 - (x_index - query_result.2.0); y_size = query_result.1 - 1 - (y_index - query_result.2.1); z_size = query_result.1 - 1 - (z_index - query_result.2.2); - println!("enhanced starting size: {}, {}, {}", x_size+1, y_size+1, z_size+1); + //println!("enhanced starting size: {}, {}, {}", x_size+1, y_size+1, z_size+1); } - println!("start growing volume x"); + //println!("start growing volume x"); let mut grow = true; while grow { grow &= (x_index + x_size + 1) < tree.borrow().size; @@ -179,7 +179,7 @@ impl EmptyVolume { x_size += 1; } } - println!("start growing volume y"); + //println!("start growing volume y"); grow = true; while grow { grow &= (y_index + y_size + 1) < tree.borrow().size; @@ -230,7 +230,7 @@ impl EmptyVolume { y_size += 1; } } - println!("start growing volume z"); + //println!("start growing volume z"); grow = true; while grow { grow &= (z_index + z_size + 1) < tree.borrow().size; @@ -280,7 +280,7 @@ impl EmptyVolume { z_size += 1; } } - println!("final size: {}, {}, {}", x_size+1, y_size+1, z_size+1); + //println!("final size: {}, {}, {}", x_size+1, y_size+1, z_size+1); // create new empty volume let new_volume = EmptyVolume { memory_start: 0, @@ -311,7 +311,7 @@ impl EmptyVolume { old_memory_size: 0, dirty: true, }; - println!("adding neighbor references"); + //println!("adding neighbor references"); // MARK: fill in info in the neighbor octtree let reference = Rc::new(RefCell::new(new_volume)); for x in 0..x_size+1 { @@ -325,7 +325,7 @@ impl EmptyVolume { } } } - println!("add the border information for color and roughness"); + //println!("add the border information for color and roughness"); let x_min_pos; if reference.borrow().grid_position.x == 0 { // will result in an empty color and roughness map. @@ -514,7 +514,7 @@ impl EmptyVolume { reference.borrow_mut().roughness_right= vec![]; } - println!("new volume done"); + //println!("new volume done"); //push to the list volumes.push(reference); } @@ -525,7 +525,7 @@ impl EmptyVolume { x_index += 1; } println!("Did {} oct tree checks!", check_its); - println!("add the neighbor linkage for all the volumes of the oct tree"); + //println!("add the neighbor linkage for all the volumes of the oct tree"); // MARK: Neighbor Linkage for reference in volumes.iter_mut() { let x_min_pos; diff --git a/src/scene/generators.rs b/src/scene/generators.rs index 5395a62..8e185e5 100644 --- a/src/scene/generators.rs +++ b/src/scene/generators.rs @@ -119,7 +119,9 @@ pub fn generate_test_scene(scene: &mut Scene, data: &mut AppData) -> Result<(Poi scene.oct_trees = vec![vec![vec![tree_ref_two.clone(), tree_ref_two.clone(), tree_ref_two.clone()], vec![tree_ref_two.clone(), tree_ref_one.clone(), tree_ref_two.clone()], vec![tree_ref_two.clone(), tree_ref_two.clone(), tree_ref_two.clone()]], vec![vec![tree_ref_two.clone(), tree_ref_two.clone(), tree_ref_two.clone()], vec![tree_ref_two.clone(), tree_ref_one.clone(), tree_ref_two.clone()], vec![tree_ref_two.clone(), tree_ref_two.clone(), tree_ref_two.clone()]]]; let mut comp = ShapeComposition::new(64); - comp.included_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 5.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 10.0 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 2.5, Vector3 { x: 255, y: 0, z: 0 }, 64)))); + comp.included_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 5.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 10.0 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 2.0, Vector3 { x: 0, y: 255, z: 0 }, 64, false)))); + comp.included_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 5.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 10.0 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 2.5, Vector3 { x: 255, y: 0, z: 0 }, 64, false)))); + comp.excluded_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 5.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 11.5 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 1.5, Vector3 { x: 0, y: 255, z: 0 }, 64, false)))); scene.volumetrics.push(Rc::new(RefCell::new(comp))); Ok((cgmath::point3(5.0, 5.0, 10.0))) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 25f6ce6..6fc3b0c 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -226,15 +226,18 @@ impl Scene { let mut volumetrics_memory = vec![0; data_len]; let mut compute_task_one_size = 0; + let mut compute_task_one_out_size = 0; for compound in &self.volumetrics { volumetrics_memory = compound.borrow_mut().insert_into_memory(volumetrics_memory, data, &self); compute_task_one_size += compound.borrow().size.pow(2) as usize; + compute_task_one_out_size += compound.borrow().size.pow(3) as usize; } self.volumetrics_memory = volumetrics_memory; data.scene_rt_volumetric_size = (self.volumetrics_memory.len() * 4) as u64; // size of the needed buffer size in bytes data.compute_task_one_size = compute_task_one_size; - + data.compute_task_one_out_buffer_size = (compute_task_one_out_size * 4) as u64; + data.compute_task_one_out_size = compute_task_one_out_size as u64; } pub unsafe fn destroy(&mut self, device: &vulkanalia::Device) { diff --git a/src/scene/volumetrics/mod.rs b/src/scene/volumetrics/mod.rs index df61678..e28dbf9 100644 --- a/src/scene/volumetrics/mod.rs +++ b/src/scene/volumetrics/mod.rs @@ -15,6 +15,9 @@ pub trait Volumetrics: Memorizable { fn set_rot(&mut self, p: Vector3<f32>); fn get_bbox(&self) -> (Vector3<f32>,Vector3<f32>); + + fn is_transparent(&self) -> bool; + fn set_transparency(&mut self, transparent: bool); } enum ShapeTypes { @@ -54,8 +57,8 @@ impl CompoundMemorizable for ShapeComposition { impl Memorizable for ShapeComposition { fn get_buffer_mem_size(&self, data: &AppData) -> u32 { - //size, scale, memory_end, num_included, num_excluded, pos, included_address, excluded_address - 1 + 1 + 1 + 1 + 1 + 3 + self.included_shapes.len() as u32 + self.excluded_shapes.len() as u32 + //size, scale, memory_end, num_included, num_excluded, pos, wrapping address, included_address, excluded_address + 1 + 1 + 1 + 1 + 1 + 3 + 1 + self.included_shapes.len() as u32 + self.excluded_shapes.len() as u32 } fn get_prev_buffer_mem_size(&self) -> u32 { @@ -74,7 +77,7 @@ impl Memorizable for ShapeComposition { let mut bbox_low = Vector3 {x: f32::INFINITY, y: f32::INFINITY, z: f32::INFINITY}; let mut bbox_high = Vector3 {x: f32::NEG_INFINITY, y: f32::NEG_INFINITY, z: f32::NEG_INFINITY}; - let mut element_offset = 8; + let mut element_offset = 9; for volumetric in &self.included_shapes { // create bbox for scale calculation. Only the included elements matter for the scale, as exclusion does not need to be fully included in the grid let (l, h) = volumetric.borrow().get_bbox(); @@ -102,13 +105,17 @@ impl Memorizable for ShapeComposition { element_offset += 1; } - v[self.memory_start + 1] = u32::from_ne_bytes((bbox_high.x.max(bbox_high.y.max(bbox_high.z)) - bbox_low.x.min(bbox_low.y.min(bbox_low.z)) / (self.size as f32)).to_ne_bytes()); + let bbox_high_pos_ind = bbox_high - bbox_low; + let scale = bbox_high_pos_ind.x.max(bbox_high_pos_ind.y.max(bbox_high_pos_ind.z)) / (self.size as f32); + + v[self.memory_start + 1] = u32::from_ne_bytes(scale.to_ne_bytes()); v[self.memory_start + 2] = (shapes_index + shapes_memory) as u32; v[self.memory_start + 3] = self.included_shapes.len() as u32; v[self.memory_start + 4] = self.excluded_shapes.len() as u32; v[self.memory_start + 5] = u32::from_ne_bytes(bbox_low.x.to_ne_bytes()); v[self.memory_start + 6] = u32::from_ne_bytes(bbox_low.y.to_ne_bytes()); v[self.memory_start + 7] = u32::from_ne_bytes(bbox_low.z.to_ne_bytes()); + v[self.memory_start + 8] = 0; //TODO add wrapping reference self.prev_memory_size = self.get_compound_buffer_mem_size(data); self.dirty = false; @@ -128,8 +135,9 @@ impl Memorizable for ShapeComposition { pub struct Sphere { pos: Vector3<f32>, rot: Vector3<f32>, // rotation will only matter once textures are implemented, till then it is a holdover - radius: f32, color: Vector3<u8>, // color, either as pure color or texture modifier + transparent: bool, + radius: f32, roughness: u8, memory_start: usize, dirty: bool @@ -141,20 +149,21 @@ impl Sphere { rot: Vector3<f32>, radius: f32, color: Vector3<u8>, - roughness: u8) -> Self { - Self { pos: pos, rot: rot, radius: radius, color: color, roughness: roughness, memory_start: 0, dirty: true } + roughness: u8, + transparent: bool) -> Self { + Self { pos: pos, rot: rot, radius: radius, color: color, roughness: roughness, memory_start: 0, dirty: true, transparent: transparent } } } impl Memorizable for Sphere { fn get_buffer_mem_size(&self, data: &AppData) -> u32 { - // type, pos, rot, radius, (color + roughness) - 1 + 3 + 3 + 1 + 1 + // type, pos, rot, (color + roughness), transparent, radius + 1 + 3 + 3 + 1 + 1 + 1 } fn get_prev_buffer_mem_size(&self) -> u32 { // constant memory size - 1 + 3 + 3 + 1 + 1 + 1 + 3 + 3 + 1 + 1 + 1 } fn is_dirty(&self) -> bool { self.dirty @@ -169,9 +178,11 @@ impl Memorizable for Sphere { v[self.memory_start + 5] = u32::from_ne_bytes(self.rot.y.to_ne_bytes()); v[self.memory_start + 6] = u32::from_ne_bytes(self.rot.z.to_ne_bytes()); - v[self.memory_start + 7] = u32::from_ne_bytes(self.radius.to_ne_bytes()); + v[self.memory_start + 7] = u32::from_ne_bytes([self.color.x, self.color.y, self.color.z, self.roughness]); - v[self.memory_start + 8] = u32::from_ne_bytes([self.color.x, self.color.y, self.color.z, self.roughness]); + v[self.memory_start + 8] = self.transparent as u32; + + v[self.memory_start + 9] = u32::from_ne_bytes(self.radius.to_ne_bytes()); v } @@ -205,4 +216,12 @@ impl Volumetrics for Sphere { let rad_vec = Vector3 {x: self.radius, y: self.radius, z: self.radius}; (self.pos - rad_vec, self.pos + rad_vec) } + + fn is_transparent(&self) -> bool { + self.transparent + } + + fn set_transparency(&mut self, transparent: bool) { + self.transparent = transparent; + } } \ No newline at end of file