#
…

2023-08-17

01:42jeisom has quit [Ping timeout: 480 seconds]
02:04i509vcbalyssa: looking at https://gitlab.freedesktop.org/asahi/mesa/-/blob/agxv/main/src/vulkan/runtime/vk_meta_copy.c#L558 multiple layers aren't handled yet, is this something more complicated than just run do_copy at different locations a few times or does some other part of agxv need to compensate for this?
02:06alyssaI'm told Collabora is working on finishing vk_meta_copy so I wasn't touching it
02:09i509vcbWell I knew it would happen eventually that I'd cause kde to hang
02:09i509vcbDidn't expect running a semaphore test to do that
02:10alyssayeah the process isolation on these things isn't.. grat
02:10alyssawhen I was doing Mesa on macOS, i got macOS to fail in all sorts of creative ways..
02:11i509vcbI'm guessing this type of hang I can't fix from just trying to ssh in...
02:11alyssaIt might be
02:11alyssaI regularly have to ssh in and pkill sway and that's enough to fix
02:11alyssahaven't had to reboot in months, lina's kernel is rock solid <3
02:13i509vcbI think the compositor hung if I can't adjust volume, well I don't know the local IP off head so I guess I need to reboot anyways
02:15i509vcbWayland compositor handover would be great for this type of situation...
02:24i509vcbWondering is there a reason why dmesg gets swamped with "Blocking due to compute queue full"?
02:24alyssaapparently i have that too, that's neat
02:25i509vcbI noticed that spam when I ran dEQP-VK.synchronization.basic.binary_semaphore.chain which failed before a reboot and works after a reboot
02:28i509vcb> WorkQueue: Cannot submit, but queue is empty?
02:28i509vcbThat seems weird
02:39ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
03:01VinDuv has quit [Ping timeout: 480 seconds]
03:21marvin24_ has joined #asahi-gpu
03:29marvin24 has quit [Ping timeout: 480 seconds]
03:36linaThat sounds like a bug...
03:37linaThe driver is really good with memory safety stuff but there are still definitely bugs in the queuing logic/etc (plus drm_sched problems) that can cause things to get stuck I think...
03:37lina(And then if a fence never gets signaled that can jam all of KDE)
03:38i509vcbFlipping the bits in agxv to turn on timeline semaphores just seems to hang forever on dEQP-VK.synchronization.basic.timeline_semaphore.one_queue
03:38i509vcbI guess this isn't tested so no idea what could be wrong there
03:38linaOh it might be that timeline stuff is just completely broken
03:38linaThat is totally untested, I just wrote it blind...
03:39linaIf you have a branch/testcase I can use to try it I can look at it tomorrow ^^
03:40i509vcbGive me a min and I'll push my current agxv branch so you can look at that
03:44i509vcbdEQP-VK.synchronization.basic.timeline_semaphore.* all hang I believe
03:44Z750 has quit [Quit: Ping timeout (120 seconds)]
03:45Z750 has joined #asahi-gpu
03:45i509vcbI also tested with setting sync_types[1] to &device->sync_timeline_type.sync and then putting NULL at [2] but that just fails on an assert in common code
03:45i509vcbIt's possible I don't exactly know what to do with the vk_sync stuff
03:47alyssai509vcb: welcome to how the kernel driver is built
03:47i509vcbhowever other drivers seem to do fine with null at [2] and [1] being the timeline sync type
03:47alyssalina writes kernel code without being able to test, i write mesa code and find the kernel is broken, lina debugs kernel with my mesa branch, i fix my mesa branch once the kernel is fixed because whoops i also wrote buggy mesa code
03:47alyssaor sometimes the other way around
03:48alyssathe broken branch hot potato
03:48alyssalina and i are experts :~)
03:49i509vcbThe assert I hit has this ominous "We can only have one timeline mode" comment
04:07cylm_ has joined #asahi-gpu
05:53Whistler_ has joined #asahi-gpu
06:04bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
07:34cylm_ has quit [Ping timeout: 480 seconds]
07:54cr1901_ has joined #asahi-gpu
07:54cr1901 has quit [Read error: Connection reset by peer]
08:16jennifilm has joined #asahi-gpu
08:33WindowPa- has joined #asahi-gpu
08:33WindowPain has quit [Read error: Connection reset by peer]
10:10ourdumbfuture has joined #asahi-gpu
10:17cylm_ has joined #asahi-gpu
10:33ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:08cylm_ has quit [Ping timeout: 480 seconds]
11:21zane has joined #asahi-gpu
11:25jeisom has joined #asahi-gpu
11:30ourdumbfuture has joined #asahi-gpu
11:45ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:52ourdumbfuture has joined #asahi-gpu
12:29iyes has joined #asahi-gpu
12:31ATiltedTree_ has joined #asahi-gpu
12:33compassion1785 has quit [Quit: lounge quit]
12:33ATiltedTree has quit [Ping timeout: 480 seconds]
12:34iyesSo I made an account on FDO gitlab, but I can't fork asahi/mesa? It says project limit reached. Do I need some special permissions on my account? How am I going to be able to hack on the source code and make MRs if I can't fork?
12:36ATiltedTree_ is now known as ATiltedTree
12:46iyesOh! Okay!
13:03anarcat[m] has joined #asahi-gpu
13:03compassion1785 has joined #asahi-gpu
13:05cylm_ has joined #asahi-gpu
13:59Dementor has joined #asahi-gpu
14:02iyesLol after not having worked with C for years, only Rust, reading mesa source code now (studying NIR apis) and seeing all the various pointers to different structs everywhere, is filling me with dread and paranoia. :D Everything feels so fragile! I guess I'll get used to it...
14:03alyssayou will not :3
14:03alyssac is terrifying
14:07rosefromthedead"you're in for a world of pain :3"
14:10iyesDoes mesa have any sort of browse-able API docs generated from the source code itself? something similar to what rustdoc/docs.rs for rust projects?
14:12iyesOr am I too spoiled by rust's nice dev tools and having unreasonable expectations here? :D
14:22compassion1785 has quit [Quit: lounge quit]
14:23ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:26iyesYea I looked at those things, but they seem to be incomplete and human written. In Rust projects (and C/C++ projects that use something like Doxygen), it's so nice to able to learn a codebase by using a web browser to search around and click around to explore all the different functions, structs, etc. :)
14:27iyesI guess no such thing exists here. It's fine. I got LSP with clangd working, and I can navigate around the source code easily from my text editor. I'll try to study things that way.
14:28compassion1785 has joined #asahi-gpu
14:29compassion1785 has quit []
14:37compassion1785 has joined #asahi-gpu
14:37possiblemeatball has joined #asahi-gpu
14:38zane has quit [Quit: WeeChat 4.0.3]
14:43alyssathat's doxygen
15:35possiblemeatball has quit [Quit: Quit]
15:48iyesWhat is an agx_bo ?
15:48iyesOr I guess, a "BO" more generally?
15:49i509vcbbuffer object
15:50iyesOh! *facepalms*
15:51iyesThat makes sense, that user-facing apis like UBOs/VBOs/SSBOs/etc would be backed by common code for gpu buffers more generally.
15:54possiblemeatball has joined #asahi-gpu
16:01iyesHow does mesa know what GL extensions to advertise as supported (say, in glxinfo output)? What exactly in the source code of a given driver (say, in our case asahi) results in a given extension to be reported as supported/available?
16:01alyssaiyes: based on the PIPE_CAPs in agx_pipe.c
16:02alyssaalthough I would encourage new developers to focus on Vulkan, there's a lot more low-hanging fruit there for both bugs and features
16:02alyssathe GL driver, I kinda did all the easy stuff and now it's just the hard stuff left :p
16:02iyesHahah, understandable
16:02i509vcbI think some parts of gallium also check the screen vtable as well
16:02i509vcbfor extensions
16:02iyesI still want to learn how things work, though
16:03iyesOut of curiosity, alyssa , based on your judgement, how hard are cubemap array textures? Sample rate shading?
16:04alyssacubemap arrays are easy
16:04alyssabut the GL extension depends on geometry shaders for silly historical reasons
16:04alyssasample shading is hard but already works, just waiting to be released.
16:05iyesOh okay that makes sense why cube map arrays are not advertised as supported in GLES/GL
16:05iyesThat's unfortunate, it was the reason why Bevy game engine's 3d rendering did not work on Asahi when I tried it.
16:06i509vcbI do know that you can run wgpu in it's downlevel gles 3.0 mode currently
16:06i509vcbbut the fancy stuff will need vulkan for wgpu to expose it
16:07iyesYep yep, Bevy works on asahi when using the GLES backend
16:07iyesBut Bevy's 3D PBR materials use cube map arrays
16:07iyesSo 3D examples errored on the missing extension
16:08iyesBut anyway, this is off-topic
16:08i509vcbBack before wgpu-hal and in the gfx-hal days, there was a proper GL 4.6 backend but that never really got ported over
16:09ourdumbfuture has joined #asahi-gpu
16:19i509vcblina: assuming the driver supports timeline sync objects the branch I linked last night should be in a testable state
16:24iyes has quit [Ping timeout: 480 seconds]
16:26i509vcbwhere does the timeline kernel branch live again?
16:30nela has quit [Ping timeout: 480 seconds]
16:33iyes has joined #asahi-gpu
16:34nela has joined #asahi-gpu
16:41Guest8982 has quit [Quit: Bridge terminating on SIGTERM]
16:41rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
16:44iyes has quit [Ping timeout: 480 seconds]
16:45rhysmdnz has joined #asahi-gpu
16:46Guest9188 has joined #asahi-gpu
16:46cr1901_ is now known as cr1901
16:47iyes has joined #asahi-gpu
16:48MaryHmm agxv_GetPhysicalDeviceImageFormatProperties2 isn't filling maxExtent.depth, what would be an appropriate value to report?
16:49iyes has quit []
16:51jeisom has quit [Quit: Leaving]
16:52i509vcb1d and 2d have a depth of 1
16:52i509vcb3d not so sure
16:53crabbedhaloablut has joined #asahi-gpu
16:54alyssaMary: arrays can have up to 2048 layers
16:54Marywe report 8192 for maxImageDimension3D so I suppose that's what we should be doing here
16:54alyssa3D can be up to 8192 depth
16:54MaryWill fix that then, thanks
16:59i509vcbalyssa do you happen to know what kernel branch the timeline stuff is implemented in?
17:01jeisom has joined #asahi-gpu
17:04alyssaI thought it's in what we ship
17:07i509vcbI was going to try to debug myself but I guess it happens with that's shipped so
17:10alyssagpu/rust-wip branch anyway
17:10alyssaalthough that has uapi bumpage
17:10alyssawhich i was going to do next week
17:10alyssarebase agxv i mean
17:13i509vcbWell there are other things I can do in the driver until then
17:15jeisom has quit [Ping timeout: 480 seconds]
18:12jeisom has joined #asahi-gpu
18:12ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:12possiblemeatball has quit [Quit: Quit]
18:19ourdumbfuture has joined #asahi-gpu
18:19VinDuv has joined #asahi-gpu
19:18i509vcbrestarting ide over ssh... I'd think just pkill -9 kwin_wayland but now am on a black screen
19:18i509vcb /s/ide/kde
19:19i509vcbWhat's meant to be the intended way to do this?
19:49alyssai509vcb: I use multi-user.target instead of graphical.target and start (sway in my case most of the time) manually from the tty on boot, so then the pkill returns the tty
19:49alyssanot sure what the Right way is
20:10crabbedhaloablut has quit []
20:11i509vcbNot sure where to look to handle nir_intrinsic_load_num_workgroups in agx_emit_intrinsic
20:14i509vcbHmm nvm I see something in asahi gallium
20:17alyssai509vcb: the nontriviality is CmdDispatchIndirect
20:17alyssayou don't (in general) know the number of workgroups on the cpu
20:20i509vcbin gallium you seem to load the number of workgroups in a sideband storage?
20:21i509vcbalthough that might not be whats good for vulkan
20:22alyssathe way I handle this in gallium is..
20:22alyssa1. For direct dispatch, I upload the workgroup count to GPU memory at dispatch time.
20:23alyssa2. Now regardless of direct or indirect, we have a GPU address to the workgroup count in the common format
20:23alyssa3. That GPU address is mapped to uniform registers for any shader that reads num_workgroups
20:23alyssa4. num_workgroups turns into a read from those uniform registers
20:24i509vcbindirect you are told how many workgroups you have?
20:25alyssano, indirect the app passes the count in gpu memory
20:26alyssa(it could be written by some other compute shader, you can't read it from the cpu)
20:41possiblemeatball has joined #asahi-gpu
20:51jannaulina: did you find an alternative solution for display/gpu testing on the m2 ultra? I finally got dcpext0/dp-altmode to work on t6020
20:54i509vcbthere was an agx opcode reference somewhere if I recall?
20:54jannauanyway, I'll prepare a branch for testing on the mac pro (and the m2 max macbook pro)
21:16i509vcbI learned of nir_lower_compute_system_values which seems to handle nir_intrinsic_load_num_workgroups
21:17i509vcbis there a reason the gallium driver has it's own bespoke thing there with AGX_SYSVAL_TABLE_GRID?
21:17i509vcb(v3dv and a few other drivers use lower_compute_system_values)
21:23karolherbst has quit [Remote host closed the connection]
21:24karolherbst has joined #asahi-gpu
21:27alyssai509vcb: becuase that doesn't actually handle it
21:27alyssait just relies on the driver passing in a constant count
21:28alyssawhich again you don't know for indirect dispatch
21:29i509vcbok so agxv can't use that
21:29alyssathat's an optimization for mesh shaders
21:29alyssanot compute
21:29alyssa has quit [Quit: alyssa]
22:08ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:10ourdumbfuture has joined #asahi-gpu
22:25ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:27ourdumbfuture has joined #asahi-gpu
22:30manawyrm has quit [Quit: Read error: 2.99792458 x 10^8 meters/second (Excessive speed of light)]
22:31manawyrm has joined #asahi-gpu
23:12cylm_ has quit [Ping timeout: 480 seconds]
23:22jannaulina, marcan: https://github.com/AsahiLinux/m1n1/pull/320 required m1n1 changes, can be merged immediately
23:24jannaukernel branch: https://github.com/jannau/linux/tree/asahi-6.4-7pre-dcpext_dp_t602x - only works on t602x with 13.5 fw, tested on j474s
23:25jannauonly atc1 works, should be on all machines the port next to the usb-c port with serial
23:28jannaurequires 'pd_ignore_unused' (haven't checked why yet), there seems to be some kind of memory hazard in afk.c or dptx.c. works for me only if compiled with clang
23:29jannauThis is a problem on fedora since clang and bindgen use libllvm.so from llvm-15/16 which breaks build with asahi
23:32jannauother than that it seems to work ok. comes up reliably at boot and after display standby. only lightly tested
23:44alyssa has joined #asahi-gpu
23:45alyssasince rebasing I'm getting weird Chromium issues
23:45alyssasometimes it fails to start properly and spams stderr with messages like
23:45alyssalink failed but did not provide an info log
23:45alyssa[4983:4983:0817/194416.716259:ERROR:shared_context_state.cc(81)] Skia shader compilation error
23:45alyssaI can't tell if this a Mesa bug or a Chromium one
23:45alyssaMESA_SHADER_CACHE_DISABLE=1 'seems' to workaround which points at a Mesa bug but it's hard to say
23:46alyssaThe on-screen symptom is that Chromium rendering is totally broken
23:46jannaualyssa: Chromium has its own shader cache
23:46jannau ~/.config/chromium/Default/GPUCache
23:48anarcat[m] has left #asahi-gpu [#asahi-gpu]
23:48jannausee https://github.com/AsahiLinux/linux/issues/72 there is an upstream bug but I think we're partly to blame as well since the mesa version doesn't change
23:56alyssajannau: oh, good
23:56alyssahere I was worried this was a regression I introduced ;~P
23:56alyssathanks :)
23:58alyssaOpenGL core profile version string: 3.1 Mesa 23.3.0-devel (git-2866d6991e)
23:58alyssathis has the commit hash
23:58alyssaIDK why they're checking only the renderer
…