#asahi-gpu · 2022-10-28 04:43
linaAnd I mean it has to balance across cores anyway... balancing across clusters just means, I'm guessing, extra handling for tile maps and buffer management metadata#asahi-gpu · 2022-10-28 04:42
linaI think so, since I think the glmark2 bunny is a single draw?#asahi-gpu · 2022-10-28 04:41
linamacOS only ever uses either 1 cluster rolling, or all clusters, and it doesn't seem to be per client at least. Might be a heuristic.#asahi-gpu · 2022-10-28 04:41
linaBut I can't get it to actually run multiple jobs across clusters like this, so I think this is just some kind of power/load spreading for simple jobs, like the compositor#asahi-gpu · 2022-10-28 04:41
linaAlso, for some queues/jobs, macOS does just that, rolling the cluster it picks#asahi-gpu · 2022-10-28 04:40
linaSame as M1#asahi-gpu · 2022-10-28 04:40
linaIf I restrict it to just one cluster, the buffers are not used at all (any cluster will do)#asahi-gpu · 2022-10-28 04:40
linaFancy.#asahi-gpu · 2022-10-28 04:40
linaI can restrict which clusters it uses for vertex via a mask, and it slows down if I do that#asahi-gpu · 2022-10-28 04:40
linaIt can, it's what these buffers are for.#asahi-gpu · 2022-10-28 04:38
linaOhh I found the stride... and yup, I have it wrong, I remember a factor of 4 I wondering about here. This also makes sense, I remember messing with this one on M1 and it not mattering...#asahi-gpu · 2022-10-28 04:37
lina8 cores per cluster#asahi-gpu · 2022-10-28 04:36
linaMaybe it's a spill thing or maybe I have a stride setting wrong somewhere#asahi-gpu · 2022-10-28 04:36
linaI don't know where the 4 comes from, it seems the last 3/4 of each block end up unused...#asahi-gpu · 2022-10-28 04:36
linaAnd then of the new tile buffers, most are fixed size * cluster count it seems, but one seems to be aux tilemaps, and the size is the tilemap size * 4 * nclusters#asahi-gpu · 2022-10-28 04:35
lina(deflake = preempt, I really need to replace that wording)#asahi-gpu · 2022-10-28 04:35
linaAs for the deflake buffers, for some inexplicable reason macOS allocates them as exactly *9x* the M1 sizes... but with 8x it works, so maybe that's an off-by-one on their side (or they were padding for debugging)#asahi-gpu · 2022-10-28 04:35
linaIt's just M1 doesn't need it since it is one cluster#asahi-gpu · 2022-10-28 04:34
linaSo they planned for this scalability from the get go, it seems#asahi-gpu · 2022-10-28 04:34
linaAll that stuff is also used on M1 Pro and Max#asahi-gpu · 2022-10-28 04:34
linaI've been looking at the new buffer stuff. The buffers are sized based on the core count, and are used even if I turn off half the cores. So it seems the "2 GPUs" is a red herring. It's 8 GPUs!#asahi-gpu · 2022-10-28 04:34
linaboth ^^#asahi-gpu · 2022-10-28 04:33
linaIf upstream doesn't like it I can always replace it with something else#asahi-gpu · 2022-10-28 04:33
linaphire: Performance really doesn't matter, and I need input/output in f32 format... I think I'm just going to wrap the existing kernel softfloat stuff for now#asahi-gpu · 2022-10-27 03:21
linaI guess tomorrow I should poke around those flags a bit and see what I find...#asahi-gpu · 2022-10-27 03:15
linaThere is an IRQ line that goes high on faults, but the firmware has a 250us timeout or something like that, so there's no way that would be reliable#asahi-gpu · 2022-10-27 03:14
linaThey don't have any kind of reasonable fault handling#asahi-gpu · 2022-10-27 03:14
linaNo chance of that#asahi-gpu · 2022-10-27 03:12
linaalyssa: You should...#asahi-gpu · 2022-10-27 03:12
linaAnd then those extra mystery zls_control flags are probably related...#asahi-gpu · 2022-10-27 03:12
linaOK, then it makes sense that it would have separate buffers#asahi-gpu · 2022-10-27 03:11
linaWait, does MSAA also need multiple samples in the depth buffer, or only color?#asahi-gpu · 2022-10-27 03:11
linaMaybe not? Hard to tell with my cursed capture card #asahi-gpu · 2022-10-27 03:10
linaCome to think of it... I think aquarium is doing AA? #asahi-gpu · 2022-10-27 03:08
lina(Fault handling being terrible is a separate issue)#asahi-gpu · 2022-10-27 03:08
linaIf it's wrong the GPU will just fault#asahi-gpu · 2022-10-27 03:08
linaI mean, none of this matters for safety#asahi-gpu · 2022-10-27 03:05
linaApps, not so much#asahi-gpu · 2022-10-27 03:05
linaMetal does#asahi-gpu · 2022-10-27 03:05
linaYeah, so maybe if the app provides a custom layout Z buffer it can't use compression, and then you need a separate buffer for internal#asahi-gpu · 2022-10-27 03:04
linaSo you'd want to use a separate buffer from the user-provided buffer in that case#asahi-gpu · 2022-10-27 03:04
linaAnd I guess under some conditions maybe you can't guarantee that the final buffer is "safe"? Like, the GPU can't trust it to read back during an internal reload?#asahi-gpu · 2022-10-27 03:04
linaIt makes sense to compress the intermediate buffers but not the final ones if the app needs it for some reason#asahi-gpu · 2022-10-27 03:03
linaSince some could be compressed and not others#asahi-gpu · 2022-10-27 03:02
linaAnd then similarly the meta buffers are separate#asahi-gpu · 2022-10-27 03:02
linaNow I wonder if this for separate buffers for load/partial/store#asahi-gpu · 2022-10-27 03:02
linadepth_buffer_ptr3 = 0x1501c68000#asahi-gpu · 2022-10-27 03:02
linadepth_buffer_ptr2 = 0x1501750000#asahi-gpu · 2022-10-27 03:02
linadepth_buffer_ptr1 = 0x1501c68000#asahi-gpu · 2022-10-27 03:01
linaalyssa: Remember how there is more than one depth buffer?