00:49 karolherbst: airlied: ... I debugged why optimizing libclc regresses llvmpipe perf only to find out that it didn't has the shader cache enabled in rusticl, because... llvmpipe_screen_late_init
00:49 karolherbst: any suggestion on how to deal with that?
00:49 karolherbst: ohh wait...
00:49 karolherbst: mhhh
00:49 karolherbst: I could just create the helper context before that
00:49 karolherbst: let me do this then
09:19 karolherbst: dcbaker: another thing: you might want to allow providing custom/additional rust flags for test targets, as you could end up with new warnings for unused code or something
10:13 daniels: pls give +1 or otherwise for commit access for koike https://gitlab.freedesktop.org/mesa/mesa/-/issues/9237
10:18 javierm: daniels: oh, nice to know that she is back at collabora! I would give you a +1 but I'm not a mesa developer :)
10:18 daniels: javierm: <3
14:10 alyssa: DavidHeidelberg[m]: I seem to have some crashing radeonsi-stoney-traces
14:11 alyssa: any chance this wasn't me? because I haven't a clue how to go about debugging otherwise
14:11 alyssa: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/44227882
14:12 daniels: alyssa: following the link in that log to https://mesa.pages.freedesktop.org/-/mesa/-/jobs/44227882/artifacts/results/summary/problems.html
14:12 daniels: then following the link in that page to https://mesa.pages.freedesktop.org/-/mesa/-/jobs/44227882/artifacts/results/summary/results/trace@gl-radeonsi-stoney@supertuxkart@supertuxkart-antediluvian-abyss.rdc.html
14:12 daniels: gets you to ../src/gallium/auxiliary/nir/tgsi_to_nir.c:2027: ttn_emit_instruction: Assertion `dst->num_components == 4' failed.\
14:13 DavidHeidelberg[m]: alyssa: it was you `: ../src/gallium/auxiliary/nir/tgsi_to_nir.c:2027: ttn_emit_instruction: Assertion `dst->num_components == 4' failed.` I guess :D
14:14 alyssa: thanks!
14:14 alyssa: oh, I see what happened
14:14 alyssa: I clicked the link and it 404'd:
14:14 alyssa: https://mesa.pages.freedesktop.org/-/mesa/-/jobs/44227882/artifacts/results/summary/problems.html'
14:14 alyssa: since Firefox decided the following ' was part of the link
14:15 daniels: ah yes
14:15 daniels: there's another one in bold red without the trailing ' just beneath it
14:15 alyssa: missed that one because it's low contrast and I'm colour blind ^_^
14:15 alyssa: anyway, yes, I see the assert fail now
14:16 alyssa: I can work with that!
14:16 alyssa: thank you both for the pointers
14:16 daniels: np
14:17 alyssa: CI is really showing its value here
14:18 alyssa: "rewrite the heart of Mesa touching every driver significantly, and only own 2 vendors hardware"
14:18 daniels: yeah, traces sure are handy given the amount of real-world coverage we get from CTS
14:18 alyssa: I'm a little surprised piglit didn't hit that one
14:19 alyssa: meanwhile I finally set up t860 deqp locally
14:20 alyssa: so ironically I have better local midgard coverage than I did when I was actually on the hook for midgard :~P
14:25 alyssa: the thought of `nir_def *` is keeping me going ngl
14:28 austriancoder: ci question: I rebased https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23673 to current master and want to give it a quick test with ./.gitlab-ci/bin/ci_run_n_monitor.py --target gc2000_piglit but the rebased pipeline has no etnaviv targets (since the rebase). what I am doing wrong?
14:48 jenatali: austriancoder: I think the farm is/was down so it was disabled
15:54 alyssa:glares at glsl_type
16:02 alyssa: I just need to swap out the base type why is this thing a const *
16:05 austriancoder: jenatali: only the lima farm is down atm
16:07 austriancoder: if I make an unrelated change - like adding a comment somewhere in src/gallium/drivers/etnaviv and do a force push the pipeline has now a etnaviv stage
16:12 jenatali: Oh, right, ci-run-n-monitor uses the fork pipeline, which gets generated based on changes since the last push, since there's not a direct compare branch like in a MR
16:12 jenatali: I've been burned by that before, it's annoying
16:33 alyssa: https://gitlab.freedesktop.org/alyssa/mesa/-/jobs/44237002
16:33 alyssa: Ok this one I'm pretty sure isn't me *sweat*
16:35 jenatali: You sure about that? Maybe the change was so potent it broke docker before it even got pulled
16:46 daniels: https://gitlab.freedesktop.org/alyssa/mesa/-/jobs/44235984 hasn’t yet finished
16:53 dcbaker: karolherbst: ... well that's embarrassing. The code for passing additional arguments to rust.test exists, but it's not in the listed keyword arguments so passing it will be an error
16:53 karolherbst: :'(
16:56 karolherbst: oh well, as long as it's there with 1.2 that's fine at least for me :D
16:58 karolherbst: dcbaker: any idea what might be wrong with the stdlibc++ part? It's kinda weird, because it might also be a order of deps problem or _something_ I honestly have no idea. The current way I made it work is this: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23775/diffs?commit_id=9b5baa55c7a35da9a95378891e86adecc71222ad#1017b32183f9ee3ced5bf560b2c26d256794affe_351_355
16:59 karolherbst: I also have to move my C++ dep after it somehow, dunno. It also highly depends on the linker used
16:59 karolherbst: usually seems to work with mold no matter what, but bfd and lld are more picky here
17:05 dcbaker: Hmmmmmmmmmmmmmmmmm
17:07 karolherbst: but not adding the libstdc++ dep makes it fail in either case... I also tried to use g++ as the linker but that didn't really change much
17:09 dcbaker: that makes sense. I'm assuming that libstdc++ needs to be the last library linked to, or at least it needs to be linked after the other c++ libraries
17:10 karolherbst: mhh.. maybe
17:13 dcbaker: either way, we should just solve this in Meson and not make you do it yourself
17:13 karolherbst: I agree :)
17:31 karolherbst: dcbaker: btw, from CI: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/44240264#L2156
17:31 karolherbst: I think `rust.test` should strip all C/C++ flags
17:31 karolherbst: or something...
17:31 karolherbst: it came up a few times where e.g. if you also have C sources in the deps that stuff kinda not work
17:32 karolherbst: or is that already fixed? mhh
17:34 dcbaker: no, it hasn't been yet. It's on my list of things to fix
17:34 karolherbst: ahh okay
17:35 dcbaker: Rust is finding all of our C assumptions, lol
17:35 karolherbst: :3
17:42 dcbaker: karolherbst: https://github.com/mesonbuild/meson/pull/11902 is a draft, needs tests but I wanted it on the milestone
17:45 karolherbst: let me see if that fixes the issues :)
17:46 dcbaker: I haven't even tested it, just wrote some code, so no promises :D
17:46 karolherbst: it doesn't even run
17:46 karolherbst: `ImportError: cannot import name 'BothLibraries' from partially initialized module 'mesonbuild.build' (most likely due to a circular import) (/home/kherbst/git/meson/mesonbuild/build.py)`
17:48 dcbaker: yeah... I just fixed that
17:48 dcbaker: things that were supposed to be in the T.TYPE_CHECKING: block that weren't :/
17:49 karolherbst: ohh that bindgen thing also kinda came up in the past, glad that you also try to fix that one :)
17:55 karolherbst: dcbaker: okay, the link_args and rust_args work perfectly it seems, not so much the libstdc++ one
17:55 karolherbst: dcbaker: output https://gist.githubusercontent.com/karolherbst/ed6346ec8792d357cbdd3cb4070c6ec5/raw/605119b03705211c499579122a58f1998213d6de/gistfile1.txt
17:57 karolherbst: anyway, gotta eat something
18:03 dcbaker: thanks. I wonder if this is an issue that gcc can't link it and we need to use g++... I'll have to do some testing
18:07 karolherbst: yeah.. just pull https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23775 and remove the libstdc++ thing
18:10 alyssa: jenatali: I'm not sure what to do re: derefs
18:11 alyssa: I have barely seen a deref before today and wanted to keep it that way =P
18:11 alyssa: I was just trying to fix a preexisting bug in llvmpipe, sigh
18:13 jenatali: alyssa: Is there a question, or just complete no idea what's going on?
18:16 alyssa: Kinda #2
18:16 alyssa: like I agree that this is probably broken
18:16 alyssa: I just don't know what I'm to do about it :-p
18:16 alyssa: (and I am several yak shaves away from where I started by now)
18:18 alyssa: which reminds me I have a nir-to-tgsi bug to get to
18:57 dcbaker: karolherbst: Apparently my distro doesn't package a new enough spirv-llvm-translator.... we're still at 11.x
18:57 dcbaker: I did push an updated, can you see if that works now?
18:57 karolherbst: oof
18:57 karolherbst: dcbaker: sure you pushed?
18:58 dcbaker: we did have 14.x packaged at one point, but I guess that wouldn't help now..
18:58 dcbaker: no
18:58 dcbaker: now I pushed
19:03 karolherbst: dcbaker: yep, that seems to have done the trick
19:04 dcbaker: Sweet. Another case where rust suffers from being special :/
19:55 bluetail: isn't Rust communicated as the savior?
19:56 psykose: supply-side rust evangelion
20:21 penguin42: karolherbst: hi, just trying to get to grips with get_timestamp and whether to return a result - is nora in here as well?
20:22 karolherbst: penguin42: so for get_timestamp itself it is fine to just return the timestamp or Option in case we want to make it an optional feature, but the CL API functions have to return the proper error codes. API validation should all happen inside `api/`
20:23 penguin42: karolherbst: OK great, that's the way I was going - I tried to stuff a Result into get_timestamp but it looks to me like none of the stuff in that half of the code uses Result or any of the API errors
20:24 penguin42: karolherbst: Another thing I wasn't sure about is you were suggesting doing *device_timestamp = *host_timestamp; - but we're using write_checked for pointer writes, do we have a read_checked as well, if not why not?
20:24 karolherbst: jenatali: sooo.. one thing I was thinking about was to shortcut linking of programs with just one object, but I'm not sure if we can just skip over spirv-tools linker. Any ideas here? Otherwise I'll just try things out and see how well it goes
20:24 karolherbst: penguin42: because you can't read from a null pointer and any result would be invalid
20:25 karolherbst: so you could return an Option, but you can also just check for is_null()
20:25 jenatali: IIRC we run the linker so that it strips the linkage annotations and removes unreachable SPIR-V
20:25 karolherbst: `write_checked` point was really just to not bother with null pointer checks
20:25 karolherbst: jenatali: right... but none of this matters when translating to nir, does it?
20:25 karolherbst: spirv_to_nir only translates function called by the entrypoint
20:26 jenatali: Well, at one point NIR didn't like the linkage annotations :)
20:26 karolherbst: mhhhh
20:26 penguin42: karolherbst: I guess we should probably check for the null pointers to spit out the right CL error?
20:26 karolherbst: penguin42: correct
20:27 karolherbst: write_checked is really just done to e.g. return the event object or other things which are not API errors, but like optional arguments
20:27 penguin42: karolherbst: OK, let me see where I go with that lot
20:28 penguin42: karolherbst: Switching bug; did we get the patch in which turns vectorisation on for fload4 and stuff? That made a hell of a difference for me
20:29 karolherbst: not yet, I think last time I asked mareko he said he wasn't sure about the benefits. But I think that might have ment GL or maybe he just didn't see your results, dunno
20:30 penguin42: karolherbst: OK, I tried to forward port it but it had got upset by an intervening patch (I think the raytracing stuff), I think I added comments on there showing the benefit so it's a clear win here
20:30 karolherbst: yeah.. I've rebased it somewhere
20:30 karolherbst: https://gitlab.freedesktop.org/karolherbst/mesa/-/commit/fbbbaf0acab37cb3b012a073146918432f241283
20:31 penguin42: great
20:32 penguin42: karolherbst: It's actually a real pain for anyone writing OpenCL to write code that will work well on different cards/stacks - you try something like the vector ops and find they make a big difference for you and then someone else comes along and says it's worse on their card/stack/phase of moon
20:32 karolherbst: yeah.....
20:32 karolherbst: we know the pain
20:33 karolherbst: but for us it really shouldn't matter if you use vecs or not in code at least
20:33 karolherbst: it's just.. uhh... vecs in CL are just wrong
20:34 karolherbst: but then there are GPU ISAs doing vectors in compute, but I doubt anybody actually does that anymore
20:34 karolherbst: vecs are really only useful these days to ensure that loads are all vectorized, but that's it
20:34 karolherbst: I suspect in non GPU world it can look different
20:35 alyssa: karolherbst: Is there any way to scalarize in vtn or something like that, so we don't need vec8+ in NIR?
20:35 alyssa: I'm sure I've asked before
20:35 karolherbst: but on GPUs almost everything is scalar these days
20:35 karolherbst: alyssa: yeah.. this one pass I want to wire up
20:35 karolherbst: what was it called?
20:35 karolherbst: ohh
20:35 karolherbst: in vtn?
20:35 karolherbst: uhhh
20:35 karolherbst: mhhh
20:35 alyssa: or LLVM I guess
20:35 alyssa: although that doesn't help for SPIR-V kernels
20:36 karolherbst: we might be able to do it, but....
20:36 karolherbst: I suspect it's not worth the effort making vtn do it
20:36 karolherbst: vec5 is already a thing and I think somebody wanted a vec6 as well.. or evne higher?
20:36 karolherbst: wasn't freedreno doing like vec10 stuff somewhere?
20:37 karolherbst: alyssa: do we actually still have a constant cost from supporting vec8/vec16 in nir?
20:38 karolherbst: I thought we kinda got rid of most of it
20:38 karolherbst: ehh.. I guess the swizzle is still there...
20:42 alyssa: the swizzle is massive and I want it gone
20:42 alyssa: removing swizzles from NIR at this point would be a nonstarter
20:43 alyssa: next best is only storing swizzles for up to k components, where k is certainly less than 8
20:44 alyssa: I don't totally hate nir_alu_src having a vec4 swizzle, ignored if src->num_components > 4 (implied to be identity)
20:45 alyssa: + an intrinsic to swizzle larger vectors
20:45 alyssa: I think that'd probably be workable to generate in vtn
20:46 jenatali: That sounds fine to me
20:46 alyssa: I don't really understand what the vec5 stuff is about.
20:47 alyssa: If CL were the only producer of big vectors, that plan would be straightforward, since lower_alu_to_scalar could run immediately after vtn so no other passes have to know about the big swizzles
20:47 jenatali: I assumed it's for sparse resource accesses, 4-component result + 1 status component
20:47 alyssa: oof. ok.
20:47 jenatali: (I haven't confirmed that, just a hunch, I saw similar code in our WARP driver)
20:47 alyssa: Yeah
20:48 alyssa: Yeah, it's sparse, that makes sense
20:48 alyssa: I would *almost* rather nir_tex_instr produce two defs for sparse
20:49 jenatali: FWIW in DXIL it returns a struct
20:49 jenatali: Which then you have to use intrinsics to get components out of
20:49 jenatali: I could see NIR having it return an opaque single-component SSA with an intrinsic to get the 4-component result, and a different one to get the status
20:50 alyssa: Oh, I kinda like that too
20:50 alyssa:doesn't want to be the person to implement this though
20:50 alyssa: maybe I'm just salty from being in the nir_register salt mines
20:52 HdkR: Season those registers well
20:52 HdkR: Salt, pepper, paprika
20:52 ccr: perhaps some chili!
20:53 ccr:offers a bottle of million scoville hot sauce
20:53 penguin42:waits for alyssa to curry the arguments
20:53 alyssa: penguin42: I'm a C programmer
20:53 alyssa: all we have is water and salt
20:53 alyssa: no curry
20:54 HdkR: C++20 is the spice of life
20:56 penguin42: it's all those crunchy <'s
20:57 alyssa: mmm, piglit crashing in common code on radeonsi but not llvmpipe
20:57 karolherbst: alyssa: yeah.. I strictly don't mind handling it all in vtn, or doing something smart about the swizzle. Though I do think that limiting the max components is probably the sanes way out here
20:58 alyssa: karolherbst: CL requires vec16 no?
20:58 jenatali: Yeah
20:58 karolherbst: well yes.. but...
20:59 karolherbst: if we go after CL it's going to bite us sooner or later probably :D
20:59 jenatali: alyssa: Can't some hardware also do 16-component 8-bit UBO loads?
20:59 jenatali: I thought that was another reason for vec16
20:59 karolherbst: it's not really component based
20:59 karolherbst: but more like.. bytes
20:59 karolherbst: so you can just convert to higher bit size and destruct it later
21:00 alyssa: yeah, that will generate ~same code as 4-component 32-bit UBO load
21:00 alyssa: + unpacks
21:00 jenatali: You can do ulong16 in CL though...
21:00 HdkR: uint8x16_t is just a vector, you can't lie to me vec16
21:00 karolherbst: sure, and we could just split it up inside vtn
21:00 alyssa: jenatali: that's what we're talking about, right
21:00 jenatali: Right, sure
21:01 karolherbst: I just don't know how painful that might look in vtn..
21:01 karolherbst: but let me check something...
21:01 jenatali: I just meant you can't upconvert the bitsize of that, you have to split it into multiple instructions
21:02 alyssa: jenatali: right, the question is how painful it is to do that in vtn, versus supporting Just Enough vec16 in NIR to run lower_mem_access_bit_size and lower_alu_to_scalar and nothing else
21:02 jenatali: Yeah that makes sense
21:03 karolherbst: mhh so spirv-tools doesn't have an option to reduce vector component size sadly :D
21:03 alyssa: Speaking as the author of the only(?) NIR backend for hardware with legitimate vec16 SIMD ALU
21:03 alyssa: I do not want vec16 ALU in NIR :~P
21:03 karolherbst: alyssa: CL has full swizzles on vec16 though
21:04 alyssa: karolherbst: So?
21:04 alyssa: In the "vtn splits it up" plan, that includes dealing with the swizzles in vtn
21:04 karolherbst: how would you encode that in nir if you want to optimize the space siwzzles take
21:04 karolherbst: ahh right
21:04 karolherbst: I meant the other plan
21:04 alyssa: In the other plan, vtn inserts swizzle intrinsics for every vec16 source
21:05 alyssa: (every vec16 source with a nonidentity swizzle, I mean)
21:05 karolherbst: that might actually be not too bad
21:05 karolherbst: soo.. we only support swizzles for 4 components, everything else has to check in the source
21:05 karolherbst: if somebody _doesn't_ want to check the source, they have to lower to vec4 + thise magic vec8/16 lowering pass
21:05 karolherbst: *swizzle lowering
21:06 karolherbst: or it's just part of the vec lowering
21:06 karolherbst: yeah...
21:06 karolherbst: I think that's the path of least resistence
21:06 karolherbst: we might want to ditch vec8/16 from some backends (iris, radeonsi, llvmpipe?) first I think
21:08 alyssa: meanwhile I've reproduced my TTN crash
21:08 alyssa: thanks to radeonsi drm-shim
21:09 alyssa: so glad I set up all those aliases so I can just prefix tests with a driver name and it works :p
21:12 alyssa: fp64 in tgsi-to-nir, for some inexplicable reason
21:13 alyssa: fs_pack_color_zs, I guess
21:36 alyssa: https://alyssa.pages.freedesktop.org/-/mesa/-/jobs/44255420/artifacts/results/summary/results/trace@gl-zink-anv-tgl@gputest@pixmark-piano-v2.trace.html
21:36 alyssa: Where's the reference image? /:(
21:58 zmike: you have to use your imagination
22:00 Sachiel: wrong driver for imagination
22:02 dj-death: alyssa: this trace is known to change hash every time we make compiler changes
22:06 alyssa: dj-death: Alllright
22:06 alyssa: (It's changing on zink+turnip too fwiw)
22:07 alyssa: if this is a case of "inserting moves in slightly different places causes random butterfly effects that result in imperceptible hash differences", whatever
22:07 alyssa: just concerned that it's a real fail and not spurious trace CI being trace CI
22:12 dj-death: imperceptible indeed
22:12 dj-death: on the edges
22:13 dj-death: my guess it catches one edge of a triangle once, the other the next time
22:15 alyssa: alright
22:15 alyssa: ignore it then?
22:15 alyssa: it's fine I still have this LLVM crash to deal with
22:16 dj-death: once you
22:17 dj-death: once you're done with the MR, update to the latest hash ;)
22:18 alyssa: sounds good
22:18 alyssa: I don't understand how LLVM is segfaulting
22:18 alyssa: not llvmpipe
22:18 alyssa: LLVM
22:20 airlied: where's the explosion?
22:23 alyssa: airlied: #0 0x0000ffff7c1cb71c in llvm::ConstantVector::getSplat(llvm::ElementCount, llvm::Constant*) () from /lib/aarch64-linux-gnu/libLLVM-15.so.1
22:28 airlied: imma gonna need more backtrace :-P
22:29 alyssa: airlied: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23089#note_1971435
22:29 alyssa: dj-death: perhaps we should remove that trace then if it's known to be especially sensitive
22:34 dj-death: alyssa: you should ask anholt_
22:35 alyssa:shrug
22:35 alyssa: If I can update the checksum for that one I don't care too much right now
22:39 alyssa: airlied: to be clear, it only happens after my "gallivm: rewrite the world" commit so it's something I've changed, but I don't know how to go about debugging that appropriately named splat
22:42 alyssa: --
22:42 alyssa: LLVMValueRef indirect_val = lp_build_const_int_vec(gallivm, uint_bld->type, base);
22:42 alyssa: indirect_val = LLVMBuildAdd(builder, indirect_val, indir_src, "");
22:42 alyssa: if I comment out the second line, it compiles. so I guess I'm feeding in a bogus indir_src
22:45 alyssa: uhh
22:46 alyssa: inserting a cast_type to uint32 makes the crash go away
22:46 alyssa: I definitely do not know enough LLVM to know why
22:48 airlied: I'm guessing llvm ir validation would explode somewhere but isn't enabled
22:49 alyssa: oh, that I would 100% believe
22:49 airlied: have you tried with a debug mesa build?
22:49 alyssa: this is debugoptimized mesa
22:49 alyssa: but system llvm
22:51 airlied: no try with a real debug
22:51 airlied: or uncomment if DEBUG section in gallivm_verify_function
22:51 alyssa: Oh, I see. Will do
22:53 alyssa: airlied: Mystery solved :-)
22:53 alyssa: https://rosenzweig.io/ah.txt
22:53 airlied: seems sane!
22:55 alyssa: llvm being typed is ridiculous
22:59 alyssa: OK, kicked off another CI run
22:59 alyssa: Any guesses how many regressions I've introduced since a few hours ago?
22:59 alyssa: :P
23:04 psykose: three
23:50 karolherbst: dcbaker: ohh.. did you end up ignoring -I flags in deps? Because that's something I can't test locally really... or maybe I can? dunno... but you know, debian adds paths like "-I/usr/include/x86_64-linux-gnu" to random deps