15:18 karolherbst: alyssa: okay, seeing this c11_atomic validation error also here. Seems to be pretty new as in, probably last week added it.. will bisect it later
15:19 pq: Where is the format of CRTC "BACKGROUND_COLOR" documented?
15:21 pq: in docs.kernel.org I only found vague references to DRM_ARGB64_PREP*(), but these don't seem to exist in libdrm or UAPI headers.
16:17 karolherbst: alyssa: I've fixed it: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42277
16:18 alyssa: karolherbst: thx
16:18 karolherbst: ohh maybe I should also call nir_intrinsic_set_write_mask...
16:20 karolherbst: ehh kinda pointless
16:21 karolherbst: atomic_swap doesn't have that index anyway
16:30 karolherbst: zmike: so I'm getting "test_image_streams: ../src/gallium/drivers/zink/zink_resource.c:3447: resource_object_add_bind: Assertion `!"zink: all buffers should have this bit"' failed." for 2d from buffer images. Which is a regression from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41734
16:31 zmike: ...what bind is it trying to add
16:32 karolherbst: 0x10000000
16:32 karolherbst: it's ZINK_BIND_MUTABLE I think
16:33 zmike: the fuck
16:33 karolherbst: backtrace: https://gist.githubusercontent.com/karolherbst/649c20c015546ed3046ca6bead1d56f1/raw/039f646a6c98f013b639019722b0b6ed035876d7/gistfile1.txt
16:34 karolherbst: I suspect something with the cursed 2d from buffer handling is weird there
16:34 karolherbst: but the code is kinda difficult to understand...
17:18 zmike: your bisect was off https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42278
17:19 karolherbst: ohhh...
17:20 zmike: AI wins this round
17:20 karolherbst: :'(
17:20 karolherbst: yeah seems to fix it
17:22 karolherbst: oh heh.. that's a commit right after the MR...
17:22 karolherbst: yeah maybe I messed the bisect up or something
18:14 karolherbst: alyssa, jenatali: any thoughts of pulling in libclc spirv binaries into the mesa tree + instructions on how to build it yourself if you really want to? I'm kinda considering creating an LLVM fork (lol) just to have a tree where we can point people to and say "if you don't want to run into random bugs, use this, otherwise unsupported"
18:15 jenatali: karolherbst: I'm in favor. That would simplify my build environment so much
18:15 alyssa: Distros will hate us. Don't do it.
18:16 alyssa: And more to the point, distros will strip it off (cursing us) and then ship the unsupported (read: broken) configuration instead and then we'll get the bugs.
18:16 karolherbst: they can build our fork
18:16 alyssa: They won't
18:16 karolherbst: they can use the binary we have in our tree :P
18:16 alyssa: They won't
18:17 alyssa: tjaalton: ping
18:17 alyssa: ^
18:17 karolherbst: we can also pull in all of CLC and build it inside mesa and require clang :P
18:18 karolherbst: but yeah... I know it sucks for everybody, but I'm also getting tired if I have to track down libclc regressions with each version
18:20 alyssa: pulling in libclc itself (source) and requiring clang would be fine for linux downstreams, yes
18:20 alyssa: well
18:21 alyssa: someone will complain about vendoring dependencies but it's a much lesser sin and we have good reasons if we're going to be maintaining it ourselves and diverging and such
18:21 karolherbst: some distros will complain, lol
18:21 CounterPillow: aren't meson wraps sorta for that?
18:21 CounterPillow: and then specify an exact version in the deps
18:21 karolherbst: could also have it be a git submodule (😭) that points to our llvm fork (😭)
18:22 karolherbst: the issue is that upstream is just broken in weird ways with different bugs depending on the version
18:22 karolherbst: and it's... just easier to have a branch with fixes
18:30 dcbaker: karolherbst: sounds like you want to be the LLVM stable maintainer :D
18:30 tjaalton: alyssa: yes?
18:30 karolherbst: dcbaker:.... no?
18:30 alyssa: tjaalton: see discussion starting 4 minutes before my ping
18:30 alyssa: iirc you're the debian mesa maintainer
18:30 dcbaker: I mean, maintaining your own branch with fixes sounds like what a stable branch maintainer does
18:32 karolherbst: heh
18:32 karolherbst: well it's only for libclc, which is kinda small in comparison :P
18:32 karolherbst: I would probably ditch all the other things
18:33 karolherbst: alyssa: maybe the solution is: "if you use any other binary, we won't claim conformance"
18:34 karolherbst: the pain part is that the libclc binary doesn't contain any version information, so we can't even guess if it's fine or not...
18:34 karolherbst: Maybe we maintain a list of hashes for "good" versions 🙃
18:34 karolherbst: I hate how I only have bad solutions for this
18:38 tjaalton: well, the problem with libclc right now is that building a new major version of llvm requires two passes, the first is used to build libclc. so if this would get rid of that (mesa building it instead) then I guess it would be a win
18:38 karolherbst: well that's just a limitation of how you build llvm tho
18:39 tjaalton: I don't see any other users of libclc in the archive
18:39 tjaalton: true
18:39 karolherbst: clvk also uses it
18:39 karolherbst: and I think pocl as well? But they both might use llvm forks :')
18:40 karolherbst: tjaalton: So.. if mesa could be pointed to a llvm fork with libclc patches and then build it alongside everything else, that would be acceptable?
18:40 karolherbst: but that would require clang usage at least for the libclc bits
18:40 alyssa: tjaalton: IIRC Debian has policies against vendoring stuff, but I guess if nothing else in the archive uses libclc, if we forked (at a source level) we just become the new upstream in effect and the existing libclc package is sunset I guess..?
18:40 karolherbst: and could create an odd situation where you build mesa with gcc _and_ clang
18:40 tjaalton: we already use clang for other bits
18:41 karolherbst: mhhh.. right
18:41 alyssa: karolherbst: clang is already a hard req for intel/asahi/panfrost/nvk
18:41 karolherbst: ahh
18:41 karolherbst: okay
18:41 karolherbst: and I guess the cmake integration is good enough in meson so it can just build a cmake project?
18:41 karolherbst: because how libclc is built now is that it uses a C compiler for the clc files :)
18:42 alyssa: karolherbst: how hard would it be to copy just the .cl's, nothing else, and build with meson + mesa_clc + etc?
18:42 alyssa: are they doing weird stuff?
18:42 karolherbst: like the global cmake C compiler
18:42 karolherbst: yes?
18:42 tjaalton: rust bits are allowed to be vendored, and having them as such does make things easier as the packaged crates can be in a weird state
18:42 alyssa: interesting, ok
18:43 tjaalton: it's not a hard-no
18:43 alyssa: ack
18:44 karolherbst: I guess if the reason is "you get a bug free version that works with mesa" is probably a good arugment
18:45 dcbaker: karolherbst: looking at it I'd be surprised if Meson's CMake integration works, but I'm opened to being surprised
18:46 tjaalton: karolherbst: I'd prefer it all be within the same tree, because package builds can't just go download randomware from the internet
18:46 dcbaker: otherwise, I think I can pretty easily open code it with generator
18:46 karolherbst: tjaalton: what if the fork is hosted on our gitlab?
18:46 dcbaker: tjaalton: is it fine if it's in the same dist package?
18:46 karolherbst: could even tag releases...
18:47 dcbaker: because Meson can add subprojects to the diest tarball
18:47 tjaalton: well it'll end up vendored locally in the package anyway I guess
18:47 alyssa: karolherbst: ok, I have a much more radical idea -
18:48 alyssa: vtn_bindgen2 provides existing infrastructure in Mesa to wrap opencl functions (not kernels) as nir_builder routines
18:49 tjaalton: so as long as it can consume a local dir in the source root, for instance.. that would work
18:49 alyssa: Why don't we just copy the actual /implementations/ from libclc and bind with vtn_bindgen2
18:49 alyssa: then in spirv_to_nir, just do libclc_frcp() or whatever and delete all of the spirv linking / name mangling / etc garbage
18:49 alyssa: be in control of our destiny
18:50 karolherbst: mhhhhhh
18:50 karolherbst: maybe
18:50 karolherbst: I have to think about it
18:50 alyssa: Not as easy as just forking shit but a much more.. Mesa-native long-term approach
18:52 karolherbst: yeah..
18:52 karolherbst: maybe
18:52 karolherbst: I'll have to play around with the idea
18:52 alyssa: We can do that incrementally
18:52 karolherbst: but I also kinda want to make it simple enough to pull in upstream llvm changes in
18:53 alyssa: Port one function at a time - add in the .cl impl, add 2 lines to handle_special to call it, delete the REMAP line for it
18:53 alyssa: like all the pieces are already there
18:54 karolherbst: could do it for the broken stuff first I guess...
19:48 mareko: ok
21:26 karolherbst: alyssa: mhh.. how would we deal with overloading?
21:27 karolherbst: though I guess could add more glue code that checks the input args...
21:33 karolherbst: alyssa: ohh btw.. any opinions on stuff like this? https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41970
21:34 karolherbst: that's also going to become relevant if we move it into vtn_bindgen
22:32 alyssa: karolherbst: that's fine, the same solution would work there too
22:32 alyssa: overloading is.. more problematic. How bad is it in practice though?
22:33 karolherbst: mhhh.. well the same builtin name is used for fp16/fp32/fp64 scalar/vec2/3/4/8/16 versions
22:33 karolherbst: though many CL builtins just wrap around scalar impls anyway...
22:34 karolherbst: so maybe this issue goes away if we just diverge hard enough from upstream, but....
22:42 alyssa: vec size is best handled on the nir side. bitsize is more problematic indeed.
22:43 elibrokeit: 14:34 <karolherbst> the pain part is that the libclc binary doesn't contain any version information, so we can't even guess if it's fine or not...
22:43 elibrokeit: this can be your first maint fix!
22:44 karolherbst: if I already maintain my own fork, I won't have to bother with versions..
22:45 elibrokeit: I mean as the upstream stable maintainer of course :P
22:46 karolherbst: the issue isn't that
22:46 karolherbst: the issue is, that llvm upstream breaks things and we'd have to clean it up after the fact, so I'd rather only see users using versions that we signed off on
22:47 karolherbst: like optimally LLVM can just run tests in CI or something
22:52 karolherbst: really.. I just want to point to a tree that is upstream LLVM from some git hash + fixes and tell everybody to use that