00:50zf: I'm encountering a problem on radeonsi where adding "invariant gl_Position;" to a shader causes artifacts. this is bizarre since, if I'm not misreading, nothing anywhere in mesa actualy cares whether a variable is invariant or not. does anyone have any hints or guesses as to what may be going on here?
00:55JoshuaAshton: zf: Invariant will disable certain optimizations on a path to the result of that variable such that any two shaders with the same shader code producing that variable will produce identical outcomes
00:55JoshuaAshton: Looks pretty implemented to me?
00:56zf: I'm fully aware of what invariant does
00:56zf: as far as I can tell, on mesa, invariant is implemented, it sets a boolean field "invariant" to true; that's propagated to nir and tgsi, there's a pass to propagate it to dependent stores, but nothing actually *interprets* it
00:58zf: presumably because the default behaviour is as if it's always set. that's fine, but then it's baffling that adding that declaration makes a difference
00:59JoshuaAshton: The glsl -> nir interprets that, same as the Vulkan path, no?
00:59zf: interprets how?
01:01zf: it sets the equivalent nir attribute, but I can't find any consumer of nir that consumes that attribute in turn
01:01zf: same with tgs
01:01zf: *tgsi
01:02cwabbott: invariant and precise are turned into "exact" in NIR here: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/compiler/glsl/glsl_to_nir.cpp?ref_type=heads#L1589
01:03JoshuaAshton: It marks it as exact in nir_propagate_invariant
01:03JoshuaAshton: Oh cwabbott beat me, it also does it on the glsl side it seems
01:03zf: ahhh, I'm just blind, thank you
01:03cwabbott: yeah, nir_propagate_invariant is for spir-v
01:04JoshuaAshton: If GL drivers are not running nir_propagate_invariant, does thatt mean GL SPIRV is broken? :-)
01:04cwabbott: I think mesa/st should be doing it?
01:04cwabbott: if nothing does it then yeah, it's broken
01:05JoshuaAshton: Doesn't seem like it
01:05cwabbott: you have to do it early, before any optimizations
01:05cwabbott: so it would have to be in mesa/st
01:05zf: sorry for the noise :x
01:05cwabbott: idk if it's run automatically by spirv-to-nir, maybe it is?
01:06JoshuaAshton: Doesn't seem like it's run by anything but Vulkan drivers grepping
01:19alyssa:wonders if transform-feedback-uniform-buffer-object piglit is bogus
01:20alyssa: missing glMemoryBarriers, I think...?
01:22alyssa: ditto for spec@ext_transform_feedback@immediate-reuse*
01:51karolherbst: mhhhh
01:51karolherbst: what pass is supposed to scalarize vectorized load_scratches and why does it sometimes not happen :D
01:54karolherbst: mhhhh
01:55karolherbst: looks like it's nir_lower_mem_access_bit_sizes messing up
01:56karolherbst: `div 16 %166 = @load_scratch (%19 (0x3)) (align_mul=256, align_offset=3)` yo.. pain
01:57karolherbst: and that gets lowered to a 32x2 load_scratch thing.. mhh
01:57karolherbst: I mean.. yes, but also.. no
03:27karolherbst: uhhh...
03:27karolherbst: I think our scratch memory lowering needs to be smarter
03:27karolherbst: but this code is also cursed
03:44karolherbst: gfxstrand: we might want to align scratch memory a bit less optimal in lower_explicit_io, I've encountered a kernel where it has u8[3] arrays, but the first two components are loaded as a 16 bit value, which leads to unaligned accesses if two of them are after each other (like 2 u8[3] arrays) and the second one causes the nir shader to do a 16 = load_scratch(0x3) access...
03:45karolherbst: but the source code is also heavily obfuscated, so no idea if we mess it up by ignoring some alignment or something else is going wrong here ...
03:46karolherbst: but that also let us ran into a intel backend compiler bug, so there is that...
04:39jenatali: karolherbst: yeah, seems like a tradeoff between consuming less memory vs providing better alignments. Sounds like a hard problem to solve
06:34karolherbst: jenatali: it sounds more like an optimal placement problem, but yeah...
08:04luc: hello, i notice that mesa pbo upload fs disallows any pipe_texture_target other than PIPE_BUFFER(0) while download one allows others. https://elixir.bootlin.com/mesa/latest/source/src/mesa/state_tracker/st_pbo.c#L602
08:08luc: i wonder if there is any technical reason why we don't upload other texture targets (e.g. 2D_ARRAY) in pixel buffer. or it is just no such use case
08:43karolherbst: jenatali: the biggest problem is just, that the source code is so obfuscated, that I can't tell if those 8 bit arrays even exist or if something else is going on 🙃
08:49karolherbst: mhhh...
08:49karolherbst: maybe it's an union thing...
13:59alyssa: karolherbst: why does llvm not like 16-bit math
15:09jenatali: alyssa: in what context?
15:13alyssa: jenatali: clc is turning 16-bit math into 32-bit math + piles of conversions
15:13alyssa: wheee
15:14jenatali: That... sounds wrong
15:14alyssa: wheeeeeeeee
15:15jenatali: What kind of math? Basic arithmetic?
15:19alyssa: Yes
18:31mareko: luc: PBO is a buffer, not a texture
18:31mareko: the source is a buffer, the destination is a texture
19:21karolherbst: alyssa: I guess it depends on the code and what LLVM does with it
19:22karolherbst: but yeah.. LLVM is sometimes.. a bit silly
19:22karolherbst: I _hope_ it becomes better with the LLVM SPIR-V backend
19:22karolherbst: then we can also enable optimizations
19:22karolherbst: and I know that LLVM has some to reduce the bit size as well
19:24karolherbst: but libclc is also implementing some 32 bit ops using 64 bit math, so there is that as well
19:39mareko: I'm considering removing AMD from the CI again and this time for real because the libdrm upgrade isn't progressing
19:40mareko: and it's been almost 2 weeks
19:42karolherbst: That's fine, though I'd be careful with making statements which could be read as "I'm disappointed nobody did the work I need during holiday season". People where on vacation and wanted to take time of, so I wouldn't hold them against it if they didn't want to work on stuff
19:56mareko: you are making incorrect assumptions
20:00mareko: when bug fixes depend on the latest libdrm, and libdrm isn't possible to upgrade, then hard choices have to be made
20:02mareko: that's made after all other options have been exhausted
20:02mareko: it's really a fuckup of the CI maintainers making it hard to upgrade libdrm in the first place
20:05mareko: it was not a fuckup, it was a lack of communication between Mesa developers and CI developers because Mesa developers who understand how things work don't often review CI changes, so CI developers unknowingly made the wrong choices
20:06mareko: or decisions
20:10mareko: there is nobody to blame for anything, shit just happens
20:17karolherbst: yeah.. and I'm also not saying that it's not a pain. It's fine to disable the CI if that makes you fix the bug in the short term and we can enable it later
20:17karolherbst: I just would be careful about expecting people to work during holiday season
20:33mareko: upstream never sleeps
21:27emersion: mareko: what makes libdrm difficult to upgrade?
21:36mareko: emersion: gitlab CI uses libdrm from the distro instead of building it
21:36emersion: ah, i see
21:36mareko: can't update libdrm if the distro doesn't do it, which is sully
21:36mareko: silly*
23:03DavidHeidelberg: emersion: WIP, I haven't forgot.
23:03DavidHeidelberg: I just having issue with some weirdness on ppc64 and s390x, otherwise it's resolved
23:05DavidHeidelberg: (weirdness different dependencies)