00:19 fdobridge: <m​arysaka> Will take a look tomorrow, have a nice rest :ferris_hi:
00:56 fdobridge: <a​irlied> also if you want a leg up on some fragment shader bits once you'd gotten the shader io tracker done, https://gitlab.freedesktop.org/airlied/mesa/-/tree/nvk-nak-hacks2?ref_type=heads
00:57 fdobridge: <a​irlied> feel free to rip off as much as needed from that list of patches, some of them are definitely good, some probably need more consideration
05:51 fdobridge: <d​adschoorse> my stupid brain thought realz meant something depth related 🐸
08:34 cwabbott: gfxstrand: have you seen https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/freedreno/computerator/?ref_type=heads ? it's the thing we use for ISA reverse engineering experiments in freedreno
08:38 cwabbott: it's doing raw command submission, which helped for teasing out what shader-related registers do and worked out better than vulkan back-door or something
08:39 cwabbott: when bringing up a new generation, it was also the first thing brought up before vulkan
08:55 HdkR: If only NVIDIA released their internal ISA docs :>
08:58 karolherbst: yeah.....
08:59 karolherbst: HdkR: though we have something good enough I think for the moment :D
09:00 HdkR: and then I see you fussing around with the .X modifiers and not understanding why it is changed. Would be so easy to have the documentation for that :|
09:00 karolherbst: is that even documented in great detail?
09:01 HdkR: In the ISA docs yes
09:01 karolherbst: I have ISA docs, I'm just wondering if there are other ISA docs than I've gotten :D
09:01 HdkR: Well, usually if someone actually wrote the pseudocode representation
09:01 karolherbst: but yeah.. I suspect there is a version with more details
09:02 HdkR: Indeed, if you don't have the pseudocode then you're missing details
09:02 karolherbst: ohh yeah, I don't have the pseudocode
09:03 fdobridge: <m​arysaka> Did NVIDIA ever published an updated version for the SPH doc btw?
09:03 karolherbst: what I have looks like more a documentation of an assembler :D
09:03 karolherbst: they haven't
09:03 karolherbst: and I've asked
09:03 karolherbst: I shall ask again
09:04 HdkR: karolherbst: I guess it has the bitfield encodings and options for the instructions?
09:04 karolherbst: it doesn't
09:04 HdkR: welp
09:04 karolherbst: it's listing all forms though
09:04 HdkR: Smells like you got some second/third order documentation
09:04 karolherbst: it feels like written in a way to help people using the ISA for other things
09:05 karolherbst: :D
09:05 karolherbst: no, really
09:05 karolherbst: but yeah.. not having the encoding kinda sucks
09:05 karolherbst: but, I'm free to use it for nouveau stuff and it does explain the flags and what instructions and forms there are
09:05 karolherbst: so it's better than nothing
09:05 HdkR: A small step is better than no step at all
09:05 karolherbst: it also lists all system values and stuff
09:06 karolherbst: and for IADD3 the only thing not explained there was how the neg modifier works
09:06 HdkR: That's nice at least, so you can see the system registers you're not using :D
09:06 karolherbst: but maybe there are a few pages in the front I haven't gotten
09:06 karolherbst: :D
09:06 karolherbst: yes
09:08 HdkR: You would sort of expect that stuff to be documented right next to the instruction...like it does in the better docs
09:09 karolherbst: yeah...
16:07 benjaminl: karolherbst: the docs you're talking about aren't public, are they?
16:07 karolherbst: correct, they aren't, and I've gotten them under NDA
16:08 benjaminl: oof
16:08 karolherbst: I'm just allowed to use them for nouveau stuff
16:08 benjaminl: nice that you got them at all and can use them though :)
16:08 karolherbst: but obviously can't share or quote from them
16:22 fdobridge: <g​fxstrand> cwabbott: I've not looked at it but I'm thinking of doing that. It's not much code to fill out a QPA and do a compute launch. Doing it through Vulkan isn't bad, either, but there's things I need and plumbing through magic queries looks painful.
16:27 fdobridge: <g​fxstrand> And it's probably better for a test framework than what I'm doing right now
16:30 fdobridge: <g​fxstrand> Or I could pull QMD setup into NAK...
16:30 fdobridge: <g​fxstrand> 🤔
16:31 fdobridge: <k​arolherbst🐧🦀> only part of it
16:31 fdobridge: <k​arolherbst🐧🦀> but NAK could have an API to generate the full one I guess 🙃
16:31 fdobridge: <k​arolherbst🐧🦀> but it's kinda annoying that QMD contains static and dynamic information
16:32 fdobridge: <g​fxstrand> I could generate the template
16:32 fdobridge: <k​arolherbst🐧🦀> yeah.. that's what I meant with having an API for it
16:33 fdobridge: <k​arolherbst🐧🦀> I think it makes sense to have the SPH/QMD generation as part of NAK, as even GL would just write the exact same code anyway. And once we get the sph docs (hopefully) we also don't have to bother having two generators for sph and qmd
16:34 fdobridge: <g​fxstrand> Well, they're still going to be different
16:34 fdobridge: <k​arolherbst🐧🦀> I meant, two for each
16:34 fdobridge: <g​fxstrand> Yeah
16:34 fdobridge: <k​arolherbst🐧🦀> but yeah.. I think it feels natural to have sph/qmd generation APIs as part of the compiler and not the driver
16:34 fdobridge: <k​arolherbst🐧🦀> always felt kinda odd
16:35 fdobridge: <k​arolherbst🐧🦀> especially this slotting madness we've been doing in gl
16:35 fdobridge: <g​fxstrand> I considered doing that on Intel but on NVIDIA it actually makes sense.
16:36 fdobridge: <k​arolherbst🐧🦀> we can always make drivers responsible for lowering certain system values (and pull them from a custom driver ubo or whatever) though
16:36 fdobridge: <g​fxstrand> And we can make the compiler output offsets to key things like the dispatch size.
16:36 fdobridge: <k​arolherbst🐧🦀> yeah, or that
16:37 fdobridge: <g​fxstrand> I think that's better than an API, especially since we need to set some of them from MME anyway
16:37 fdobridge: <k​arolherbst🐧🦀> right..
16:37 fdobridge: <g​fxstrand> Hrm... Actually, that means we probably do want an API
16:37 fdobridge: <k​arolherbst🐧🦀> 😄
16:38 fdobridge: <g​fxstrand> Since it doesn't change per-shader.
16:38 fdobridge: <k​arolherbst🐧🦀> yep
16:39 fdobridge: <k​arolherbst🐧🦀> I think nvidia is doing something similar with CUDA even. The binary just tells where it wants special things to be and the runtime has to provide them
16:39 fdobridge: <g​fxstrand> Annoyingly, bindgen will do nothing with those headers...
16:40 fdobridge: <k​arolherbst🐧🦀> mhhh
16:40 fdobridge: <k​arolherbst🐧🦀> no?
16:40 fdobridge: <k​arolherbst🐧🦀> ehh wait.. qmd uses that `MW` stuff..
16:40 fdobridge: <k​arolherbst🐧🦀> uhh
16:41 fdobridge: <k​arolherbst🐧🦀> we could generate rust code 🙃
16:41 fdobridge: <k​arolherbst🐧🦀> write a macro and `!include` the file 🙃
16:42 fdobridge: <g​fxstrand> Yeah....
16:43 fdobridge: <k​arolherbst🐧🦀> write a proc macro which parses those headers 😄
16:43 fdobridge: <m​arysaka> I had some custom parser for that on my playground stuffs back then :vReiAgony: <https://github.com/Pascalinette/gpu_playground/blob/master/misc/header_converter/__init__.py#L787C5-L787C39>
16:43 fdobridge: <g​fxstrand> Also, setting CBs in the QMD is annoying... It's not just an offset. 😭
16:43 fdobridge: <m​arysaka> (with libclang)
16:43 fdobridge: <k​arolherbst🐧🦀> yeah...
16:43 fdobridge: <k​arolherbst🐧🦀> CBs are kinda flexible
16:44 fdobridge: <k​arolherbst🐧🦀> anyway.. I don't think doing it a template + specialization way is necessarily bad
16:44 fdobridge: <k​arolherbst🐧🦀> I personally like the idea of making it the compilers problem to know and generate the headers
17:06 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> https://gitlab.freedesktop.org/gfxstrand/mesa/-/merge_requests/40 🚀
18:00 rovo: Hello, I was following along nouveau firmware from Nvidia instructions here: https://nouveau.freedesktop.org/VideoAcceleration.html . I'm stuck at the 3rd wget trying to determine if I should download that driver, or adjust that line accordingly to my video cards model number?
18:01 karolherbst: rovo: what's your GPU?
18:01 rovo: "wget http://us.download.nvidia.com/XFree86/Linux-x86/325.15/NVIDIA-Linux-x86-325.15.run" this is the line I'm referring to, but I have a GeForce320m card. I'm generally used to trying to install 340.108 driver instead of the 325.15 listed there.
18:01 karolherbst: nah, the version has to match exactly
18:06 rovo: karolherbst: thank you. I went back and forth a few times trying both. Now I'm unsure which one I left of on.
18:17 rovo: I'm not really sure I have it working... I've tried running this command on an mkv file and an mp4 file, but neither work.
18:17 rovo: mplayer -vo vdpau -vc ffmpeg12vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau, <file>
18:17 karolherbst: what's the problem?
18:20 rovo: after I hit enter, it says MPlayer 1.4... then it says, do_connect: could not connect to socket, connect: No such file or directory, Failed to open LIRC support. Then it says libavformat file format detected, but follows with Protocol name not provided cannot determine if input is local or network protocols.
18:20 karolherbst: yeah, doesn't sound like a nouveau issue to me at least
18:22 rovo: looking more closely, that was a bad example, as that file was h265
18:26 rovo: so the do_connect: could not connect to socket is not related to nouveau?
18:26 karolherbst: it's not
18:28 rovo: so now I am playing an h264 in a mkv container... it's starting with no other error, I can hear the audio of the movie, but the screen is black.
18:31 karolherbst: do you see any errors comming up in dmesg?
18:37 rovo: I just rebooted, and briefly saw something about nouveau is primary device... but I couldn't read it all
18:37 karolherbst: I meant when playing the video
18:46 rovo: karolherbst: I am doing this on ubuntu server... terminal only.
18:49 rovo: I just tested `mpv --hwdec=vdpau yourvideofile` and that seems to work well
18:51 rovo: But then I pulled up my journalctl of the last boot, and I see some errors related to
18:51 rovo: ACPI Warning: \_SB.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer]
18:51 rovo: nouveau 0000:04:00.0: NVIDIA MCP89 (0af000a2)
18:51 rovo: nouveau 0000:04:00.0: fb: 256 MiB stolen system memory
18:52 rovo: these ones are RED:
18:52 rovo: nouveau 0000:04:00.0: bus: MMIO write of 0000807f FAULT at 100c18
18:52 rovo: nouveau 0000:04:00.0: bus: MMIO write of 0000807e FAULT at 100c1c
19:05 fdobridge: <g​fxstrand> Okay, who's setting P0 without telling me?!?
19:06 fdobridge: <g​fxstrand> Probably IMAD.WIDE
19:16 karolherbst: rovo: mhh, those are kinda irrelevant
19:16 fdobridge: <k​arolherbst🐧🦀> @gfxstrand correct, `IMAD.WIDE` has to output predicates 😄
19:17 fdobridge: <k​arolherbst🐧🦀> `IMAD.HI` as well btw
19:18 fdobridge: <g​fxstrand> One or two?
19:18 fdobridge: <k​arolherbst🐧🦀> ehh two
19:18 fdobridge: <g​fxstrand> For both of them?
19:18 fdobridge: <k​arolherbst🐧🦀> ehh wait
19:18 fdobridge: <k​arolherbst🐧🦀> one
19:18 fdobridge: <k​arolherbst🐧🦀> 🙃
19:19 fdobridge: <k​arolherbst🐧🦀> I mistook one R for a P
19:19 fdobridge: <g​fxstrand> At bit 81 and 84?
19:19 fdobridge: <g​fxstrand> Okay, so just the one at bit 81?
19:19 fdobridge: <k​arolherbst🐧🦀> probably? The docs don't contain the encoding
19:19 fdobridge: <g​fxstrand> Okay
19:20 fdobridge: <g​fxstrand> the disassembler doesn't do anything with it but at least it's not stomping P0 to garbage now
19:20 fdobridge: <k​arolherbst🐧🦀> heh.. odd
19:20 fdobridge: <k​arolherbst🐧🦀> sounds like a bug in the disassembler then
19:21 fdobridge: <k​arolherbst🐧🦀> `IMAD.LO` has an input predicate btw
19:21 fdobridge: <k​arolherbst🐧🦀> and `IMAD.WIDE` as well
19:21 fdobridge: <k​arolherbst🐧🦀> mhh
19:21 fdobridge: <k​arolherbst🐧🦀> no
19:21 fdobridge: <k​arolherbst🐧🦀> only `IMAD.WIDE.X`
19:21 fdobridge: <k​arolherbst🐧🦀> actually
19:21 fdobridge: <k​arolherbst🐧🦀> it's only `.X` 😄
19:22 fdobridge: <k​arolherbst🐧🦀> and all the variants
19:22 fdobridge: <g​fxstrand> Looks like we need to set PT in the non-.X variants or else it stomps things
19:22 fdobridge: <k​arolherbst🐧🦀> funky
19:22 fdobridge: <g​fxstrand> Yeah
19:22 fdobridge: <g​fxstrand> It's not great but kinda makes sense
19:22 fdobridge: <k​arolherbst🐧🦀> but yeah...
19:22 fdobridge: <k​arolherbst🐧🦀> I wonder if it's doing something undocumented
19:23 fdobridge: <k​arolherbst🐧🦀> or just nothing at all
19:23 fdobridge: <g​fxstrand> I suspect destinations have to always be encoded
19:23 fdobridge: <g​fxstrand> Even if they're not really used
19:23 fdobridge: <k​arolherbst🐧🦀> yeah.. might be
19:23 fdobridge: <k​arolherbst🐧🦀> let's se...
19:23 fdobridge: <g​fxstrand> But yeah... Upshot is that idiv now works. 😄
19:24 fdobridge: <k​arolherbst🐧🦀> nice
19:24 fdobridge: <g​fxstrand> The only remaining CS delta with codegen is image atomic cmpswap but I think Daniel is working on that.
19:24 fdobridge: <k​arolherbst🐧🦀> I suspect in theory you also have to encode all input predicates, but they might just get ignored in hardware
19:24 fdobridge: <g​fxstrand> And I'm not really worried. If he doesn't figure it out, I can wire it up.
19:24 fdobridge: <k​arolherbst🐧🦀> I wonder if that matters more with scheduling...
19:25 fdobridge: <g​fxstrand> If it reads P0 and ignores the value, that's no different from PT
19:25 fdobridge: <k​arolherbst🐧🦀> well...
19:25 fdobridge: <k​arolherbst🐧🦀> yes, but...
19:25 fdobridge: <g​fxstrand> If it generates garbage and writes to P0 that's very different from PT
19:25 fdobridge: <k​arolherbst🐧🦀> right
19:25 fdobridge: <k​arolherbst🐧🦀> I'm sure it's fine
19:25 fdobridge: <g​fxstrand> For hardware that auto-schedules, there may be a difference on sources
19:25 fdobridge: <g​fxstrand> It'd be correct, it just might stall
19:26 fdobridge: <k​arolherbst🐧🦀> yeah...
19:26 fdobridge: <k​arolherbst🐧🦀> would be the case pre kepler, though kepler actually verifies this
19:26 fdobridge: <k​arolherbst🐧🦀> and the hardware falls back to the worst case if anything is wrongly set
19:43 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> Why could this error happen?: https://media.discordapp.net/attachments/1087385827354611772/1149791643986301009/image.png
19:46 fdobridge: <g​fxstrand> ENODEV probably means you got a hang
19:49 fdobridge: <m​arysaka> or channel crash I think :aki_thonk: