#
#asahi-gpu · 2023-07-22 12:49
dottedmagMaybe BSP :) Just kidding.
#asahi-gpu · 2023-07-22 12:48
linaNo
#asahi-gpu · 2023-07-22 12:48
jannauare the regions always the same size?
#asahi-gpu · 2023-07-22 12:44
linaI'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...
#asahi-gpu · 2023-07-22 12:41
linaMaps does that, but it also does much more complex atlases
#asahi-gpu · 2023-07-22 12:41
linaThe trivial case is four quadrants get written, and then you elide the copies for the first 3 but the 4th overlaps the bounding box
#asahi-gpu · 2023-07-22 12:40
linaUnfortunately 3D box tracking isn't enough for this case since it's an atlas
#asahi-gpu · 2023-07-22 12:40
linaThe 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.
#asahi-gpu · 2023-07-22 12:40
lina3D box actually
#asahi-gpu · 2023-07-22 12:39
dottedmagic
#asahi-gpu · 2023-07-22 12:39
linajust basic 2D box tracking, nothing finer grained
#asahi-gpu · 2023-07-22 12:39
dottedmagDoesn't Mesa have anything similar? No 2D region tracking there anywhere?
#asahi-gpu · 2023-07-22 12:37
dottedmag_print LOL
#asahi-gpu · 2023-07-22 12:36
dottedmag_init_from_region, _translate, _inverse, _subtract, _intersect...
#asahi-gpu · 2023-07-22 12:35
dottedmagI guess this algorithm won't need most of the operations in there.
#asahi-gpu · 2023-07-22 12:33
linaIt's 2700 lines of code...
#asahi-gpu · 2023-07-22 12:29
linaThat way we don't have to involve all that code most of the time
#asahi-gpu · 2023-07-22 12:29
linaI 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
#asahi-gpu · 2023-07-22 12:26
linaAt least it looks like it's the same license, so maybe we can actually lift the code...
#asahi-gpu · 2023-07-22 12:26
dottedmagThe implementation there is pretty straightforward, could be easy to lift out or reimplement.
#asahi-gpu · 2023-07-22 12:25
linaI'd need something in mesa... ^^;;
#asahi-gpu · 2023-07-22 12:25
dottedmaglina: 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)
#asahi-gpu · 2023-07-22 12:21
linaAll 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.
#asahi-gpu · 2023-07-22 12:20
linaI 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?
#asahi-gpu · 2023-07-22 12:20
linaOK, 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.
#asahi-gpu · 2023-07-22 11:00
linaTry 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?)
#asahi-gpu · 2023-07-22 10:59
linaella-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.
#asahi-gpu · 2023-07-22 09:02
linaOoooogh and there's another big silly, the BO cache can return (sometimes wildly) oversized objects and then we go ahead and shadow them whole!
#asahi-gpu · 2023-07-22 08:54
linaIt'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.
#asahi-gpu · 2023-07-22 08:48
linaIt's resource shadowing.
#asahi-gpu · 2023-07-22 08:32
linaThey do get cleaned up when they complete but... I'm seeing batches holding on to 100+ screen size (or even larger) render targets
#asahi-gpu · 2023-07-22 08:30
linaSomehow we have batches holding onto gigabytes of BOs...
#asahi-gpu · 2023-07-22 08:22
linaOK, 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
#asahi-gpu · 2023-07-22 08:13
linaOof yeah, I see 10+GB of BO cache. This is bad.
#asahi-gpu · 2023-07-22 07:53
linaMaybe the BO cache is just over-enthusiastic?
#asahi-gpu · 2023-07-22 07:41
linaWe have a Firefox problem... it's using crazy amounts of GPU memory for some stuff, like Google Maps and the PDF renderer.
#asahi-gpu · 2023-07-21 13:26
alyssashould get back to her day job
#asahi-gpu · 2023-07-21 13:11
alyssarosefromthedead: i gotchu
#asahi-gpu · 2023-07-21 13:11
rosefromthedeadty, last time i tried to run deqp i gave up for fear of going insane
#asahi-gpu · 2023-07-21 13:07
alyssaand where the whole thing is inside a meson devenv
#asahi-gpu · 2023-07-21 13:07
alyssaexec $*
#asahi-gpu · 2023-07-21 13:07
alyssaexport MESA_VK_IGNORE_CONFORMANCE_WARNING=true
#asahi-gpu · 2023-07-21 13:07
alyssaexport VK_ICD_FILENAMES=~/mesa/build/src/asahi/vulkan/asahi_devenv_icd.aarch64.json
#asahi-gpu · 2023-07-21 13:07
alyssaand where agxv is
#asahi-gpu · 2023-07-21 13:07
alyssaEGL_PLATFORM=surfaceless agxv deqp-runner run --caselist $CASELIST --deqp $DEQP_BIN --fraction $FRACTION --output output/ -- --deqp-surface-type=pbuffer --deqp-visibility=hidden --deqp-gl-config-name=rgba8888d24s8ms0 --deqp-surface-width=256 --deqp-surface-height=256 --deqp-log-images=disable
#asahi-gpu · 2023-07-21 13:07
alyssaDEQP_BIN=~/VKCTS/deqp-vk
#asahi-gpu · 2023-07-21 13:07
alyssaCASELIST=$1
#asahi-gpu · 2023-07-21 13:07
alyssaFRACTION=1
#asahi-gpu · 2023-07-21 13:06
alyssawhere run-vk is
#asahi-gpu · 2023-07-21 13:06
alyssa[mesa] alyssa@applejack:~/VKCTS$ run-vk.sh ~/VK-GL-CTS/android/cts/main/vk-master.txt

plus ›