00:14 jekstrand: anholt: What is this nir_shader_instructions_pass? grep is failing me
00:14 anholt: nir_builder.h
00:15 jekstrand: Ooh....
00:20 jekstrand: anholt: That's nifty!
06:26 mcoffin: Is there an easy way to disable timeline syncobj for radv at runtime or would i have to go and just hard-code the flag in the device at compile-time? They're causing some big issues with overlays on the lastest SteamVR, but I don't have enough info about it yet to submit an issue
09:43 daniels: jekstrand: yeah, it' sreally great
13:04 zmike: nir_shader_instructions_pass++
15:07 ham5urg_: Hello everybody, I'm not sure if this is the right place to ask, but I could not find any hint on the net. My question is, is it possible to create a virtual screen locally, and to bind this screen to a hdmi-out-port of a remote machine (e.g. attached to the TV). In fact creating a virtual hdmi-cable. I experimented with "nbd"-ing a drm device but no luck what so ever...
15:34 ajax: why do we not aggressively turn off legacy vga decoding
15:34 ajax: other than, like, nobody does multigpu so nobody cares
15:44 bnieuwenhuizen: what is the problem with multigpu?
15:45 ajax: it's pointlessly slow in xserver
15:45 ajax: because we don't disable vga decoding for kms devices, so the vga arbiter thinks that any possible rendering operation might need to have vga routed to the device in question
15:46 ajax: which means that every rendering operation invokes another modestly expensive syscall
15:47 ajax: since normally rendering involves zero syscalls...
15:47 ajax: and we have an api for the kms driver to announce that it doesn't need vga decoding! and nothing uses it! except vfio, which ~nobody uses either.
15:53 Venemo: jekstrand, Kayden I now also have patches which extend nir_gs_count_vertices, so that it is per-stream and also counts primitives. did you guys decide if you can use the primitive count yourselves?
18:54 AndrewR: interesting, it seems I need -Dgallium-omx=tizonia for building omxtizonia (0.22 selfcompiled from git), auto doesn'
18:55 AndrewR: doe not enable it
19:30 austriancoder: anholt: did you ever thought about running piglit on baremetal? I would look into it if there are no big concerns
19:31 anholt: austriancoder: ci-cheza-piglit branch has my WIP. cheza was too unstable for it at the time, but we could probably do it now.
19:31 anholt: austriancoder: how's your ci work going? any chance we'll see it on mesa master soon?
19:37 austriancoder: anholt: great... will have a look at your branch. I ordered some more devices to run more tests in parallel (gles2, gles3 and hopefully piglit).. I hope to have everything ready by the end of this month
19:37 anholt: nice!
19:38 anholt: have you considered, even with the devices you have, merging your CI and having it be manual, like some of the radv stuff is?
19:41 Kayden: Venemo: Interesting...I hadn't considered whether we could use the vertex count to detect degenerate primitives, and simply not emit them. Intel's hardware will cull out degenerate primitives for us, but...we still have to write the vertex data, and the EndPrimitive flag. If we could just skip that, it'd be less traffic
19:42 austriancoder: anholt: manual .. hmm .. never thought about it
19:42 anholt: means you can opt into it yourself even when you don't have the capacity (or reliability) for everyone
19:46 AndrewR: I think https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6803 need VAAPI label ?
19:47 Kayden: Venemo: looking in shader-db to see if there are any cases where optimizing out EndPrimitives & the corresponding vertex writes might help...
19:47 Kayden: Venemo: the only uses I'm seeing of EndPrimitive so far are pointless ones at the end of the program. i.e. emit 3 vertices, EndPrimitive, end main().
19:50 Kayden: looks like there's a real use of it in Tomb Raider on ultra
19:51 Kayden: Unreal seems to have more substantive use of it, but it also looks potentially bogus - EmitVertex, EmitVertex, EmitVertex, EndPrimitive, all in a block
19:52 Kayden: bet we'd see EndPrimitive with a vertex count of 0 and be able to trash it
20:06 anholt: oh, cool. it's not just freedreno that's broken for the new const_write deqp tests, iris is too.
20:08 Venemo: Kayden: glad to hear this is useful to you :)
20:09 Venemo: Kayden: I think it is doable if you have a way to overwrite the already emitted vertices that belong to incomplete primitives
20:10 Venemo: Kayden: how about the compile-time-known primitive count? would that help you?
20:13 Venemo: Kayden: about the incomplete prims - it's not just 0 that you need to watch for, but anything less than the minimum. so less than 3 for triangles
20:14 airlied: ajax: some i915 still needed vga routing
20:15 airlied: but we should be removing most gpus from vga routing asap
20:15 airlied: what combo doesnt work?
20:18 ajax: airlied: i don't know of a combo that doesn't work, i just know 'git grep vga_set_legacy_decoding' shows very few callers
20:18 Kayden: Venemo: Could we have a pass that detects EndPrimitive with a count < 3 and walks backwards, eliminating the EmitVertex?
20:19 Kayden: Seems like something NIR could generally optimize away
20:21 Kayden: that could also allow NIR to eliminate the related output stores, and calculations that go into them
20:26 Venemo: Kayden: I thought about it, but I concluded that might be feasible in general.
20:26 Venemo: Kayden: imagine if those intrinsics are in divergent control flow
20:27 Kayden: hmm..and yet we still end up with a constant EmitVertex count?
20:28 Kayden: I suppose you could have if (diverge) { EmitVertex, EmitVertex } else { EmitVertex, EmitVertex } EndPrimitive and realize that the count is 2 regardless of the condition
20:28 Kayden: that would be tricky...
20:38 Venemo: yeah
20:40 Venemo: eg. if (a) { emit, emit } if (b) { emit } if (c) { endprimitive}
20:40 Venemo: there can be a combination of these when the count is still constant
20:56 Kayden: that said...if you're able to have constant primitive counts, and vert-within-primitive counts
20:56 Kayden: then you don't even need to think about control flow
20:56 Kayden: once you determine endprimitive for primtiive N is dead, then you just look for all emitvertex for that primitive, and delete it, regardless of where it is
20:56 Kayden: I guess a bunch of times you might have constant-within-primitive counts and not constant-prim counts though
20:59 Venemo: the lucky thing for me is that I don't need to care about endprimitive at all. I just store each vertex according to an address based on its index
21:00 Venemo: then at the end of the shader I do some whacky magic, read them from where they are, and feed them to the hardware
21:01 Venemo: so the incompletes are just overwritten, and that doesn't affect the end result
21:24 Kayden: oh, that is really nice
21:26 Venemo: so basically at the end each thread can only output exactly 1 vertex, and 0 or 1 primitive. so whatever was generated by the GS threads have to be compacted and distributed to the whole threadgroup. that's NGG GS in a nutshell
21:27 Venemo: this becomes more complicated if I have to worry about the incomplete prims there.
22:08 mareko: in a nutshell, a shader has to emit 1 vertex per thread (like VS) and 3 vertex indices meaning thread IDs per thread (called a primitive thread, but it's the same workgroup), this way of communicating vertices and primitives is used to implement VS, TES, GS, and mesh shaders in 1 hardware shader stage
22:09 Venemo: yeah
22:09 Venemo: it's a really clever way of doing things