00:02fdobridge: <karolherbst🐧🦀> writing a gallium driver in rust should be pretty straightforward
00:03fdobridge: <karolherbst🐧🦀> it's almost like rusticl that you just provide some API callbacks and have some bindings
00:03fdobridge: <karolherbst🐧🦀> though we do have some annoying static inlines which are a pain
00:03i509vcb: From what I saw in gallium, it's pretty much just a bit function table and some void pointer for dafa
00:03fdobridge: <karolherbst🐧🦀> yeah
00:03i509vcb: Two typos...
00:04fdobridge: <karolherbst🐧🦀> the annoying part is, that the gallium API contains lots of silly fixes for silly and broken compilers, soo...
00:05fdobridge: <karolherbst🐧🦀> so things which should actually be `enum whatever` are just `unsigned`
00:05fdobridge: <karolherbst🐧🦀> and that makes the binding situation a bit more of a pita
00:15Lyude: tbh i'd love to see us have the kernel driver in rust someday too
00:16airlied: I think a gsp one would be possible though skeggsb things I'm underestimating the pain :-P
00:16Lyude: it would also be nice for us to actually use crates in some form if we aren't in mesa tbh, there's a lot of really useful stuff I don't think is really productive to reimplement ourselves
00:17Lyude: airlied: if rust is involved i will go through infinite pain because i like rust that much :)
00:17Lyude:still in disbelief over how quickly she can get stuff done with neovim-gtk in rust
00:19airlied: gotta a day of learning soon I intend to burn on rust, just not sure where to burn it
00:21fdobridge: <gfxstrand> NAK requires 3 crates. That's why I'm using crazy branches.
00:22i509vcb: Mesa is going to need cargo somewhere unless we want to reinvent the wheel
00:22i509vcb: Or vendor everything under the sun and write a meson script for everything we vendor
00:22airlied: the problem with mesa using cargo is distros run into problems
00:23airlied: and mesa is a pretty core system component
00:23airlied: esp when you get into we just need this one dep, which then has 20 deps
00:25fdobridge: <gfxstrand> When I say "NAK requires 3 crates" that's the entire dependency chain and they're only required at build time for a proc macro. No creates are actually linked in.
00:26i509vcb: Firefox I think has 300 crates (including dependencies of dependenies) and seems to manage
00:26fdobridge: <gfxstrand> If we have to maintain meson wraps for syn, proc-macro2, and quote, that's not the end of the world.
00:27fdobridge: <gfxstrand> I'd like to be able to use some other crates, though.
00:27fdobridge: <gfxstrand> I'm definitely duplicating a bit
00:28fdobridge: <gfxstrand> At the moment, Dylan's plan is basically "re-implement cargo in meson" and IDK that that's a great plan but I'm choosing to focus on writing a driver, not a build system.
00:30i509vcb: I'm skeptical that will be maintainable long term if more than a few crates will be used
00:30Lyude: also, anything separate from cargo is in itself kind of padding upstream
00:31Lyude: IMO it makes more sense for us to stick close to the rust community with this stuff, because yeah - we don't really want to be maintaining our own build system, or adding extra friction when it comes to using other crates
01:24fdobridge: <gfxstrand> Tell that to Dylan
01:24fdobridge: <gfxstrand> I'm staying out of it for now
01:29fdobridge: <karolherbst🐧🦀> yeah.. firefox already added all the pain
01:29fdobridge: <karolherbst🐧🦀> might just as well rely on that
01:29fdobridge: <karolherbst🐧🦀> 😄
01:35fdobridge: <gfxstrand> Honestly, I'm more interested in nightly features than creates most of the time.
01:36fdobridge: <karolherbst🐧🦀> that bad? I'm still sticking to 1.57, but maybe I should check what I can use to clean up some of the code, though the biggest todo thing is still using `serde`
01:36fdobridge: <karolherbst🐧🦀> also `num-integer` helps not needing nightly for some things
01:36fdobridge: <gfxstrand> For Vulkan, I want the allocator feature.
01:36fdobridge: <gfxstrand> And integer rounding
01:37fdobridge: <gfxstrand> But that one's easy enough to just implement myself
01:37fdobridge: <karolherbst🐧🦀> or use `num-integer` 😛
01:37fdobridge: <gfxstrand> Or that
01:37fdobridge: <karolherbst🐧🦀> which I also think about using so I can drop some util code
01:37fdobridge: <karolherbst🐧🦀> they usually use the same method names as the nightly stuff, so at some day you can just drop it
01:37fdobridge: <gfxstrand> But new_in for Box and Vec would be really nice
01:37fdobridge: <karolherbst🐧🦀> yeah...
01:37fdobridge: <gfxstrand> Yup
01:38fdobridge: <karolherbst🐧🦀> I hand waved _a_lot_ on the memory error handling in rusticl for now
01:38fdobridge: <karolherbst🐧🦀> I hand waved _a lot_ on the memory error handling in rusticl for now (edited)
01:38fdobridge: <karolherbst🐧🦀> but yeah... having the stuff available to catch allocation errors will be helpful
01:39fdobridge: <gfxstrand> That's not too hard to deal with.
01:39fdobridge: <karolherbst🐧🦀> well.. atm there is no way to do with it
01:40fdobridge: <gfxstrand> My VkBox type returns `Result<VkBox, VkResult>`
01:40fdobridge: <gfxstrand> So it's hand rolled exactly the one place
01:40fdobridge: <gfxstrand> Everything else just uses ?
01:40fdobridge: <karolherbst🐧🦀> ohh sure, but what if you allocate a Vec and it panics because of no memory?
01:41fdobridge: <karolherbst🐧🦀> or well.. something else
01:41fdobridge: <gfxstrand> Yeah... I don't have a VkVec.
01:41fdobridge: <karolherbst🐧🦀> they are working on it for the kernel anyway, but I'm not sure if that will ever find its way into normal rust
01:43fdobridge: <karolherbst🐧🦀> ohh wait..
01:43fdobridge: <gfxstrand> Yeah, I don't think the rust folks have a plan to deal with allocation failure besides `panic!`
01:43fdobridge: <karolherbst🐧🦀> there is `Vec::try_reserve` mhhh
01:44fdobridge: <gfxstrand> Yeah, I don't think you'd want to use that for everything.
01:44fdobridge: <karolherbst🐧🦀> thinking the same
01:44fdobridge: <gfxstrand> IDK how you'd want vec to work. 🤔
01:45fdobridge: <karolherbst🐧🦀> well Vec::new doesn't allocate storage anyway, so it's like a few bytes, but yeah...
01:45fdobridge: <gfxstrand> try_push, I guess
01:46fdobridge: <karolherbst🐧🦀> yeah.. maybe
01:47fdobridge: <karolherbst🐧🦀> I think I forgot if I asked or not, but will you be at fosdem?
01:53fdobridge: <karolherbst🐧🦀> @gfxstrand `Earlier this year, rusticl merged into Mesa` you've been working on the text for a while, weren't you? 😛
01:53fdobridge: <karolherbst🐧🦀> @gfxstrand `Earlier this year, rusticl merged into Mesa` you've been working on the text for a while, haven't you? 😛 (edited)
02:10fdobridge: <gfxstrand> Oops. I'll tell Mark to fix that
02:10fdobridge: <gfxstrand> No
02:15fdobridge: <gfxstrand> Fixed
02:36pabs: Lyude, airlied, i509vcb, gfxstrand, karolherbst: distro opinions go like this: some distros like Debian can now cope somewhat with cargo deps. never do vendoring, dep pinning or bumping dep minimum versions without reason please. Rust/LLVM's architecture support is less than GCC, although there are in-progress ways to deal with that (gccrs, rustc_codegen_gcc, mrustc). Rust isn't bootstrappable solely from source, but gccrs/mrustc can maybe he
02:36pabs: lp. Firefox/Chromium are ridiculous but get a pass because they are too-big-to-fail
02:55karolherbst: same would be valid for mesa
03:22fdobridge: <gfxstrand> No one cares about a Vulkan driver on any of the hardware Rust doesn't have 1st class support for.
03:23fdobridge: <gfxstrand> Or maybe I'm missing the argument
03:30i509vcb: rust is first class (or tier 2) on pretty much all the hardware that I've seen people care about
03:30i509vcb: x86, aarch64, riscv64gc (I did buy that little SBC with the imagination gpu), mips, ppc
03:30i509vcb: Although I imagine there is something I haven't covered
11:53fdobridge: <Esdras Tarsis> I was testing DXVK on NVK yesterday and DXVK_HUD made me laugh 🐸
11:53fdobridge: <Esdras Tarsis> https://cdn.discordapp.com/attachments/1034184951790305330/1071035621252026429/02-02-23-193248-SCREEN.png
11:54RSpliet: i509vcb: any luck improving imagination's open source driver to work on that SBC? :-P
16:40i509vcb: there was a yocto image somewhere that had a heavily patched mesa and a patched kernel
21:27fdobridge: <J., Echo (she) 🇱🇹> @Esdras Tarsis Try NFS Most Wanted (2005) at 1080p max settings with DXVK 😈
21:29fdobridge: <Esdras Tarsis> Which will crash first, the gpu or xorg? 🐸
21:30fdobridge: <J., Echo (she) 🇱🇹> i wonder if NVK is compatible with the default Arch Linux kernel (so I can try it myself)
21:35fdobridge: <Esdras Tarsis> yeah is compatible, but using 00.06-gr-ampere branch from Ben's repository is recommended
21:45fdobridge: <J., Echo (she) 🇱🇹> I wonder what that branch adds
21:46fdobridge: <J., Echo (she) 🇱🇹> I know that another branch added broken GSP support (we know it's at least broken on TU117)
22:04fdobridge: <WaelUnix> wait, DXVK's already working???
22:04fdobridge: <WaelUnix> gotta compile mesa asap
22:04fdobridge: <WaelUnix> gotta recompile mesa asap (edited)
22:05fdobridge: <Rhedox> ancient dxvk
22:05fdobridge: <Rhedox> works with simple things
22:18fdobridge: <Esdras Tarsis> And some extensions enabled on nvk
22:19fdobridge: <WaelUnix> hmm since when did mesa required zstd to build 🤨
22:19fdobridge: <Esdras Tarsis> @WaelUnix for reference
22:21fdobridge: <WaelUnix> wow that is quite ancient
22:22fdobridge: <WaelUnix> lm_sensors too?
22:22fdobridge: <Esdras Tarsis> Yeah, the latest dxvk version require vulkan 1.3 and nvk is vulkan 1.0 🐸
22:22fdobridge: <Esdras Tarsis> 1.5.1 is the last version that supports vulkan 1.0
22:23fdobridge: <WaelUnix> it's 3 years old but it seems to have been running games
22:25fdobridge: <WaelUnix> \*fan spinning sounds\*
22:25fdobridge: <WaelUnix> https://cdn.discordapp.com/attachments/1034184951790305330/1071194725371097208/image.png
22:25fdobridge: <WaelUnix> that's totally mesa 22.0.4 😉
22:26fdobridge: <J., Echo (she) 🇱🇹> wael sounds familiar
22:33fdobridge: <WaelUnix> 🧊 vkcube 🧊
22:33fdobridge: <WaelUnix> https://cdn.discordapp.com/attachments/1034184951790305330/1071196681342828655/image.png
22:33fdobridge: <WaelUnix> gotta say it's nice having wl_roots not flicker on nvidia for once
22:34fdobridge: <WaelUnix> too bad this is probably nouveau and not nvk cause gles 😢
22:34fdobridge: <WaelUnix> so probably not as accelerated
22:35fdobridge: <WaelUnix> gotta say it's nice having wlroots not flicker on nvidia for once (edited)
22:46fdobridge: <WaelUnix> downloading dota2 atm to test nvk
22:47fdobridge: <WaelUnix> oh, steam doesn't run 😂
22:47fdobridge: <WaelUnix> it crashes at some glx call, xwayland issue?
22:57Lyude:back on nouveau kernel work :)