01:02airlied: woot babysitting the mendocino runners
01:10airlied: yay success
09:30jani: the amdgpu build has been broken in drm-tip for several days now, what gives?
09:30jani: ../drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c:203:1: error: label ‘retry’ defined but not used [-Werror=unused-label]
14:18alyssa: Looks like we don't have an optimization to delete nir_jump_halt if it's the last instruction of the shader
14:19alyssa: It's easy to write but.. what pass should that live in I wonder?
14:19alyssa: dschuermann: ^
14:23alyssa: I've added it into nir_opt_dead_cf but that's kind of arbitrary
14:24glehmann: nir_opt_dead_cf makes sense imo
14:25alyssa: ack, thanks
14:26alyssa: tangentially I feel like ther should be discard optimizations I'm not finding in NIR
14:26alyssa: I could've sworn we had a bunch of terminate<-->demote conversion stuff that poofed
14:27karolherbst: alyssa: what semantics does halt have? Like not sure we can just optimize it away if halt is also supposed to halt an entire subgroup/workgroup? Like on nvidia we can abort/trap an entire subgroup
14:27alyssa: that's nir_jump_abort
14:27karolherbst: ahh, okay
14:27alyssa: nir_jump_halt is just exit(0) for the invocation
14:29alyssa: also, gl_nir_lower_discard_flow is horrifying
14:33glehmann: alyssa: what kind of optimizations?
14:34alyssa: also, gl_nir_lower_discard_flow looks broken
14:34alyssa: `for(;;) { discard; if (uniform_false) { discard } }` this will hang contrary to spec
14:35alyssa: i think
14:35alyssa: actually maybe it's ok, but i'm more horrified now
14:36karolherbst: mhhhh semantics are weird especially with helper invocations in mind
14:36alyssa: actually
14:36alyssa: closing the tab
14:36alyssa: i don't care
14:36alyssa: it's glsl
14:36karolherbst: :D
14:40CounterPillow: jani: is -Werror=unused-label part of the kernel's own build system or is that something you use in your flags? I agree that the warning should be fixed, but I wonder how nobody else saw this
14:45alyssa: glehmann: I'm not sure what exactly is optimal for Intel, but things like "turn demote into terminate or terminate into demote, in the absence of derivatives/subgroup ops, depending what's best for the hw"
14:46alyssa: as well as "deleting all the store_outputs if there's an unconditional @demote" -- we get this optimization with @terminate in conjunction with lower_terminate_to_demote + nir_opt_dead_cf (and would get it with demote->terminate opts) but don't get it for demote
14:47alyssa: (Kayden: wrote a jay-specific pass for the latter but I'm rewriting all the discard handling so that's getting memoryholed)
14:51CounterPillow: though the answer to "how nobody else saw this" seems to be that AMD engineers don't Cc their patches to dri-devel/lkml anymore, just to amd-gfx: https://lore.kernel.org/all/?q=dfn%3Adrivers%2Fgpu%2Fdrm%2Famd+AND+-c%3Adri-devel
14:54glehmann: alyssa: is unconditional demote really something we need to optimize?
14:54alyssa: Dunno, I think Ken saw some fossil doing it
14:55alyssa: Happy to not. I'm just rewriting all demote/terminate/halt/helper_invocation/end-of-thread code right now so
14:55alyssa: staring at piles of CTS shaders :p
14:57glehmann: btw, could nir_opt_load_skip_helpers be useful for intel?
17:47Kayden: glehmann: it's probably not all that common, but I did find a baldurs gate 3 shader where the entire program optimized away to void main() { discard; }
17:48Kayden: and I was like...really?...we're going to emit stuff to kill pixels when...not writing any outputs at all anyway...
17:49mareko: is that equivalent to rasterizer_discard
17:49Kayden: that's a good point, it probably is
17:50mareko: without early_fragment_tests
17:51mareko: discard also discards Z/S writes in late Z/S tests
17:53mareko: so it can't be replaced by an empty shader if Z/S tests are enabled, but it could be replaced by rasterizer_discard
18:02zmike: mareko: can you ack https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42222