2023-08-16
01:03possiblemeatball has joined #asahi-gpu
01:15marvin24_ has joined #asahi-gpu
01:20marvin24 has quit [Ping timeout: 480 seconds]
01:40dylanchapell has quit [Read error: Connection reset by peer]
01:51tertu2 has joined #asahi-gpu
01:54dylanchapell has joined #asahi-gpu
01:57tertu has quit [Ping timeout: 480 seconds]
02:08ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
02:08Dementor has quit [Quit: Ping timeout (120 seconds)]
02:21ourdumbfuture has joined #asahi-gpu
02:45ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
02:47Z750 has quit [Quit: Ping timeout (120 seconds)]
02:47Z750 has joined #asahi-gpu
02:57jeisom has quit [Quit: Leaving]
02:59jeisom has joined #asahi-gpu
03:07jeisom has quit [Ping timeout: 480 seconds]
03:22marvin24 has joined #asahi-gpu
03:30marvin24_ has quit [Ping timeout: 480 seconds]
04:13crabbedhaloablut has joined #asahi-gpu
04:29dylanchapell has quit [Read error: Connection reset by peer]
04:43dylanchapell has joined #asahi-gpu
04:50possiblemeatball has quit [Quit: Quit]
06:48pjakobsson has joined #asahi-gpu
06:49crabbedhaloablut has quit []
06:52WindowPa- has joined #asahi-gpu
06:56mairacanal has quit [Remote host closed the connection]
06:56WindowPain has quit [Ping timeout: 480 seconds]
06:56LinuxM1 has joined #asahi-gpu
07:05WindowPa- has quit [Quit: ZNC 1.8.2 - https://znc.in]
07:05WindowPain has joined #asahi-gpu
07:19bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
07:35iyes has joined #asahi-gpu
07:36LinuxM1 has quit [Quit: Leaving]
07:46iyesHello. :) I'd like to try to contribute. I have a decent understanding of graphics APIs (from a user POV, not an implementer POV), hardware (though more CPUs than GPUs), and I am good at Rust and C (though my C is ... rusty ;) ). Never worked on a gpu driver before.
07:48iyesI have an Asahi (the ALARM based, not Fedora based) install on a M1 Pro MBP, which I don't daily drive but occasionally dual boot into. I don't mind trashing / littering over that OS install. Any advice for how I should set up my workflow for mesa dev?
07:50iyesHow does one iterate on a gpu driver? How can I easily test changes? Also, where can I find documentation?
07:55cr1901 has quit [Quit: Leaving]
07:56iyes has quit [Quit: This computer has gone to sleep]
07:56Method_ has joined #asahi-gpu
08:00Method has quit [Ping timeout: 480 seconds]
08:01cr1901 has joined #asahi-gpu
08:03iyes has joined #asahi-gpu
08:04chadmed has quit [Ping timeout: 480 seconds]
08:29iyesAlso, out of curiosity, has the needed RE work to support cubemap array textures been done? Or is that still blocked on unknowns about the hardware?
08:33jannauiyes: fast iterating on the rust kernel driver works with a development + test machine using m1n1's lightweight hypervisor
08:37jannauI think a good starting task atm might be fixing easy failing test cases from the vulkan cts in https://gitlab.freedesktop.org/asahi/mesa/-/tree/agxv/main
08:38iyesYea I think I'd rather try my hand at mesa userspace stuff, even though it is in C, because of the simpler dev workflow.
08:39jannauthe "good-first-task" labelled one in https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=asahi&first_page_size=20 maybe
08:41jannaufoccus is slowly shifting but I think the main missing features for opengl (es) are not good first task
08:42iyesYea ofc, for someone unfamiliar with the codebase, need easier things to get into the flow of things. :)
08:43iyesBut speaking of which, (very naive question) how much work does it generally take to implement a GL extension, assuming the needed knowledge of the hardware is available / you aren't blocked on not understanding the hardware?
08:43iyes I mean, ofc it varies, some are very complex ... but let's say it is some smaller GL extension, not something huge like geometry shaders
08:44cylm_ has joined #asahi-gpu
08:44iyesI remember alyssa said that the Asahi project started out with GL and not Vulkan, because the existing frameworks/infra in mesa made it easy to implement GL, as it takes care of the peculiarities of the API and the hardware agnostic stuff
08:44mcint has quit [Quit: WeeChat 3.0]
08:45jannaudocumentation is in https://github.com/dougallj/applegpu, makes sense to (re-)read Alyssa's blog post on agx
08:47jannauanother reason for starting with opengl was that it clearly would have a driver which can be used
08:53iyesWhere can I find general (non-asahi-specific) docs to help me learn and navigate around mesa's codebase, architecture, apis, dev workflows, etc?
09:06linaBad news: It's actually setting up the stacks, so we get to implement all that if we want spilling ^^;;
09:09iyes has quit [Quit: This computer has gone to sleep]
09:20zane has joined #asahi-gpu
09:26iyes has joined #asahi-gpu
09:38Whistler_ has quit []
09:57chadmed has joined #asahi-gpu
10:09bisko has joined #asahi-gpu
10:22chadmed has quit [Ping timeout: 480 seconds]
11:16Stary has quit [Quit: ZNC - http://znc.in]
11:17Stary has joined #asahi-gpu
11:48ourdumbfuture has joined #asahi-gpu
11:55chadmed has joined #asahi-gpu
12:08ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:17iyes has quit [Ping timeout: 480 seconds]
12:18alyssaI thought the helper program was only for compute though, what sets up the stacks for graphics?
12:22iyes has joined #asahi-gpu
12:25linaI did see it when bringing up G14X but I didn't make the connection that it was the same helper as always...
12:25linaKernel update in the usual branch, agx/uapi-updates-202308 on top of your layered branch but it's just one commit you can cherry-pick
12:25linaLayered rendering is fixed, needed a kernel bugfix (missing one magic buffer) + all the strides in the UAPI for Z/S
12:27linaI also looked at mesh shaders, it's what you said - no magic CDM in VDM thing, just discrete compute...
12:27linaThere is indeed a magic VA range for dynamic allocation and the messages you'd expect back&forth plus some management structures I didn't look at yet
12:28linaAnd I also figured out stream call/return, I can push some decoder stuff for that, since they use that.
12:28alyssa12:28 lina | And I also figured out stream call/return, I can push some decoder stuff for that, since they use that.
12:30iyes has quit [Ping timeout: 480 seconds]
12:37Whistler_ has joined #asahi-gpu
12:41linaalyssa: MR for the decoder stuff opened, I'll let you figure out when we merge the UAPI stuff but we might want to do it soonish? If you can validate the bindless sampler stuff, layered rendering is tested and the helper program thing is pretty obvious.
12:42linaFor the helper program, if you can help get the mystery instructions into the backend I can try to implement the logic (I'm leaving all the buffers up to userspace, unlike macOS, so we can use our own structures/layouts, we don't have to copy theirs)
12:43linaI already took a good look at how that works so at this point I think I only need the magic instructions/SRs to make it do something useful
12:45linaMy guess given what we saw now is that it maps 1-4 blocks of stack space, each of which is encoded in a particular way (size/addr compressed together). It receives a structure that is basically an array of those pointers for each threadgroup(?) for each core that can be active at the same time, and indexes into it. There's also a core mapping table, since presumably the core IDs the shaders get are "raw"
12:47linaTBH, the core mapping thing is overkill... The table is already a table of pointers to stack blocks, so a dummy core is just 16 bytes * max_active_threadgroups which isn't thaat much wasted space.
13:07iyes has joined #asahi-gpu
13:07linaalyssa: In my single test it was 61 per core for vertex, and for compute that was capped at some max based on local memory utilization etc, so it's probably just "the max occupancy" for vertex.
13:10iyesHi alyssa ! Re: my earlier messages, do you have anything to add to what jannau said earlier? About places I could start, to get into contributing to mesa/asahi?
13:11karolherbst has quit [Quit: Konversation terminated!]
13:12karolherbst has joined #asahi-gpu
13:12alyssaiyes: this is slightly out-of-date (I don't lead panfrost anymore), but https://rosenzweig.io/AlyssasDriverSurvivalGuide.txt
13:23iyesToday I mostly wanted to gather a reading list for myself. For now, I'll be getting through the stuff I was linked, and doing some exploring. I don't know when I'll actually have the time to dive into code more seriously. When I am actually ready to work on something, I'll let you all know. :)
13:32mairacanal has joined #asahi-gpu
14:00possiblemeatball has joined #asahi-gpu
14:10_jannau__stay away from rust-1.71. if you're compiling with clang/llvm, make sure that it uses the same libllvm as bindgen
14:13ourdumbfuture has joined #asahi-gpu
14:31possiblemeatball has quit [Quit: Quit]
14:39_jannau__disable cs35l45 or use https://lore.kernel.org/all/20230725104517.317766590@linuxfoundation.org/
14:46Whistler_ has quit []
14:49zane has quit [Quit: WeeChat 4.0.3]
14:59bcrumb has joined #asahi-gpu
15:04bcrumb has quit []
15:06jeisom has joined #asahi-gpu
15:13karolherbst has quit [Quit: Konversation terminated!]
15:14i509vcbalyssa: I looked at other drivers and now I realize I need to lay out a case why every driver except for nvk and radv is implementing vkGetMemoryFdPropertiesKHR wrong
15:22iyes has quit [Ping timeout: 480 seconds]
15:28alyssaella-0: i509vcb: Lina has bumped the UAPI for some important new stuff.. let me know when I should do the AGXV rebase
15:30iyes has joined #asahi-gpu
15:32i509vcbI'm running the asahi distro kernels, my stuff is mainly in memory land so feel free to bump if ella is okay with it
15:37as400 has quit [Ping timeout: 480 seconds]
15:38i509vcbBefore I go over to #dri-devel to try to figure out which implementations are wrong, I'll try to explain what I think is wrong with v3dv and co in that function
15:38alyssaI'll bump asahi/main today, and if all goes well, we'll push out the new kernel to arch/fedora users tomorrow(?) and then once the new kernel is pushed out I'll rebase AGXV
15:38iyes has quit [Ping timeout: 480 seconds]
15:39i509vcbSo vkGetMemoryFdPropertiesKHR is used primarily used for determining the memory type of a dmabuf you are importing.
15:39as400 has joined #asahi-gpu
15:40i509vcbhowever a lot of implementations (v3dv, tu, pvr, anv, hasvk) return VK_SUCCESS regardless of the file descriptor you pass into that function
15:41i509vcbwhich seems bizzare since those cannot be prime fds which are what vulkan drivers typically consume with the dma buf handle type
15:42i509vcbthat little pseudocode snippet should be returning VK_ERROR_INVALID_EXTERNAL_HANDLE since a file is definitely not a prime fd
15:42as400 has quit [Remote host closed the connection]
15:43i509vcb(radv and nvk act correctly here since a prime fd could be from one of a few memory types and the memory type bits need to be set accordingly)
15:46as400 has joined #asahi-gpu
15:47iyes has joined #asahi-gpu
15:47possiblemeatball has joined #asahi-gpu
15:51karolherbst has joined #asahi-gpu
15:55iyes has quit [Ping timeout: 480 seconds]
16:03iyes has joined #asahi-gpu
16:11iyes has quit [Ping timeout: 480 seconds]
16:17i509vcbseems like what v3dv is doing is fine given that the spec seems to says it's undefined behavior to pass an invalid fd
16:20iyes has joined #asahi-gpu
16:28iyes has quit [Ping timeout: 480 seconds]
16:38iyes has joined #asahi-gpu
16:46iyes has quit [Ping timeout: 480 seconds]
16:54iyes has joined #asahi-gpu
17:02iyes has quit [Ping timeout: 480 seconds]
17:11iyes has joined #asahi-gpu
17:19iyes has quit [Ping timeout: 480 seconds]
17:36ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
17:43ourdumbfuture has joined #asahi-gpu
18:19ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:30ourdumbfuture has joined #asahi-gpu
18:33possiblemeatball has quit [Quit: Quit]
18:34possiblemeatball has joined #asahi-gpu
18:36jeisom has quit [Quit: Leaving]
18:37jeisom has joined #asahi-gpu
18:57lena6 has joined #asahi-gpu
19:51karolherbst_ has joined #asahi-gpu
19:56karolherbst has quit [Ping timeout: 480 seconds]
20:12c10l has quit [Quit: Bye o/]
20:20c10l has joined #asahi-gpu
20:25karolherbst_ has quit [Remote host closed the connection]
20:26karolherbst has joined #asahi-gpu
20:58i509vcbthe fun of dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic, have to effectively rewrite agxv_physical_device_try_create to make the solution bearable
21:00zalyx0 has quit [Quit: later alligator]
21:02zalyx0 has joined #asahi-gpu
21:03ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:14cylm_ has quit [Ping timeout: 480 seconds]
21:27karolherbst has quit [Remote host closed the connection]
21:31karolherbst has joined #asahi-gpu
21:39ourdumbfuture has joined #asahi-gpu
21:50ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:58ourdumbfuture has joined #asahi-gpu
22:00stipa is now known as Guest9096
22:00stipa has joined #asahi-gpu
22:05Guest9096 has quit [Ping timeout: 480 seconds]
22:34ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:37ourdumbfuture has joined #asahi-gpu
23:07possiblemeatball has quit [Quit: Quit]
23:37ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
23:44ourdumbfuture has joined #asahi-gpu