17:32 karolherbst: are there any known problems with SCOPE_DEVICE barriers + atomics with aco or llvm? Would be nice if somebody knows something, because debugging those things are never trivial
18:25 Venemo: karolherbst: what are you expectations for SCOPE_DEVICE barriers?
18:26 karolherbst: that they make write visible for the entire device
18:29 karolherbst: anyway, I'm seeing consistency failures in compute shaders running multiple work groups
18:30 Venemo: I think you just found a bug, then
18:30 karolherbst: though I'm not sure whose bug it is
18:31 Venemo: the code handling the cache flags has been refactored since the last time I took the time to understand it, so I'm not sure how it works now, but I think it isn't just based on the nir scope
18:32 karolherbst: what is interesting is, that the same test works fine on zink + radv
18:32 karolherbst: but doesn't with radeonsi + aco
18:33 karolherbst: both using 1024 threads and 16 threads per block
18:33 karolherbst: maybe some difference in lowering or something weird...
18:33 Venemo: there are ac_cache_flags and there is also a gfx12_scope, and I can't find what handles them :(
18:34 Venemo: I guess ac_get_hw_cache_flags
18:35 Venemo: this seems to be mostly based on gl_access_qualifier, not on the scope
18:35 karolherbst: yeah.. but that won't really explain why things work with radv, would it?
18:36 karolherbst: maybe I should dig a bit deeper, haven't checked if it works with zink+radv before...
18:36 Venemo: well, a good way to answer that would be to have a simple repro case and look at the shader disasm for both, and see what happens
18:36 karolherbst: I'm sure it's some difference in lowering or something
18:36 Venemo: my best guess is a missing cache flag for one reason or another
18:36 karolherbst: well the test triggering it is anything but simple
18:36 karolherbst: but that's kinda true for most atomic consistency testing
18:37 Venemo: does the disasm look significantly different?
18:37 karolherbst: haven't checked yet
18:37 karolherbst: will do so later, just wanted to ask before I waste hours debugging it if somebody is aware of something
18:37 Venemo: honestly, I'm not sure, maybe someone else on the channel will know more, but my guess is that we never had a real test case for these things
18:38 karolherbst: I guess the vulkan testing there isn't great?
18:38 Venemo: your guess is as good as mine
18:38 karolherbst: well opengl..
18:38 karolherbst: it works with vulkan...
18:38 karolherbst: or maybe zink does something sneaky...
18:38 Venemo: well the GL CTS is not famous for its awesome coverage
18:39 karolherbst: I don't think this even exist in GL
18:39 bnieuwenhuizen: well, with the memory model lots of tests have been added to Vulkan CTS for atomics & barriers, so I'm betting the Vulkan side is decent
18:40 karolherbst: though I have no idea who atomic operations with explicit scope and memory order is even done in glsl for vulkan
18:40 karolherbst: *how
18:42 bnieuwenhuizen: IIRC https://github.com/KhronosGroup/GLSL/blob/main/extensions/khr/GL_KHR_memory_scope_semantics.txt is the glsl ext for the vulkan memory model
18:42 karolherbst: ahh yeah
18:43 karolherbst: gl definitely desn't have that
18:44 karolherbst: or well..
18:44 karolherbst: we don't
18:44 karolherbst: and according to gpuinfo nobody else does
18:44 bnieuwenhuizen: yeah it is not a proper GL extension thing
18:44 karolherbst: I see
18:45 bnieuwenhuizen: the mesa spir-v frontend has some code IIRC to convert legacy stuff to the vulkan memory model, but no idea what happens GL side
18:45 karolherbst: so yeah.. I still bet on something lowering related
18:45 karolherbst: yeah.. doesn't really matter, because from the CL side it's just OpAtomicLoad and spirv_to_nir splits it up
18:46 karolherbst: (or whatever atomic operation)
18:48 karolherbst: normally the good thing in mesa is that drivers share the same compiler with vulkan, so I can just rely on those things working, sometimes something doesn't work properly...
18:49 Venemo: karolherbst: are you familiar with how to run piglit? I'm having a difficult time figuring out how to run a test locally
18:49 karolherbst: depends on the testing. If you want to run a specific shader_test thing, you just use bin/shader_runner
18:50 karolherbst: or the binary
18:50 Venemo: I want to run spec@glsl-1.50@gs-max-output and this works: "./piglit run gpu -t spec@glsl-1.50@gs-max-output results" and crashes, however gdb cannot recognize ./piglit so I can't debug the crash
18:51 karolherbst: bin/glsl-1.50-gs-max-output
18:51 Venemo: if I run "./bin/glsl-1.50-gs-max-output" this just opens an empty black window and doesn't do anything
18:51 karolherbst: ohh wait
18:51 karolherbst: -fbo -auto or something as flags?
18:52 Venemo: MESA_LOADER_DRIVER_OVERRIDE=zink ./bin/glsl-1.50-gs-max-output -fbo -auto => pass
18:52 karolherbst: the piglit html report usually tells what command it executed
18:52 karolherbst: and the flags
18:52 karolherbst: so might want to take a look at those
18:52 Venemo: where is that html report?
18:53 karolherbst: CI artifacts I think
18:53 Venemo: can't I ask it to generate that locally?
18:53 karolherbst: it's also where the logs and stuff is
18:53 karolherbst: if you have a piglit run, yes
18:53 karolherbst: piglit-summary-html.py
18:54 karolherbst: _but_
18:54 karolherbst: piglit shouldn't crash....
18:55 karolherbst: so I expect it's somewhere in piglit directly
18:55 Venemo: what kind of args does ./piglit-summary-html.py expect? I tried giving it the results directory, and the result json
18:55 karolherbst: output result_json
18:56 Venemo: well, it doesn't say much, only that gs-max-output crashed
18:56 karolherbst: but it should say what command it executed
18:57 Remco: This is older, and skipped, but it does have the command that would be used: https://people.freedesktop.org/~airlied/piglit/zinknvk/gl/spec@glsl-1.50@gs-max-output.html
18:57 Venemo: karolherbst: got it, thank you! yes, it does say that if I click on the crash
18:57 karolherbst: I hope that also leads to a crash
18:57 karolherbst: there is a bit more info, might be relevant
18:57 Venemo: yes, it does now
18:58 karolherbst: nice
18:58 Venemo: I wish piglit was as simple to use as the VK CTS
18:59 Venemo: okay, looks like the crash is already there on main so it isn't a regression at least
19:00 Venemo: I almost forgot how much I love bisecting things
19:00 Venemo: especially recompiling the whole mesa while at it
19:01 karolherbst: you can use `git bisect run` tho
19:02 karolherbst: https://gist.github.com/karolherbst/54185a5362a4498f44c705b6db79b32a
19:04 Venemo: nice, I was unaware of that
19:06 karolherbst: yeah.. the "exit 125" is in that script to tell it there was a compilation error (so it skips), the other part is to deal with random error codes git bisect run won't handle well... anyway yeah, it helps a lot with git bisects