06:04 fdobridge: <g​fxstrand> I'm starting to think so, yes. Something to do with clipping.
06:04 fdobridge: <g​fxstrand> It's the only thing that makes sense at this point.
06:04 fdobridge: <g​fxstrand> I've run out of documented bits to twiddle.
06:05 fdobridge: <g​fxstrand> And now that I've verified that NVK, Nvidia, and ANV are all getting exactly the same depth values for other pixels, I know bias is working correctly and that they're not shutting it off like it looked in the trace from @airlied. There's something missing with clip settings.
06:06 fdobridge: <g​fxstrand> I also think there might be a chicken bit we're missing because when I was originally getting depth clipping working, it wasn't clipping properly to one of the planes. I had to smash the guardband scale to 1 and use the guardband to clip Z in order to clip both planes. That seems very wrong.
06:07 fdobridge: <g​fxstrand> This seems fundamental enough that I suspect there's an MMIO bit or two for the clipper that we're just missing.
06:09 fdobridge: <g​fxstrand> A quick grep of OGK isn't being particularly instructive.
06:11 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> Does that require reverse-engineering?
06:15 fdobridge: <g​fxstrand> Sometimes we can ask people at NVIDIA and they just tell us.
08:19 fdobridge: <k​arolherbst🐧🦀> yeah, I got told about the fp helper invoc stuff after I asked
09:01 fdobridge: <k​arolherbst🐧🦀> @gfxstrand but now that we know what we are looking for, we should be able to find it ourselves. Mind dumping all pushbuffers, especially the macro invocations? And it kinda has to be one of those: https://nv-tegra.nvidia.com/r/gitweb?p=linux-nvgpu.git;a=blob;f=drivers/gpu/nvgpu/hal/gr/init/gr_init_gv11b.c;h=6f6f6bb9709dfa3170cf8837fea9c768caf31930;hb=refs/heads/rel-36#l58
09:01 fdobridge: <k​arolherbst🐧🦀> unless they do it on the kernel side for everything
09:01 fdobridge: <k​arolherbst🐧🦀> but maybe it's again gr_pri_gpcs_tpcs_sm_disp_ctrl 🙃
09:01 fdobridge: <k​arolherbst🐧🦀> try flipping random bits until it works
09:01 fdobridge: <k​arolherbst🐧🦀> set it all to 0 and all to 1 for starters
09:01 fdobridge: <k​arolherbst🐧🦀> `0x404468, /* gr_pri_mme_max_instructions */` might come in handy at some point
09:01 fdobridge: <k​arolherbst🐧🦀> `0x418380, /* gr_pri_gpcs_rasterarb_line_class */` it has "raster" in it's name
09:01 fdobridge: <k​arolherbst🐧🦀> but yeah, if you summarize what you need I can send an email to Andy, or you can do it, either way should work
15:27 fdobridge: <g​fxstrand> Oh, like z_cull_ctx_debug, maybe? 😂
15:28 fdobridge: <g​fxstrand> Oh, like zcull_ctx_debug, maybe? 😂 (edited)
15:29 fdobridge: <g​fxstrand> I've got a dump of their stuff somewhere still. I'll try and dig through it.
15:29 fdobridge: <g​fxstrand> Or maybe I should play with @marysaka's new dumper
15:53 fdobridge: <m​arysaka> I also have a branch with a tool for the push decoding if you need that <https://gitlab.freedesktop.org/marysaka/mesa/-/tree/nouveau/pushbuf-dump-tool>
16:24 benjaminl: oh lol I wrote a similar tool last week, not knowing this existed
16:24 benjaminl: this version is significantly nicer :)
16:44 benjaminl: is there a chance someone has already written a CLI front-end for the MME simulators as well?
17:00 fdobridge: <m​arysaka> I didn't but it could be nice to have one (with some way to pretty print instructions from a blob too)
17:04 fdobridge: <g​fxstrand> Do I need to use ogk for your dumper or will it work on the blob kernel?
17:05 fdobridge: <m​arysaka> ogk? For envyhooks you need blob driver with version 535.113.01
17:06 fdobridge: <k​arolherbst🐧🦀> ogk is the open source version
17:06 fdobridge: <m​arysaka> oh I only tested with the blob one
17:06 fdobridge: <m​arysaka> but I use the open source one for ioctl arg struct
17:06 fdobridge: <m​arysaka> but I use the open source one for ioctl arg structs (edited)
17:06 fdobridge: <g​fxstrand> Okay
17:06 fdobridge: <g​fxstrand> Yeah, I don't want to mess with OGK
17:07 fdobridge: <g​fxstrand> Blob is better
17:07 fdobridge: <m​arysaka> also you need to set ``EHKS_PUSHBUF_DUMP_DIR`` for it to actually dump stuffs
17:07 fdobridge: <g​fxstrand> Where is envyhooks?
17:07 fdobridge: <m​arysaka> https://gitlab.freedesktop.org/marysaka/envyhooks
17:08 fdobridge: <g​fxstrand> Thanks!
17:08 fdobridge: <m​arysaka> (the pushbuf-dump-tool's branch was only for analysing the resulting output blobs)
17:08 fdobridge: <g​fxstrand> That's fine. Probably better that way anyway
17:08 fdobridge: <m​arysaka> be aware that it does split a lot of files (used to be worse buut yeah)
17:09 fdobridge: <g​fxstrand> That's okay
17:09 fdobridge: <m​arysaka> oh and yeah that's an LD_PRELOAD style thing
17:10 fdobridge: <m​arysaka> and you need rust nightly (because of c_variadic, if you find a way to get ride of that I could use stable)
17:13 fdobridge: <g​fxstrand> @karolherbst I'm going to try and work on slides today. I think for the nouveau update talk, I'll plan to talk about NVK and the new uAPI and I'll leave GSP and any other nouveau happenings to you.
17:13 fdobridge: <k​arolherbst🐧🦀> yeah, fair
17:13 fdobridge: <k​arolherbst🐧🦀> I try to work on my slides and everything tomorrow
17:14 fdobridge: <g​fxstrand> @karolherbst Does RH have a slide deck template they want people using? I'm going to use the Collabora template for my NAK talk but the nouveau/NVK one should probably either be generic or some sort of hybrid.
17:14 fdobridge: <k​arolherbst🐧🦀> uhh.. if there is I never actually bothered using it
17:14 fdobridge: <g​fxstrand> lol
17:14 fdobridge: <g​fxstrand> Maybe I'll just add some RH logos to the Collabora deck and make it a little less purple. 🙃
17:16 fdobridge: <k​arolherbst🐧🦀> just mix the colors and use what's the result of it 🙃
17:16 fdobridge: <k​arolherbst🐧🦀> but yeah, I don't particularly care about company branding and nobody told me to do it, so whatever 🤷
17:17 fdobridge: <k​arolherbst🐧🦀> if they want to see their logos at a conference, they can sponsor it 🙃
17:26 benjaminl: oh wow, this envyhooks thing is also massively nicer than what I was doing with a hacked demmt :)
17:26 benjaminl: this is fantastic
17:27 fdobridge: <m​arysaka> It's quite cursed (especially around catching write to USERD memory regions) but it does the job so far 😅
17:39 benjaminl: demmt, even with modifications, only catches like 25% of the pushbufs
17:39 benjaminl: I found the rest by looking at the binary diff on all the memory writes and then picking them out by hand
17:40 karolherbst: yeah... demmt has big gaps these days
17:40 karolherbst: and valgrind is unusable most of the time anyway, so it's good that we have something better now
17:41 benjaminl: hmm, what makes valgrind unusable?
17:41 karolherbst: it's slow
17:41 benjaminl: I had to add a couple new ioctls to it for the chipset injection thing, but it was otherwise fine
17:41 benjaminl: ah
17:41 fdobridge: <m​arysaka> my thing mark the GPFIFO region mapped in process as read only and catch SIGFAULT on it
17:41 karolherbst: it might be good enough for CTS, but if you start running game traces... uhh.. it takes a while
17:41 karolherbst: valgrind runs an instruction simulator
17:43 fdobridge: <g​fxstrand> How about this?
17:43 fdobridge: <g​fxstrand> https://cdn.discordapp.com/attachments/1034184951790305330/1162445588495880262/image.png?ex=653bf6d1&is=652981d1&hm=4bbec2485a21b03e8ddca268e882c76b97f7e0af8638f11de50707c69915b466&
17:43 fdobridge: <k​arolherbst🐧🦀> ahh yeah, that's good
17:44 fdobridge: <g​fxstrand> I had to use Inkscape to make the footer and export it at as a PNG because LibreOffice sucks but whatever...
17:44 fdobridge: <k​arolherbst🐧🦀> 😄
17:45 fdobridge: <k​arolherbst🐧🦀> the last time I used inkscape I uninstalled it 2 seconds later
17:45 fdobridge: <g​fxstrand> It's done now. It took me maybe 30m
17:46 fdobridge: <g​fxstrand> Most of that time was farting around with LibreOffice trying to get it to do things it can't. 😩
17:46 fdobridge: <g​fxstrand> The inkscape bit was like 5m
17:46 fdobridge: <k​arolherbst🐧🦀> pain
17:46 fdobridge: <k​arolherbst🐧🦀> I probably would have tried to do something with krita, but yeah...
17:47 fdobridge: <g​fxstrand> I'm pretty good with InkScape
17:50 fdobridge: <g​fxstrand> And... I just realized that it's totally fine to keep the Collabora green header text because it's pretty close to nvidia green. :triangle_nvk:
17:53 fdobridge: <k​arolherbst🐧🦀> noice
17:54 fdobridge: <g​fxstrand> This looks way too marketing ready
17:54 fdobridge: <g​fxstrand> https://cdn.discordapp.com/attachments/1034184951790305330/1162448211647144027/image.png?ex=653bf942&is=65298442&hm=bfff6d8a3ace9ce1ae0373f592c514594ba150e88c9ca60946f028a2b989b261&
17:54 fdobridge: <g​fxstrand> (Squiggles are because it's a screenshot of the editor)
17:56 fdobridge: <k​arolherbst🐧🦀> that looks way too professional, but we can keep the illusion
17:56 fdobridge: <g​fxstrand> I guess this is what happens when you become a PE (PowerPoint Engineer)
17:57 fdobridge: <g​fxstrand> Though I actually did manage to skip that job title...
17:57 fdobridge: <g​fxstrand> I was doing that job at Intel, though, by the end. 🙃
17:57 fdobridge: <g​fxstrand> Let's try not to remember that. 😅
17:57 fdobridge: <g​fxstrand> Let's try not to remember that... 😅 (edited)
17:57 fdobridge: <k​arolherbst🐧🦀> mhhhhh
17:58 fdobridge: <k​arolherbst🐧🦀> that's my next step 🙃
17:58 fdobridge: <k​arolherbst🐧🦀> ah yes, apparently I'm a SSE now
17:59 fdobridge: <k​arolherbst🐧🦀> I haven't asked if that also includes fancy PP slides...
18:03 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> SSE?
18:04 fdobridge: <k​arolherbst🐧🦀> senior software engineer
18:04 fdobridge: <k​arolherbst🐧🦀> Faith left a reference, so big thanks for that again 🙃
18:06 fdobridge: <g​fxstrand> You're welcome!
18:06 fdobridge: <g​fxstrand> Well earned, IMO
18:07 fdobridge: <k​arolherbst🐧🦀> I'm just bad with all that title stuff, because I'm not particularly caring what title somebody has 🙃
18:08 fdobridge: <k​arolherbst🐧🦀> maybe not that I'm more familiar with the process the next step won't take as long 😄
18:29 fdobridge: <g​fxstrand> Heh. Titles are kinda BS anyway.
18:29 fdobridge: <g​fxstrand> I've met a lot of utterly incompetent PEs
18:32 fdobridge: <k​arolherbst🐧🦀> right, but you also worked for intel 🙃 I'm aware of the stories
18:34 fdobridge: <k​arolherbst🐧🦀> but yeah... the entire process is unfair, and often promotions don't really have merit behind them or the rules are made in a way, that certain kinda of people have an advantage and other nonsense
19:44 fdobridge: <a​irlied> 16 years in and I still don't know where to find the RH slide template
21:12 fdobridge: <g​fxstrand> So far, this slide deck is 90% snark
21:13 Lyude: So - trying to get igt running again so I can see if most of the tests pass with atomic modesetting. I'm seeing that the current tests fail to actually instantiate the dma_copy class - I assume this has something to do with GSP?
21:13 karolherbst: huh... I think that's a new one
21:14 HdkR: Wait
21:14 HdkR: Lyude: No XDC this year?
21:15 HdkR: Who am i supposed to direct all this unbridled shitposting towards now?
21:16 HdkR: karolherbst: No XDC? :O
21:16 karolherbst: no XDC?
21:16 HdkR: I don't see either of you on the participant list
21:16 Lyude: i always forget to add myself :(
21:17 Lyude: i will do that like asap haha
21:17 karolherbst: :D
21:17 karolherbst: I have two talks!
21:17 HdkR: lol, I haven't really peeped the talks :D
21:17 HdkR: whew, safe
21:17 Lyude: karolherbst: I assumed something might have changed with the userspace interface maybe? Note that we actually use libdrm directly in igt, since we basically write stuff to a CPU buffer and then use the copy engine in order to make it tiled (along with clearing memory before we use it, but with the latest GSP changes I have a feeling I might be able to get rid of this bit)
21:19 karolherbst: ahh yeah...
21:19 karolherbst: since ampere even
21:19 karolherbst: let me dig it up
21:20 karolherbst: Lyude: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16784
21:20 karolherbst: ehh
21:20 karolherbst: wrong one
21:20 karolherbst: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17633
21:20 karolherbst: we query the supported classes in userspace now
21:21 karolherbst: and then just you know.. do the same thing as we do on the kernel side
21:21 karolherbst: though the old way should still work
21:21 karolherbst: but you'd still have to use the correct class from userspace
21:21 Lyude: looked in open gpu docs and noticed another dma-copy class that isn't here
21:21 Lyude: so that might just be the issue
21:21 karolherbst: yeah... anyway, since ampere you have to allocate the dma-copy class
21:22 karolherbst: and if you don't, it won't work
21:23 Lyude: yeah that's what we did before :P, I just didn't have the latest class ID added to igt
21:23 Lyude: just added it and it works fine now :)
21:23 karolherbst: cool
21:27 Lyude: eyyyyyyy already crashed the gpu :3
21:27 Lyude: looks like I've got some bugs to track down
21:27 fdobridge: <p​homes> the marp extension in vscode is so nice for presentations. I am supposed to use this annoying power point template at work but all they ever get is the default marp theme 🙂
21:37 Lyude: i like that fbcon seems to still work just fine with the display core crashed
21:43 Lyude: karolherbst: [ 139.787588] nouveau 0000:1f:00.0: gsp: Xid:56 CMDre 00000001 00000200 00000001 00000005 0000000a ← any idea how we can decode this? surprisingly, I don't think we're getting any kind of normal NVdisplay error (…unless that's how we receive those errors now?)
21:45 Lyude: …oh dear. hm.
22:16 Lyude: (I mostly figured it out - it is the NVDisplay error code thankfully, just a little unsure which channel it's coming from now)
23:17 fdobridge: <g​fxstrand> @marysaka
23:17 fdobridge: <g​fxstrand> ```
23:17 fdobridge: <g​fxstrand> EHKS_PUSHBUF_DUMP_DIR=/tmp/dump VK_ICD_FILENAMES=/etc/vulkan/icd.d/nvidia_icd.json LD_PRELOAD=$HOME/projects/envyhooks/target/debug/libenvyhooks.so ./deqp-vk -n dEQP-VK.draw.renderpass.inverted_depth_ranges.nodepthclamp_deltasmall_bias_clamp_pos
23:17 fdobridge: <g​fxstrand> Writing test log into TestResults.qpa
23:17 fdobridge: <g​fxstrand> dEQP Core vulkan-cts- (0xed69dc1c) starting..
23:17 fdobridge: <g​fxstrand> target implementation = 'Default'
23:17 fdobridge: <g​fxstrand> WARNING: GPFIFO data seems invalid, skipping GpFifoRawEntry { opcode: Nop, sync_wait: false, gpu_address: 67108864, size: 566 }
23:17 fdobridge: <g​fxstrand> WARNING: GPFIFO data seems invalid, skipping GpFifoRawEntry { opcode: Nop, sync_wait: false, gpu_address: 69992448, size: 64 }
23:17 fdobridge: <g​fxstrand> WARNING: GPFIFO data seems invalid, skipping GpFifoRawEntry { opcode: Nop, sync_wait: false, gpu_address: 67108864, size: 566 }
23:17 fdobridge: <g​fxstrand> WARNING: GPFIFO data seems invalid, skipping GpFifoRawEntry { opcode: Nop, sync_wait: false, gpu_address: 69992448, size: 64 }
23:17 fdobridge: <g​fxstrand> thread '<unnamed>' panicked at 'assertion failed: request_type != 0 || request_arg_size == 0', src/hooks/mod.rs:302:13
23:17 fdobridge: <g​fxstrand> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
23:17 fdobridge: <g​fxstrand> fatal runtime error: failed to initiate panic, error 5
23:17 fdobridge: <g​fxstrand> ```
23:17 fdobridge: <m​arysaka> huh
23:18 fdobridge: <m​arysaka> ah right that's because I wasn't sure how to passthrough the ioctl arg, you can probably remove the assert @gfxstrand
23:20 fdobridge: <g​fxstrand> Hey, look! Pushbufs!
23:20 fdobridge: <g​fxstrand> 5 of them
23:29 fdobridge: <g​fxstrand> But none of them have 3D draw commands....
23:34 fdobridge: <g​fxstrand> I think it's because the CTS creates multiple devices and I'm not getting pushbufs from anything but the first one
23:34 fdobridge: <g​fxstrand> Which is dumb but what ya gonna do?
23:36 fdobridge: <m​arysaka> huh..
23:37 fdobridge: <m​arysaka> it should be catching all of them 😕
23:39 fdobridge: <g​fxstrand> Ugh... GDBing this thing is such a pain. 😂
23:45 fdobridge: <m​arysaka> yeah I use single step :vReiAgony:
23:47 fdobridge: <g​fxstrand> Yeah, I'm not getting usable data out of this
23:48 fdobridge: <g​fxstrand> Maybe Turing is different? I'm using the same driver version you suggested.
23:49 fdobridge: <m​arysaka> I'm quite confused because trying to run the same thing as you get me a BUS error when trying to query the GPGet value...
23:50 fdobridge: <g​fxstrand> Oh, no!
23:51 fdobridge: <g​fxstrand> Maybe I should just start poking MMIO regs blind....
23:51 fdobridge: <m​arysaka> yeah I guess..
23:51 fdobridge: <m​arysaka> I tested my thing with vkcube and other UI application so far.... not quite sure why this is breaking like that atm
23:54 fdobridge: <k​arolherbst🐧🦀> at least you shouldn't be able to deal like real harm through the macro
23:55 fdobridge: <k​arolherbst🐧🦀> worst case you disable error reporting and the kernel won't tear down the channel or something 🙃
23:56 fdobridge: <m​arysaka> it's random uurgh
23:59 fdobridge: <m​arysaka> @gfxstrand Okay I know why it wasn't dumping much, I have way more command buffers now, will remove the skip around no prefetch gpfifo entries