00:02 fdobridge: <r​edsheep> 1. NVK+Zink plasma wayland session is just a black screen and cursor. You can force applications to open in it from ssh, but nothing comes up naturally.
00:02 fdobridge: <r​edsheep> 2. NVK+Zink plasma x11 session flickers between the last few frames across steam and various kde apps, and seems to get more intense under load
00:02 fdobridge: <r​edsheep> 3. NVK+Zink plasma x11 session crashes kwin in libvulkan_nouveau.so on launch, and every few hours after.
00:02 fdobridge: <r​edsheep> 4. NVK+Zink causes Chromium to randomly hit Xid13, so a crash due to an issue with a shader (This one is almost certainly not zink's fault)
00:02 fdobridge: <r​edsheep> 5. Zink on discord has corruption with the UI, especially under high gpu load. From what I understand this happens on radv as well.
00:03 fdobridge: <g​fxstrand> There are also still some fence bugs with need to sort out in nouveau.ko.
00:04 fdobridge: <z​mike.> Zink has been tested and is used regularly with plasma sessions on other platforms without issues
00:05 fdobridge: <z​mike.> I'm more suspicious of nvk in most of those issues
00:05 fdobridge: <z​mike.> Is this the discord client?
00:06 fdobridge: <z​mike.> Or browser?
00:06 fdobridge: <r​edsheep> Right, sinze they will open as zink issues though I thought I would ask
00:06 fdobridge: <g​fxstrand> I suspect at least some of the plasma issues are something to do with non-modifiers paths somewhere.
00:06 fdobridge: <r​edsheep> Discord client, the electron app
00:06 fdobridge: <z​mike.> Probably
00:06 fdobridge: <z​mike.> Ah
00:06 fdobridge: <z​mike.> Are you sure that's using zink
00:06 fdobridge: <z​mike.> And not ANGLE
00:07 fdobridge: <r​edsheep> It only happens when I enable NOUVEAU_USE_ZINK or the loader override, and does not rely on having it set on the entire session or not
00:07 fdobridge: <r​edsheep> I bring it up with the others because if it's your whole session suddenly all these non-games are obviously zink
00:08 fdobridge: <z​mike.> Still not conclusive, there could be issues with dmabufs shared across GL contexts
00:08 fdobridge: <g​fxstrand> I'm starting to suspect that these have something to do with explicit implicit sync.
00:08 fdobridge: <z​mike.> Zink has a driver workaround to force that on Nvidia blob
00:10 fdobridge: <z​mike.> Open tickets I suppose, can't hurt
00:10 fdobridge: <r​edsheep> Okay, sounds good
00:14 fdobridge: <r​edsheep> Turnip is the platform where zink sessions have been tested the most, right? Could the difference be that the other well tested platforms all have descriptor buffer?
00:14 fdobridge: <r​edsheep> You had mentioned that influences quite a lot of how well zink works
00:20 fdobridge: <z​mike.> They're pretty well tested on AMD by now too
00:20 fdobridge: <z​mike.> Zink is reasonably well tested without DB because of venus
00:26 fdobridge: <z​mike.> ...also the non-DB code was the default/only codepath for years before DB existed and hasn't changed since
00:30 fdobridge: <a​irlied> a fedora kernel with the modifiers fix would be a few weeks away
00:30 fdobridge: <a​irlied> I can accelerate the process but it's not usually worth the pain
00:31 fdobridge: <z​mike.> Guess it's a few weeks until I need to roll up my boots then
00:31 fdobridge: <z​mike.> :sweatytowelguy:
01:09 fdobridge: <r​edsheep> I am no longer seeing the plasma x11 session crash... Either that got fixed, or is harder to replicate now because it doesn't happen on first load
01:09 fdobridge: <g​fxstrand> @redsheep If you want to play around, my nvk/cbuf0 branch might help. I suggest trying it with `NVK_DEBUG=no_cbuf`. I'm going to try and improve the cbuf situation tomorrow.
01:09 fdobridge: <g​fxstrand> (With perf, that is.)
01:10 fdobridge: <r​edsheep> https://tenor.com/view/yyyess-yes-banbert-excited-gif-20963567
01:12 fdobridge: <z​mike.> Improving with perf is my favorite kind of improving
01:12 fdobridge: <r​edsheep> Yeah to be honest I don't actually care about modifiers for the sake of modifiers like... at all... I have just been testing it to try and speed things along so we can go back to fun stuff
01:13 fdobridge: <g​fxstrand> hehe
01:13 fdobridge: <g​fxstrand> Yeah, modifiers are the most important least interesting thing.
01:13 fdobridge: <g​fxstrand> Hence why I've been putting them off. 😅
01:15 fdobridge: <g​fxstrand> Right now that branch is very not great but I think should barely accomplish the objective. I need to give more thought to how I want it to look long-term.
01:15 fdobridge: <r​edsheep> What kind of not great? Like, you don't like something with quality or maintainability, or you think it will crash?
01:15 fdobridge: <g​fxstrand> And it seems to mostly pass CTS
01:16 fdobridge: <g​fxstrand> I don't expect crashes though it's possible with a change this major
01:16 fdobridge: <g​fxstrand> It's more that it's a really hacky way of doing it.
01:16 fdobridge: <g​fxstrand> I still don't have a plan for a clean way
01:18 fdobridge: <r​edsheep> What is this branch actually doing? What does CB0 mean?
01:26 fdobridge: <r​edsheep> Hmm I see now why you were talking about the mme
01:38 fdobridge: <r​edsheep> Yeah, the branch definitely isn't quite as solid as main, zink session went from mostly okay to barely working lol
01:55 fdobridge: <r​edsheep> Unfortunately that forced me to change two variables at once, I had to go back to an nvc0 session. Switching that and from fresh main to cbuf0 without doing the environment variable resulted in:
01:55 fdobridge: <r​edsheep> Talos: 80 > 76 fps (probably session type, this is similar to previous tests I did along these lines)
01:55 fdobridge: <r​edsheep> Doom Eternal: 22 > broken, black screen on launch
01:55 fdobridge: <r​edsheep> The Witness: 56 > 56 fps
01:55 fdobridge: <r​edsheep> I add NVK_DEBUG=no_cbuf and I get:
01:55 fdobridge: <r​edsheep> Talos - 76 > 68 fps, bizarrely it is a performance regression, and I have tested back and forth several times to confirm
01:55 fdobridge: <r​edsheep> Doom Eternal: Remains broken
01:55 fdobridge: <r​edsheep> At this point it was not looking so great but I had one more game to test:
01:55 fdobridge: <r​edsheep> The Witness 56 > 99 fps a *77% improvement*
01:56 fdobridge: <r​edsheep> @gfxstrand It's not all roses, but there's a pretty huge bright spot there at the end
02:00 fdobridge: <r​edsheep> 99 fps is the highest I have ever seen in The Witness on NVK from that test location, and it's not even close
02:08 fdobridge: <g​fxstrand> Yeah. I'm not surprised it's a bit broken. The branch needs serious work. Getting a good bump in The Witness makes me happy, though. I'll keep going. I'm sure I can get it solid. This is the very hacky "let's try to use the inline path" version. It's gonna take more work to be sure.
02:08 fdobridge: <g​fxstrand> But if we're getting a bump, that tells me that maybe I'm on to something.
02:08 fdobridge: <g​fxstrand> More work to do.
02:11 fdobridge: <r​edsheep> I think the doom eternal issue is really just that it starts rendering really really slowly when it goes to render the menu background, and the game draws black over it for a few frames so you don't see things popping in, but it gets so slow the black frames don't end. That's similar to what was happening with running the zink session, it just got really slow
02:11 fdobridge: <a​irlied> filed an f40 update dropping nvk
02:14 fdobridge: <r​edsheep> Also it doesn't seem the cbuf0 branch outright breaks zink performance, it's still running minecraft just fine
02:44 fdobridge: <a​irlied> okay found the bug with autosuspend, now to find the right fix
03:07 fdobridge: <a​irlied> https://patchwork.freedesktop.org/patch/594067/
03:07 fdobridge: <a​irlied> @gfxstrand probably should add that to your tree
03:08 fdobridge: <g​fxstrand> Yeah, the CTS also seems slow. IDK why yet. I'm sure it's fixable.
03:09 fdobridge: <g​fxstrand> Oh, nice! I'm definitely going to pull that in and give it a spin. Does it affect the GPU sleep issues?
03:09 fdobridge: <!​DodoNVK (she) 🇱🇹> Only jadahl wanted a code change (2 other people already ACKed it)
03:10 fdobridge: <a​irlied> yes it should fix the gpu sleep
03:12 fdobridge: <g​fxstrand> Sweet
03:12 fdobridge: <g​fxstrand> Yeah, that should help a lot. Maybe I can actually GDB things on my laptop now. 😂
03:13 fdobridge: <r​edsheep> Alright one issue filing down down, 4 to go lol
03:21 fdobridge: <g​fxstrand> Now if only we could figure out why I sometimes get "VMM allocation failed" and my firmware takes a hike into the woods indefinitely.
03:25 fdobridge: <a​irlied> that usually means GSP has fatally crashes, need to use the logging patch from timur and send him the output after it dies
03:27 fdobridge: <!​DodoNVK (she) 🇱🇹> Have you done actual hikes in the woods/forests though? 🌳
03:36 fdobridge: <r​edsheep> In the course of 4 hours I haven't yet hit the xid13 in Chromium, so clearly that one is not common.
03:45 fdobridge: <r​edsheep> Since I can't easily replicate that one I won't torture somebody with an issue for the xid error, for all I know it is fixed.
03:45 fdobridge: <r​edsheep> If somebody wants to label these others NVK and Zink, that would be great:
03:45 fdobridge: <r​edsheep> https://gitlab.freedesktop.org/mesa/mesa/-/issues/11160
03:45 fdobridge: <r​edsheep> https://gitlab.freedesktop.org/mesa/mesa/-/issues/11161
03:45 fdobridge: <r​edsheep> https://gitlab.freedesktop.org/mesa/mesa/-/issues/11162
03:45 fdobridge: <r​edsheep> https://gitlab.freedesktop.org/mesa/mesa/-/issues/11163
03:55 fdobridge: <r​edsheep> Thanks @asdqueerfromeu
04:27 fdobridge: <g​fxstrand> Branch should be updated. I'll let you know if it blows up
05:18 fdobridge: <m​arysaka> *note down to redirect her urges to write a register allocator to that*
08:32 fdobridge: <m​tijanic> Does anyone here regularly trace/profile/etc OpenRM or other nvidia kmods? I expect it's mostly just code reading for OpenRM and then runtime mmio tracing the UMDs for work submission and other UMD->GPU communication, and no one realy cares about UMD->KMD interface?
08:32 fdobridge: <m​tijanic>
08:32 fdobridge: <m​tijanic> But if you do, I'd like to hear how you do it and what the painpoints are.
08:50 fdobridge: <a​irlied> I usually just stick printfs in the kernel code to trace what paths are used
08:51 fdobridge: <a​irlied> Dumping gsp msgs also sometimes useful
08:57 fdobridge: <m​tijanic> We mostly use bpftrace, plus a few other specialized tools, as you often want to trace something without reloading (and/or recompiling) the kmod. But the whole thing is a pretty diffuse with multiple sets of scripts doing the same thing, etc. I've recently taken to consolidating the bits and was just curious if it's something external people would find useful.
08:58 fdobridge: <m​tijanic> Well, useful _enough_ to justify going through the process of getting it published. If there's only a specific issue you have here or there, we can just work to fix that or share one of the many hacks we have to work around it.
09:01 fdobridge: <m​tijanic> As a fun fact, in the more extreme end of the spectrum, I have a script I can `curl | sh` that builds and installs a kmod which disables write protections on the kernel and then hotpatches some BPF functionality :D. Not something I'd share in good consciousness though.
09:12 fdobridge: <a​irlied> With the open module for most of us just rebuild with specific printfs is probably easier the few times we need to use it
09:18 fdobridge: <k​arolherbst🐧🦀> I just found out about `nir_lower_wrmasks` and it looks like nak and codegen could benefit from it by not having to do that stuff themselves
09:19 fdobridge: <k​arolherbst🐧🦀> though not sure how much nak would actually benefit there
14:39 fdobridge: <m​henning> @karolherbst I've known about that pass for a while. I forget why I don't use it in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984 - I think a different pass also lowers them for us, but I forget which one
14:40 fdobridge: <m​henning> Anyway, NAK's lowering is similar to that MR, so I don't think it's necessary
14:48 fdobridge: <g​fxstrand> Meh. It's not that hard to lower in NAK and we have to deal with alignments anyway so we may as well do both at the same time.
14:49 fdobridge: <g​fxstrand> I considered using it but I had to handle alignments anyway and it was the same loop
14:50 fdobridge: <k​arolherbst🐧🦀> yeah, fair
14:50 fdobridge: <k​arolherbst🐧🦀> hot take: we should get rid of rwmask altogether :ferrisUpsideDown:
14:50 fdobridge: <k​arolherbst🐧🦀> well.. maybe just for global load/stores
14:51 fdobridge: <k​arolherbst🐧🦀> I fear that some hardware can actually make use of that mask? And I suspect it's intel
14:55 fdobridge: <z​mike.> maybe dumb question but why not use nir_opt_load_store_vectorize
14:56 fdobridge: <m​henning> That's exactly what that MR is doing
14:56 fdobridge: <z​mike.> ok so dumb question after all
14:57 fdobridge: <k​arolherbst🐧🦀> maybe we should just merge it :ferrisUpsideDown:
14:59 fdobridge: <m​henning> It has merge conflicts at this point, and I don't have much time right now to hack on stuff
15:00 fdobridge: <m​henning> If you want to rebase and re-run cts, go ahead
15:00 fdobridge: <a​huillet> MME stands for "macro method expander" btw which gives you an idea of what it was originally meant to be, more of a preprocessor than a real CPU as I understand it
15:01 fdobridge: <g​fxstrand> Very much so
15:02 fdobridge: <g​fxstrand> It took a bit for that difference to click in my head but once it did, the MME design makes a lot of sense.
15:20 fdobridge: <!​DodoNVK (she) 🇱🇹> So it isn't "Memory Management Engine", right?
15:23 fdobridge: <a​huillet> well no?
15:53 fdobridge: <r​edsheep> I believe you're thinking of MMU, memory management unit
15:57 fdobridge: <r​edsheep> @zmike. For the backtrace you're wanting I just need to run a debug build of mesa and wait for the next crash to get that in dmesg, right?
15:58 fdobridge: <z​mike.> probably get it from something like `coredump gdb -1` after the crash
15:58 fdobridge: <r​edsheep> Does that require a debug build? My current one isn't debug
15:58 fdobridge: <z​mike.> yes
15:59 fdobridge: <z​mike.> or at least debug symbols
19:26 Lyude: gfxstrand: once I get through cleaning up the git history for rvkms I might be able to look at that
19:26 Lyude: I'm not sure how much actually needs to change for HDR but I don't think it's much tbh
19:27 airlied: I think how NVIDIA expose HDR is quite different to other HDR vendors, so I expect it's a lot
19:33 Lyude: ah, huh
19:37 fdobridge: <M​isyl with Max-Q Design> In terms of color pipelines for scanout, NVs is remarkably over engineered and over specialized which results in it being overly useless
19:37 fdobridge: <M​isyl with Max-Q Design> 3D LUTs >>>> whatever they have going on
19:42 airlied: I think the NVIDIA evo API is fair bit abstracted from the underlying hw
19:42 airlied: but it's definitely a big job no matter what
19:43 HdkR: Oh no, they aren't just 3D LUTs? D:
19:45 fdobridge: <M​isyl with Max-Q Design> Its like some conversions then luts in ICtCp space
19:45 fdobridge: <M​isyl with Max-Q Design> Its like some conversions then 1D luts in ICtCp space (edited)
19:46 HdkR: Wacky
19:46 fdobridge: <M​isyl with Max-Q Design> Very limiting compared to AMDs 17x17x17 tetrahedral 3D LUTs
19:46 fdobridge: <M​isyl with Max-Q Design> I think QCom might have something similar?
19:47 fdobridge: <M​isyl with Max-Q Design> No idea tho
21:33 fdobridge: <g​fxstrand> @redsheep I reproduced your Witness numbers on my 4060. no_cbuf gives me 20%, too.
21:33 fdobridge: <g​fxstrand> I think I very badly need to implement bindless cbufs.
21:34 fdobridge: <r​edsheep> Hmm? It gave me 77% more performance, but I guess your's won't be as drastic with a narrower gpu
21:34 fdobridge: <r​edsheep> Do you have msaa on?
21:34 fdobridge: <g​fxstrand> Yeah, 66 FPS with 80 FPS, no MSAA.
21:34 fdobridge: <r​edsheep> I have been testing maxed msaa, wonder if that also changes things
21:35 fdobridge: <r​edsheep> At the least it makes it heavier
21:35 fdobridge: <g​fxstrand> Yeah
21:36 fdobridge: <r​edsheep> I really like the witness as a test because it loads so fast, and it's very consistent if you can find a way to anchor looking at exactly the same thing from the same place
21:36 fdobridge: <r​edsheep> The world has nothing dynamic, like at all
21:37 fdobridge: <r​edsheep> Is this cbuf work something that counts as being fixes to go into 24.1 point releases or is this 24.2 stuff at this point?
21:40 fdobridge: <g​fxstrand> 24.2
21:41 fdobridge: <g​fxstrand> Yeah, it varies by like 1 FPS once everything is loaded
21:44 fdobridge: <r​edsheep> Oh btw if you do use it for testing, something that really helps is to get positioned and then exit and relaunch before taking down numbers
21:44 fdobridge: <r​edsheep> That way when you load in next with a change it's more precisely comparable
21:55 fdobridge: <r​edsheep> Anyway, let me know if you reach another point where you want more testing.
21:56 fdobridge: <g​fxstrand> I'm going to go on a bindless cbuf quest for a bit. Once I've got those working and The Witness going even faster, I'll throw it at you again.
21:57 fdobridge: <r​edsheep> Sounds good. Have you found what part is making some stuff really slow?
21:57 fdobridge: <g​fxstrand> I've got theories but I need bindless cbufs to fix them.
21:57 fdobridge: <g​fxstrand> Which is going to be a bit of a quest because it's a lot of NAK work.
21:57 fdobridge: <k​arolherbst🐧🦀> so it's finally going to happen
21:58 fdobridge: <g​fxstrand> It's got to
21:58 fdobridge: <k​arolherbst🐧🦀> the funky part is using them as source
21:58 fdobridge: <g​fxstrand> That's not too bad but I'll have to figure out the encoding
21:59 fdobridge: <k​arolherbst🐧🦀> ohh
21:59 fdobridge: <k​arolherbst🐧🦀> does NAK support uniform regs?
21:59 fdobridge: <k​arolherbst🐧🦀> because if not, you might want to do that first
21:59 fdobridge: <g​fxstrand> Not really
22:00 fdobridge: <g​fxstrand> And they're kinda dumb
22:00 fdobridge: <g​fxstrand> But I'm going to have to do that
22:00 fdobridge: <k​arolherbst🐧🦀> yeah..
22:00 fdobridge: <g​fxstrand> At least a little bit
22:00 fdobridge: <k​arolherbst🐧🦀> using bindless ubos as sources requires the address to be in an uniform reg
22:00 fdobridge: <g​fxstrand> I know
22:01 fdobridge: <k​arolherbst🐧🦀> anyway, fun project
22:01 fdobridge: <k​arolherbst🐧🦀> what's the bad part about them though?
22:01 fdobridge: <g​fxstrand> You can only use them in uniform control flow and there's pretty much only integer instructions for them.
22:02 fdobridge: <k​arolherbst🐧🦀> ah yeah, fair
22:02 fdobridge: <g​fxstrand> So they're not something where we can convert all non-divergent things to them.
22:02 fdobridge: <g​fxstrand> We can pretty much only use them for a few cbuf things.
22:02 fdobridge: <g​fxstrand> Which is kinda fine
22:02 fdobridge: <k​arolherbst🐧🦀> yeah..
22:02 fdobridge: <k​arolherbst🐧🦀> I think that's the main idea
22:04 fdobridge: <k​arolherbst🐧🦀> but like.. you can also just always write an uniform value into an uniform register if you need it
22:04 fdobridge: <g​fxstrand> Sure
22:05 fdobridge: <g​fxstrand> And some LDC might want to do that
22:06 fdobridge: <r​edsheep> Just curious, given the need for some bigger NAK changes here is this a situation where you are liking or disliking the CTS focused path you've been on so far?
22:06 fdobridge: <r​edsheep> I know it's kind of an abstract question
22:06 fdobridge: <r​edsheep> As in, would this have been easier earlier, or is it easier now because you know that everything else is basically working?
22:07 fdobridge: <k​arolherbst🐧🦀> what's interesting is, that tex instructions can also directly get the handle from an uniform register instead of doing the cbuf pull
22:08 fdobridge: <g​fxstrand> Oh, it was absolutely the right choice. I can regression test my changes.
22:09 fdobridge: <k​arolherbst🐧🦀> what's more interesting, that it's a 64 bit read, not 32 as normal
22:33 fdobridge: <m​ohamexiety> is this more limited than other scalar implementations? like e.g. AMD's SALU or if Intel have something similar
22:36 fdobridge: <g​fxstrand> Yeah, much more limited
22:43 fdobridge: <m​ohamexiety> 😮 I see. I was under the impression that the others were also more of dedicated units for address generation and such and you realistically couldn't do that much with them (barring some scalarization tricks on AMD)