00:04imirkin: karolherbst: hm, well that's right - GL_QUAD is only valid in compat
11:19karolherbst: imirkin: ehh. I think the random error is some state stuck in the compute parts.. at least when the error happens we launched some compute work at least... mhhh
11:22karolherbst: also.. why aren't we already pushing the pb when glDispatchCompute gets invoked
11:22karolherbst: sounds like a perf issue potentially
13:24karolherbst: imirkin: mhhh any idea how to deal with unmapped pbs in depushbuf? I am getting parsing errors due to that obviously :)
13:25karolherbst: or should we map the bo in libdrm when printing?
13:25karolherbst: I have no idea why the bo wasn't mapped tbh
13:54imirkin: karolherbst: it's an expected condition, fix your parser
13:54imirkin: we don't kick on compute dispatch just like we don't kick on draw
13:55karolherbst: I know it's expected, but there still might be relevant stuff in them
13:56imirkin: you'll never know! :)
13:56karolherbst: why can't I just map those bos?
13:56imirkin: you can't map them, they're not ready to be read from
13:56karolherbst: ehh :/
13:56imirkin: mapping them will cause flushes/stalls/etc, which can't really be done from inside the submit logic
13:57karolherbst: well.. I only want to map them when the pb gets printed
13:58imirkin: which is called from within the submit logic :p
13:58imirkin: anyways, we never do anything too crazy
13:58imirkin: it's always just data
13:58imirkin: there would never be BO references, nor new commands
13:59imirkin: so just make your parser deal with it
13:59karolherbst: those unmapped ones are indeed super small
14:00imirkin: not always, it could be elements in a bo on nv50 iirc, which could be sizable
14:00karolherbst: mhh, I see
14:00imirkin: but still just data
14:01karolherbst: still annoying to deal with it as I can't just simply parse the file and iterate over an array :/
14:01imirkin: can add a (unmapped) thing
14:01imirkin: to help your parser out
14:02karolherbst: already did
14:02karolherbst: I still need to save the location
14:02karolherbst: I could also get rid of the preparsing
14:03karolherbst: with a 15GB dumb my parser consumes quite a lot of memory actually
14:04karolherbst: and that realloc sucks anyway
14:17karolherbst: yay " 1 file changed, 25 insertions(+), 44 deletions(-)" it got simplier indeed
14:34karolherbst: "nouveau: ch2: psh (unmapped) 00000003 000000015c 000080016c" is what I will print probably
14:35karolherbst: and then the parser will print this: https://gist.githubusercontent.com/karolherbst/917dd432da7776364c884eea3db42235/raw/f94f13e381808f022c3e421223f9954bfb388515/gistfile1.txt
14:38imirkin: should say how many words
14:38imirkin: also make sure this doesn't mess up later parsing. i guess we don't have super-funny situations, so you can sorta assume the next thing will be a new command
14:38karolherbst: I already do that
14:38imirkin: it's not a valid assumption generically
14:39imirkin: but it might be valid for nouveau
14:39karolherbst: yeah.. but then my parser will complain because it can't decode the header
14:39imirkin: or it'll decode the header based on bogus data, and fireworks!
14:39karolherbst: well I am getting this again "unknown mode 0" :D
14:40karolherbst: imirkin: btw, mind if I push this directly? https://github.com/karolherbst/envytools/commit/313ef0fa74a7ade45975c01f248c85f0f9dc32d3
14:41karolherbst: there is still an error in bin2dedma
14:41karolherbst: mmt_txt_nv_state getting redefined
14:41karolherbst: but mmt_txt_nv_state...
14:41karolherbst: ahh screw it
14:41karolherbst: I just fix it like it's already broken
14:43karolherbst: just wondering how one can think this is even remotely a good idea
14:43karolherbst: how maybe I am missing some super obscure C feature
14:54imirkin: karolherbst: go for it
14:56karolherbst: ahh.. I indeed hit the issue that the header is 0 after an unmapped pb :/
14:57imirkin: ok, so we probably do stuff somewhere, in queries or something
14:57imirkin: i forget exactly
14:57imirkin: i do think we throw a 4-byte value in the middle of things randomly though :)
14:57karolherbst: just making sure it's actually the case and not something dumb like EOF
14:57imirkin: check like ... nvc0_query_hw
14:57imirkin: look for nouveau_pushbuf_data
14:58imirkin: iirc it's done as part of DrawTransformFeedback impl
14:58imirkin: to wait on the query
14:58karolherbst: nouveau: ch2: psh (unmapped) 00000004 0000000000 000080000c
14:58karolherbst: nouveau: ch2: psh 00000000 0000002af4 0000002c44
14:58karolherbst: nouveau: 0x00000000
14:59karolherbst: yeah.. the command before something like this is GP104_COMPUTE.UPLOAD.EXEC
15:01karolherbst: and there is indeed query stuff before that
15:04karolherbst: oh well
15:04karolherbst: no idea on how to handle that except skipping until the next value has some of the higher bits set indicating a command :/
15:04karolherbst: this sucks a bit
15:04imirkin: should be easy, no?
15:05karolherbst: could be data
15:05karolherbst: instead of a header
15:05imirkin: not that
15:05imirkin: doing it properly
15:05karolherbst: I don't know when the next header will come
15:05imirkin: well, you see a BEGIN for 5 words
15:05imirkin: you see 3 words
15:05imirkin: then you see a pushbuf for 4 bytes
15:05imirkin: then you know that you're "owed" one more word
15:05karolherbst: what if it's around 200 bytes like in the example ?
15:06imirkin: doesn't matter
15:06imirkin: in the example you pasted it's 4 bytes btw (aka 1 word)
15:07imirkin: and yeah, the indirect buffer could have commands of its own, in which case you're screwed. but we never do that in nouveau.
15:08karolherbst: mhhh, okay
15:08karolherbst: so yeah.. in this case it would work: https://gist.githubusercontent.com/karolherbst/077e8c8ea9be41816e96bcde610f2375/raw/54acf46faba8db895a0ff7289ed3c83bad8ce638/gistfile1.txt
15:08karolherbst: command has 10 values
15:09karolherbst: 4 missing
15:09karolherbst: and 6 are there around the unmapped pb
15:09karolherbst: 9 and 3
15:43karolherbst: okay.. let's see if I can finally parse the entire pb dump :)
16:02karolherbst: scanf is just so frigging slow :(
16:17karolherbst: imirkin: btw, I see this 0x5400000 value in uploaded data
16:18karolherbst: https://gist.githubusercontent.com/karolherbst/112f0f7a6307a5b94034b1594c6eda34/raw/4811a4d2743289656287ab910e24045b27d24d8f/gistfile1.txt is this the launch descriptor or could it be something else?
16:21karolherbst: actually.. the decs is not big enough
16:24pmoreau: karolherbst: clover_support_hmm_wip is your branch I should be testing things on if I want improved SPIR-V -> NIR, right? And it doesn't look like you have any of my cl_khr_il_program patches on that one, correct?
16:24karolherbst: pmoreau: correct
16:24pmoreau: Thank you
17:29pmoreau: Figured out what was causing an issue: the SPIR-V binaries in the CTS are still using UniformConstant as storage class for BuiltIn variables.
17:30pmoreau: But there is an open issue against the spec to clarify which storage class should be used, since there was some confusion with SYCL also switching to Input for the BuiltIn. Hopefully once that issue is resolved, the CTS will be updated.
18:08karolherbst: pmoreau: but besides that everything is fine?
18:52karolherbst: imirkin: 0x05400000  GP104_3D.RT[0x5].ADDRESS_LOW = 0x5400000
18:52karolherbst: but I assume this will probably get overwritten later on
18:52karolherbst: but I see a lot of references to this address
18:53karolherbst: mhh.. maybe that bug isn't that hard to figure out actually
19:27pmoreau: karolherbst: For the simple CTS link tests, yes (except that one of them does not compute the expected value).
19:27pmoreau: I need to have a look at the generated binary.
19:30pmoreau: Loooool, the binary generated is just "exit": no wonder is does not compute the proper value! (It is supposed to do something like "*ptr = -*ptr".)
19:36pmoreau: I am no NIR expert, but the generated NIR looks wrong (compared to the given input SPIR-V): https://pastebin.com/7PQC9p4M
19:37karolherbst: let's see
19:37karolherbst: pmoreau: mind showing the output with NIR_PRINT=1
19:38pmoreau: Here you go: https://pastebin.com/ChrnHwq3
19:40pmoreau: (This is using your clover_support_hmm_wip branch, with my IL program patches + NV50 patch, none of which should be touching the SPIR-V -> NIR parts.)
19:40karolherbst: okay.. so I guess something with the function calling is broken
19:41karolherbst: I thought I fixed that on that branch
19:41karolherbst: let me see
19:42karolherbst: pmoreau: I pushed the branch, might checking if it's better?
19:43karolherbst: ohh wait
19:43karolherbst: pmoreau: let me do a proper rebase
19:51karolherbst: pmoreau: branch updated
19:51KungFuJesus: imirkin: I may finally have a little bit of free time to start investigating this again: https://gitlab.freedesktop.org/mesa/mesa/issues/1167
19:52karolherbst: pmoreau: I am sure it works now, I just forgot to update to the new structurizer
19:52KungFuJesus: I'm getting my gentoo G5 system up to date now. I'm hoping the issue that prevented yaboot from booting newer kernels has been fixed
19:52imirkin: let's hope! i didn't have problems with yaboot and like 4.10 or so
20:00linkmauve: So I finally have a 1070, but no power supply or RAM yet.
20:00imirkin: linkmauve: keeping the habit alive?
20:01linkmauve: Yay for dead weight!
20:01linkmauve: Once I can power the thing, I’ll test it vs. the UHD630. :)
20:08imirkin: should be competitive :)
20:08KungFuJesus: yeah I don't either, I'm on 4.14, it's stuff newer than that that had issues
20:08imirkin: KungFuJesus: ah ok. i don't think i went that high.
20:16pmoreau: karolherbst: Thanks! Will try in a bit
20:33karolherbst: I can't map the uniform_bo :/
21:05pmoreau: karolherbst: Kudos to you: test is now passing!
21:08karolherbst: pmoreau: actually, I didn't fix it :d
21:08karolherbst: pmoreau: https://gitlab.freedesktop.org/bbrezillon/mesa/-/commit/5e940006504ec95ad35e6eb4272cb04e4d47e9ed
21:08karolherbst: was the fix
21:08karolherbst: I just merged it into the other commits :p
21:09pmoreau: Oh, I see! :-D
21:09pmoreau: Not emitting the return value could be a problem indeed. :-D
21:09pmoreau: I will update all the binaries to use the Input storage class for all BuiltIn variables, and see what I get. But at least basic linking tests work, so the infrastructure should be fine.
21:10karolherbst: pmoreau: there will be more frequent updates though as now the collabora devs are working on that stuff as well for CL
21:10karolherbst: still need to rebase on master, but jason did some bigger changes and I need to figure out what to do
21:10pmoreau: No problems
21:11karolherbst: others are also working on proper support for images :)
21:11pmoreau: For the IL program series, I am mostly interested in testing the infrastructure than running all the possible SPIR-V programs. :-)
21:11pmoreau: I saw you had some image support on your branch, that is great!
21:11karolherbst: and I think that's fine
21:11karolherbst: well.. yeah, but we will most likely go for a different approach
21:12pmoreau: Though, probably not going to be too useful for me on NV50 since there’s probably some RE left to do.
21:12karolherbst: I didn't do much of testing and I also have no motivation of working on that stuff thourughly
21:12karolherbst: pmoreau: really?
21:12karolherbst: at least we can the input buffer stuff worked on etc...
21:12karolherbst: wouldn't enable it by default though
21:12karolherbst: as it's even worse tested than nvc0
21:12karolherbst: compute support that is
21:13karolherbst: pmoreau: for nv50 we do 32 bit addressing, right?
21:13pmoreau: Well, I don’t think it is tested at all. :-D
21:13imirkin: nv50 only supports 32-bit addressing
21:13imirkin: fermi can support a hybrid of the nv50 way and the 64-bit way
21:13karolherbst: technically we have 36 bits, no?
21:13imirkin: you have 16 32-bit spaces
21:13karolherbst: imirkin: I saw nvidia doing 32 bit addressing on pascal even
21:13imirkin: which can be arranged however you like
21:14imirkin: for global memory? i thought those insturctions faulted.
21:14imirkin: maybe they brought it back
21:14karolherbst: dunno, but you can compile 32 bit ptx just fine
21:14imirkin: the methods which indicate what it's relative to are gone tho...
21:14karolherbst: didn't really check at runtime though
21:14pmoreau: What architectures are you testing on, btw? Should I expect things to work on Pascal (or even Turing)?
21:14karolherbst: maybe they just 0 out the high bits...
21:14karolherbst: never checked that deeply
21:14karolherbst: pmoreau: pascal, yes
21:15pmoreau: Okay, cool. I might try it on my desktop computer some day then, if I reboot on Linux.
21:18DMJC: I'm trying to use nouveau on a a 770GTX.
21:18DMJC: But I want to disable nouveau on a co-located 6800GT
21:18DMJC: any idea if this is possible?
21:18imirkin: define 'disable'
21:19DMJC: I'm trying to run the 6800GT in a virtual machine as a PCI pass-through device. I don't want Linux touching it at all.
21:19DMJC: The 770GTX is the host machine's GPU that I want Linux to grab/use.
21:19imirkin: iirc the solution for that is to ensure that vfio-pci gets bound to it on boot
21:19imirkin: i forget how you do that, iirc some cmdline thing
21:20karolherbst: imirkin: libvirt handles that already
21:20karolherbst: no manual interaction required
21:20DMJC: yeah I can find that information, atm I seem to be getting crashes if I have modeset enabled (big white square and dead computer)
21:20imirkin: libvirt is too late
21:20karolherbst: just assigning the device to the VM
21:20karolherbst: imirkin: nope
21:20imirkin: nouveau needs to not bind
21:20karolherbst: but you can unbind the device
21:20imirkin: but by then it has been nouveau'd :)
21:20karolherbst: but after that you don't need to do anything
21:21karolherbst: doesn't matter
21:21imirkin: it can.
21:21karolherbst: yeah.. maybe
21:21DMJC: nouveau is taking the entire system down so I need to stop it first.
21:21imirkin: anyways, yeah, you can also unbind, but that's not always straightforward.
21:21karolherbst: but then you can just blacklist nouveau :p
21:21imirkin: he has another gpu which he wants to use with nouveau
21:21imirkin: like i said ... cmdline args
21:21karolherbst: ohh, I see
21:21DMJC: yeah I'm basically asking for which nouveau cmdline arg disables the GPU I don't want touched.
21:22imirkin: DMJC: vfio-pci.ids=10de:13c2
21:22imirkin: or whatever
21:22imirkin: that way nouveau never binds
21:22imirkin: (assuming you don't get sad with load order)
21:23imirkin: (i.e. make sure vfio-pci loads before nouveau does ... e.g. build it in, or play initrd tricks)
21:25RSpliet: Heh, vfio-pci uses module_init. I always forget the order of those, but wouldn't it be sensible to have thar driver between bus and module?
22:09karolherbst: ahhh.. this bug is annoying
22:09karolherbst: and seriously the only one I hit in the CTS now
22:09karolherbst: no other random fails