#asahi-gpu · 2022-10-28 05:21
phireor N centralied blocks, addressed by screenspace location#asahi-gpu · 2022-10-28 05:21
linaAnd that wouldn't scale well...#asahi-gpu · 2022-10-28 05:21
linaThey have separate root tilemaps for every cluster, so they are definitely processing everything in chunks and then merging at the end#asahi-gpu · 2022-10-28 05:21
phireeach compute core sets final vertex data to a centralized block, which sorts it and writes it to the TVB#asahi-gpu · 2022-10-28 05:21
phirethe other option is a centralized vertex-writeback block, basically equlivant to the ROPs for pixels on desktop gpus #asahi-gpu · 2022-10-28 05:21
linaNot sure how that would work with multiple draws though#asahi-gpu · 2022-10-28 05:20
linaIf they split the input draw arrays by cluster in API order, then it's trivial#asahi-gpu · 2022-10-28 05:19
linaI'd have to look into the pointee data and poll it and see what happens to it, I'm only looking at the top level now#asahi-gpu · 2022-10-28 05:19
phireI guess it does need to be sorted into API order, which would be hard without a pass over it#asahi-gpu · 2022-10-28 05:19
phireso you can actually see it merging?#asahi-gpu · 2022-10-28 05:18
linaSo it looks like that just gets copied over (sounds inefficient?) and they probably either chain the rest of the pointers behind, or do some merging of top-level structures (but evidently not the actual vertex buffer data, this is all variable size anyway so they need to have some kind of linked list or growable array mechanism anyway)#asahi-gpu · 2022-10-28 05:18
linaOK, so the final tile pointer array is == the first cluster-block of the temporary tile pointer array after a render#asahi-gpu · 2022-10-28 05:16
phireI wonder if it just aborts any tile that doesn't finish quick enough#asahi-gpu · 2022-10-28 05:15
linaI think it just can't preempt individual tile launches#asahi-gpu · 2022-10-28 05:15
linaI don't see any depth meta buffer data with preemption but no TVB overflows, so I don't think that's it#asahi-gpu · 2022-10-28 05:12
phireI'm not sure what their expected preemption granularity is. it would be weird for a single tile to exeute for longer than ~10us #asahi-gpu · 2022-10-28 05:10
phirebut I would think indivudal tile infocations could be long enough that it's worth preempting them#asahi-gpu · 2022-10-28 05:08
phirebut vertex/fragment jobs are useally short enough that you can just wait for them to end#asahi-gpu · 2022-10-28 05:08
linaI wonder, they might have something special for compute#asahi-gpu · 2022-10-28 05:08
phiresome of those compute jobs are long-running. I wonder if compute launches require buffers for compute unit state#asahi-gpu · 2022-10-28 05:07
linaI guess I should check whether preemption writes out partial data... should be easy...#asahi-gpu · 2022-10-28 05:07
linaI mean, it has to be used for partial renders anyway#asahi-gpu · 2022-10-28 05:07
linaWell yes#asahi-gpu · 2022-10-28 05:07
phirethe framebuffer#asahi-gpu · 2022-10-28 05:06
linaFor tiles?#asahi-gpu · 2022-10-28 05:06
phirethere is already memory allocated for tiles, though we don't know if it's used#asahi-gpu · 2022-10-28 05:06
phireyes, was just going to say#asahi-gpu · 2022-10-28 05:06
lina(Either way it definitely can't snapshot tile memory wholesale)#asahi-gpu · 2022-10-28 05:06
lina(Or maybe it can trigger tiles to early-exit and just flush to the FB, like a partial render?)#asahi-gpu · 2022-10-28 05:05
linaSo it can't preempt individual core launches (at whatever granularity they use for that), which we know because there's no tile memory buffers.#asahi-gpu · 2022-10-28 05:05
linaOh yeah, and this also explains why the preemption buffers are so small, and replicated like this. They hold the tiling accelerator/command processor state, not compute unit state.#asahi-gpu · 2022-10-28 04:59
phiremakes sense#asahi-gpu · 2022-10-28 04:57
linaAnd the count kind of adds up (7 extra for M1 Max: 1 for AVE/scaler stuff, 1 for the mystery unused neural engine, 2 extra DCPs, 2 for the GPU clusters, 1 for prores or just random)#asahi-gpu · 2022-10-28 04:56
linaAnd you see them all over the place (there's 4 on the top side of the GPU, but also a row of them near the top of the die, and one in each DDR IO cell)#asahi-gpu · 2022-10-28 04:55
linaThe little square blocks like that always scream PLL, they're clearly analog blocks and very different from any logic stuff, but not attached to any IO edges#asahi-gpu · 2022-10-28 04:55
phire(that's not something I've learned to spot on a die shot)#asahi-gpu · 2022-10-28 04:54
phirehow can you tell they are PLLs?#asahi-gpu · 2022-10-28 04:54
linaIt has 7 PLLs and there are no other PLLs lying around in the M1 Max exclusive half of the die, so that has to be it#asahi-gpu · 2022-10-28 04:54
phire(at the bottom)#asahi-gpu · 2022-10-28 04:53
phireyeah, you might be right that it's just something sitting in otherwise unused space#asahi-gpu · 2022-10-28 04:53
phireso I'm thinking tags?#asahi-gpu · 2022-10-28 04:52
linaI think top is shared/ASC/bufmgr, bottom is actually partially unrelated to the GPU (it has all the extra PLLs for the M1 Max, those are needed by the other blocks), and there's nothing specific for inter-die since the architecture already scales in that direction with just Apple Fabric#asahi-gpu · 2022-10-28 04:52
phirein a way that reminds me of zen 2's l3 cache. but it doesn't look like a cache#asahi-gpu · 2022-10-28 04:52
phireI mean, it's made of 2-4 symetric slices. but those slices seem to be tied together into a single block#asahi-gpu · 2022-10-28 04:50
linaAre you sure middle is not symmetric? It looks symmetric to me...#asahi-gpu · 2022-10-28 04:50
linaI think top might include the ASC#asahi-gpu · 2022-10-28 04:49
phirethoery: top is inter-cluster dispatch; middle one is inter-cluster coherency fabric; bottom is for inter-die coherrency/comunication#asahi-gpu · 2022-10-28 04:49
linaI've also noticed it uses more tile buffer pages than the M1, and that makes sense since allocation is at the 32K page level and with more slices, that's more overhead#asahi-gpu · 2022-10-28 04:48
linaThat makes perfect sense, come to think of it#asahi-gpu · 2022-10-28 04:48
linaIt's possible the way it works is there is an extra merge pass. Like, all the cores tile a random slice of geometry into separate buffers (and only have to coordinate to allocate buffer pages from the shared buffer manager), then once that's done the pointers are merged/chained (could be a linked list already, not sure exactly how it is organized) and then vertex gets to work on the result