fenix144 has quit [Remote host closed the connection]
mikelee has quit [Ping timeout: 480 seconds]
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeisom has joined #asahi-gpu
mikelee has joined #asahi-gpu
ourdumbfuture has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
WindowPa- has joined #asahi-gpu
WindowPain has quit [Read error: Connection reset by peer]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
jeisom has quit [Ping timeout: 480 seconds]
Hibyehello has quit [Ping timeout: 480 seconds]
mikelee has quit [Ping timeout: 480 seconds]
chadmed has quit [Remote host closed the connection]
mikelee has joined #asahi-gpu
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
rhoanrep_ has joined #asahi-gpu
rhoanrepper has quit [Read error: Connection reset by peer]
tristan2_ has joined #asahi-gpu
tristan2 has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
stipa is now known as Guest6670
stipa has joined #asahi-gpu
Guest6670 has quit [Read error: Connection reset by peer]
mikelee has joined #asahi-gpu
mkurz has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
chadmed has joined #asahi-gpu
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mkurz_ has joined #asahi-gpu
mkurz has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mkurz has joined #asahi-gpu
mkurz_ has quit [Ping timeout: 480 seconds]
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
novafacing has quit [Ping timeout: 480 seconds]
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
wicastC has quit [Remote host closed the connection]
wicastC has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mkurz has quit [Remote host closed the connection]
mikelee has joined #asahi-gpu
mkurz has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mkurz has quit [Read error: Connection reset by peer]
<lina>
We have a Firefox problem... it's using crazy amounts of GPU memory for some stuff, like Google Maps and the PDF renderer.
mikelee has quit [Ping timeout: 480 seconds]
<lina>
Maybe the BO cache is just over-enthusiastic?
mikelee has joined #asahi-gpu
rhoanrep_ has quit [Ping timeout: 480 seconds]
<lina>
Oof yeah, I see 10+GB of BO cache. This is bad.
<lina>
OK, I think it's not the cache, I think the cache just inherits the bloat for the extra 1-2 seconds it's programmed to
<lina>
Somehow we have batches holding onto gigabytes of BOs...
<lina>
They do get cleaned up when they complete but... I'm seeing batches holding on to 100+ screen size (or even larger) render targets
rhoanrepper has joined #asahi-gpu
crabbedhaloablut has joined #asahi-gpu
rhoanrepper has quit [Ping timeout: 480 seconds]
mikelee has quit [Ping timeout: 480 seconds]
<lina>
It's resource shadowing.
mikelee has joined #asahi-gpu
<lina>
It's doing many alternate draws reading a framebuffer and mapping it for write, and we're pathologically shadowing it every time which is both horribly slow and blows up memory usage.
<lina>
Ooooogh and there's another big silly, the BO cache can return (sometimes wildly) oversized objects and then we go ahead and shadow them whole!
jennifilm has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
rhoanrepper has joined #asahi-gpu
rhoanrepper has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-gpu
nsklaus has joined #asahi-gpu
mikelee has joined #asahi-gpu
rhoanrepper has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
rhoanrepper has quit [Ping timeout: 480 seconds]
<lina>
ella-0: Maps is still stuttering though, but I'm not so sure where the problem is any more. At least it doesn't bloat RAM though.
<lina>
Try ASAHI_MESA_DEBUG=nowc to fix the uncached reads issue, but even with that it still stutters (but then maybe profiling will point at something else?)
jeisom has joined #asahi-gpu
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bisko has joined #asahi-gpu
bisko has quit []
bisko has joined #asahi-gpu
ourdumbfuture has joined #asahi-gpu
rhoanrepper has joined #asahi-gpu
rhoanrepper has quit [Remote host closed the connection]
mikelee has joined #asahi-gpu
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rhoanrepper has joined #asahi-gpu
bisko has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeisom has quit [Ping timeout: 480 seconds]
mikelee has quit [Ping timeout: 480 seconds]
nela has quit [Quit: bye!]
rhoanrepper has quit [Remote host closed the connection]
nela has joined #asahi-gpu
bisko has joined #asahi-gpu
mikelee has joined #asahi-gpu
hightower3 has quit [Ping timeout: 480 seconds]
bisko has quit [Ping timeout: 480 seconds]
mikelee has quit [Ping timeout: 480 seconds]
<lina>
OK, so Google Maps is doing this completely horrible thing where it creates several 1024x1024 texture atlases, then repeatedly uploads a nonoverlapping block with glTexSubImage2D and immediately draws it.
<lina>
I have no idea how I'd fix this without outright storing a complete per-pixel validity mask???? Is there some data structure that can efficiently handle this?
<lina>
All those shadows/flushes can be completely elided, since it always writes to an uninitialized portion to the buffer... but we need to track that at the 2D level now to make this work.
<dottedmag>
lina: There is a data structure that holds a union of rectangles in libpixman (union of rectangles -> a set of horizontal slices, each slice contains disjoint rectangles)
<lina>
I'd need something in mesa... ^^;;
<dottedmag>
The implementation there is pretty straightforward, could be easy to lift out or reimplement.
<lina>
At least it looks like it's the same license, so maybe we can actually lift the code...
<lina>
I guess if we use that, the heuristic would be to track the valid rectangle the first time a resource is written, then the next time check whether the new write overlaps (which we can do with a simple box check), and if it doesn't upgrade it to full fancy rect union tracking
<lina>
That way we don't have to involve all that code most of the time
ourdumbfuture has joined #asahi-gpu
mikelee has joined #asahi-gpu
<lina>
It's 2700 lines of code...
<dottedmag>
I guess this algorithm won't need most of the operations in there.
<dottedmag>
Doesn't Mesa have anything similar? No 2D region tracking there anywhere?
<lina>
just basic 2D box tracking, nothing finer grained
mikelee has quit [Ping timeout: 480 seconds]
<dottedmag>
ic
<lina>
3D box actually
<lina>
The current code already plays this game for 1D buffers using a dedicated range thing, but I originally wrote that with 3D box tracking before I realized we had that range thing.
<lina>
Unfortunately 3D box tracking isn't enough for this case since it's an atlas
<lina>
The trivial case is four quadrants get written, and then you elide the copies for the first 3 but the 4th overlaps the bounding box
<lina>
Maps does that, but it also does much more complex atlases
rhoanrepper has joined #asahi-gpu
<lina>
I'm seeing ~40 regions written per atlas... I wonder if we can just track a list of nonoverlapping boxes with some max like 64? It's O(n^2) but the copies/blits are way more horrible than doing 64 box intersect checks...
<jannau>
are the regions always the same size?
<lina>
No
<dottedmag>
Maybe BSP :) Just kidding.
<lina>
I think I'm just going to try a region list thing...
rhoanrepper has quit [Ping timeout: 480 seconds]
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dottedmag>
lina: 64 boxes with 32-bit coordinates is 1024 bytes, so 8 cache lines. Peanuts, for linear scanning.
<dottedmag>
(maybe even SIMD it?)
<lina>
Yeah, I think I can probably just say we track up to 128 regions and then bail or something like that.
<lina>
And of course the moment there is any overlap this whole mechanism gets disabled, it's strictly for the clean atlas use case
jeisom has joined #asahi-gpu
ourdumbfuture has joined #asahi-gpu
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
Guest6167 has quit [Quit: Bridge terminating on SIGTERM]
dylanchapell has joined #asahi-gpu
rhysmdnz has joined #asahi-gpu
Jamie has joined #asahi-gpu
mikelee has joined #asahi-gpu
Jamie is now known as Guest6702
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ourdumbfuture has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
<lina>
jannau: see if the kernel reports any blocked tasks, and same after you kill firefox... but I don't really know at this point ;;
mikelee has joined #asahi-gpu
<lina>
if firefox dies cleanly when you kill it and no kernel threads get stuck I don't think it's *that* problem
<lina>
I saw a different thing earlier with an older version of firefox where right clicking on a link on the GitHub page would hang it for a while, until something timed out and killed it, but it wasn't the kernel side getting wedged like before I think
<lina>
And it went away after an update...
<lina>
You could try gdb and seeing where all the threads are waiting
ourdumbfuture has quit [Read error: Connection reset by peer]
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
ourdumbfuture has joined #asahi-gpu
possiblemeatball has joined #asahi-gpu
<jannau>
unfortunately many missing symbols but nothing suspicious. killed cleanly and no further kernel messages
<lina>
I think that might be a userspace bug then...
possiblemeatball has quit [Quit: Quit]
mikelee has quit [Ping timeout: 480 seconds]
<dottedmag>
Isn't it fun that there are so many userspace bugs uncovered by M1 that _any_ bug might actually be in the application code?
mikelee has joined #asahi-gpu
<lina>
I mean it could be mesa too, I'm just not sure it's a kernel issue at this point ^^
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
fenix144 has joined #asahi-gpu
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikelee has joined #asahi-gpu
ourdumbfuture has joined #asahi-gpu
fenix144 has quit [Remote host closed the connection]
mikelee has quit [Ping timeout: 480 seconds]
<rosefromthedead>
hrm, i'm reading timestamps from CNTVCT_EL0 before submitting jobs and the finish timestamp on some of the jobs is ending up earlier than when they were submitted lol
<rosefromthedead>
but only slightly
mikelee has joined #asahi-gpu
<rosefromthedead>
gonna write that off as "wow, these machines really *are* quick!" for now
<rosefromthedead>
i wonder whether we could (/should) #ifdef the timestamp ioctl behind !ARM64 and use inline asm otherwise
mikelee has quit [Ping timeout: 480 seconds]
jeisom has joined #asahi-gpu
alyssa has joined #asahi-gpu
<alyssa>
rosefromthedead: the important thing is that it works on !ARM64 for FEX reasons
<alyssa>
\shrug/
alyssa has quit []
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Z750 has quit [Quit: Ping timeout (120 seconds)]
Z750 has joined #asahi-gpu
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
ourdumbfuture has joined #asahi-gpu
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
maria has quit [Remote host closed the connection]
maria has joined #asahi-gpu
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
mikelee has joined #asahi-gpu
mikelee has quit [Ping timeout: 480 seconds]
crabbedhaloablut has quit []
ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikelee has joined #asahi-gpu
fenix144 has joined #asahi-gpu
ourdumbfuture has joined #asahi-gpu
chadmed has quit [Remote host closed the connection]