#
✕ nick:oliver
#asahi-gpu · 2026-02-05 06:53
oliverThe ail_initialize_interchange functions is mostly just copied.
#asahi-gpu · 2026-02-05 06:53
oliveralyssa: I got the gpu to read interchange compressed format just fine, it was just missing a little change in `agx_pack_texture` and `agx_batch_upload_pbe`. Have a look at the diff here https://gist.github.com/oliverbestmann/d5c4827374dfc03f85a0870074bfa49a#file-mesa-25-3-4-patch-L306
#asahi-gpu · 2026-02-01 13:27
oliverEven if Alyssa does not approve, I got the gpu to render a triangle in interchange compressed and could scan it out with that dcp. I am happy with that!
#asahi-gpu · 2026-01-29 17:03
oliverThank you
#asahi-gpu · 2026-01-29 13:59
oliverAfter reading gpu part 5 I don't understand how macos can use the interchange format. I can configure a metal application to do direct scanout in fullscreen (I think they call it direct-to-display). I recently did that and observed the dcp traces. The way I understood you this should not work when you have partial renders, as the gpu might need to read parts of it back. Do you have any insights in that?
#asahi-gpu · 2026-01-29 13:35
olivermeh. okay. any hints on why macos is using it then? they dont have any of those problems?
#asahi-gpu · 2026-01-29 13:35
oliveryea, hacks all the way
#asahi-gpu · 2026-01-29 13:29
oliverwhy does it need to be able to read things back?
#asahi-gpu · 2026-01-29 12:13
oliversome pictures for that later today to make that clear.
#asahi-gpu · 2026-01-29 12:13
oliverThe first one. I've modified mesa and the kernel and build a small app to initialize the plane with interchange_compressed, render a triangle and scan that out. I looked at the raw compressed data (basically as linear would scan it out) to see how the compressed data looks like. I then compared what's in my rendered buffer with how the dumped buffer from macos looks like to get a feeling of how my data _should_ look like. Let me create
#asahi-gpu · 2026-01-29 10:45
oliverIt looked at framebuffers generated by Macos
#asahi-gpu · 2026-01-29 10:44
oliverjannau: I have looked at the images, yes. The interchange format compresses each 16x16 tile independently and writes one compressed tile per 1024 bytes. So I expect the picture to be mostly back and to have little dots of color all over the place.
#asahi-gpu · 2026-01-29 06:46
oliverokay i'll write something regarding that in the re channel
#asahi-gpu · 2026-01-29 06:42
oliverhere are some pictures of rendering and scanning out interchange. i am using a little program to open the drm interface directly & render the triangle via gl, no wayland between.
#asahi-gpu · 2026-01-29 06:42
oliverhttps://gist.github.com/oliverbestmann/999188061c3a29da850844f5ed9eea8d
#asahi-gpu · 2026-01-29 06:13
oliverCould you send me what you have? I was also doing that, but as soon as I enable compression and tiling, the dcp crashes with something like "isr0 queue not empty". I also looked into the firmware blob, and I think I understood the verify surfaces and verify agx surfaces methods. They do pass happily with compression set, but still crashes in the end..
#asahi-gpu · 2026-01-29 05:47
oliverExactly. And I didn't get it to not crash with an agx fb either.
#asahi-gpu · 2026-01-29 05:29
oliverAlyssa: except for compressed scanout like macos does, right?
#asahi-gpu · 2026-01-28 21:35
oliver*directly = correctly
#asahi-gpu · 2026-01-28 21:35
oliverYea. That's fine for me. I am pretty sure that I set the compression info and plane data directly for the rendered image. Compression artifacts are at the "expected places" when I scan out with interchange format. If I scanout with linear I see that only the first few percent of the buffer are filled with color data. I would expect the full buffer to be filled (sparingly).. I have some comparison pictures from Mac traces.
#asahi-gpu · 2026-01-28 21:31
oliverI'll send pictures tomorrow. Couldn't get agx to work either, it just crashes.
#asahi-gpu · 2026-01-28 21:25
oliveralyssa: I am trying to render into a texture with layout agx interchange and scan that out with the dcp. Thing is, everything works mostly. I can see the shape of my triangle due to decompression errors, so I know that the gpu writes the acceleration buffer correctly. The only thing that is totally broken is that color data is only being written into roughly the first few percent of the image buffer. Any idea why that might be?