#asahi-gpu · 2023-06-15 13:13
linaYeah#asahi-gpu · 2023-06-15 13:12
linaSince we know that's the safe macOS behavior#asahi-gpu · 2023-06-15 13:12
linaI guess if == 0xb then set the flag, otherwise don't set it, for now#asahi-gpu · 2023-06-15 13:12
linaYeah, so then just a feature flag, only problem is once we do understand it we might want to split that into separate feature flags... but that's okay I guess#asahi-gpu · 2023-06-15 13:11
linaWell away from all the power management gunk#asahi-gpu · 2023-06-15 13:11
linaThere are a few "interesting" clusters of flags in the giant initdata structures and that's one of them#asahi-gpu · 2023-06-15 13:11
linaGuesswork...#asahi-gpu · 2023-06-15 13:11
linaAnd I guess 0 was disable/fault#asahi-gpu · 2023-06-15 13:10
linaThat's the macO-yes#asahi-gpu · 2023-06-15 13:10
linaI'm not sure if we should just pass that to userspace as-is as an integer without understanding it though, it is parsed by the firmware as far as I know, not straight a hardware register.#asahi-gpu · 2023-06-15 13:09
linaI think there's probably one global enable and then specific feature bits or something...#asahi-gpu · 2023-06-15 13:09
linaI think different bits in fault_control might enable different things, but I don't know what's what yet...#asahi-gpu · 2023-06-15 13:09
linaIf you want to test, just flip the kernel arg and plumb it into a new feature you fake on or something, I can put it into the kernel next time I sit down to hack on it ^^#asahi-gpu · 2023-06-15 13:06
linaIt should just be a compatible feature flag#asahi-gpu · 2023-06-15 13:06
linaYeah ^^#asahi-gpu · 2023-06-15 13:05
linaIt's a kernel parameter, asahi.fault_control=0xb#asahi-gpu · 2023-06-15 13:03
linaNice! ^^#asahi-gpu · 2023-06-15 11:42
linaAlso on M2 Pro/Max machines, all GPUs have "missing" cores due to the way they designed the chips... (clusters have uneven numbers of cores and they implemented it by just having phantom cores logically which are always marked disabled)...#asahi-gpu · 2023-06-15 11:41
linaalyssa: For compute context switching, they have a table as part of their data structure that maps core numbers, and my understanding is that is used for GPUs with disabled cores to avoid allocating memory that will never be used, since I'm guessing the core ID has gaps on those. So I'm surprised they don't use it for eMRT?#asahi-gpu · 2023-06-15 11:35
linaAs far as I'm concerned it's just core -> mGPU/cluster#asahi-gpu · 2023-06-15 11:34
linaWhat is a cluster according to apple? I thought I made that one up#asahi-gpu · 2023-06-15 11:34
linaalyssa: Frags is Apple terminology and I don't actually know what it means#asahi-gpu · 2023-06-15 04:36
linaalyssa: BTW, the firefox register spilling thing was some crazy shadertoy, not webrender, so don't worry about that ^^#asahi-gpu · 2023-06-15 02:30
linaalyssa: What I call clusters is what Apple calls "mGPU"s. M1 has just one. We need to test whatever you end up with on t600x and check whether the core ID register is globally unique or we need to get the mGPU ID somewhere else and add it in... hopefully it's unique.#asahi-gpu · 2023-06-14 17:01
linaTested all the discard cases, works ^^#asahi-gpu · 2023-06-14 16:45
linaStill works!#asahi-gpu · 2023-06-14 16:44
linaalyssa: Confirmed it fixes Darwinia ^^#asahi-gpu · 2023-06-14 16:38
linaI just finished the kernel fix! Reviewing now ^^#asahi-gpu · 2023-06-14 16:19
linaThere is exactly one number calculated based on FB tile dimensions that is only relevant for clustering and it needed to be *samples#asahi-gpu · 2023-06-14 16:18
lina(Kernel side)#asahi-gpu · 2023-06-14 16:18
linaBTW, the Ultra thing was an MSAA interaction, there may be more lurking... but I think this is the only one relevant for clustering. So if there's anything else with tiling and MSAA, you'll see it on M1.#asahi-gpu · 2023-06-14 16:17
linaI can try turning it off and see if it fixes it...#asahi-gpu · 2023-06-14 16:17
linaSteven says it's broken and that's why MSAA didn't work when I tested it earlier#asahi-gpu · 2023-06-14 16:16
linaAt least I remember we didn't do it for depth yet...#asahi-gpu · 2023-06-14 16:16
linaalyssa: Do we really support GL_EXT_multisampled_render_to_texture already? That's the implicit resolve stuff, right?#asahi-gpu · 2023-06-14 14:23
linaYes#asahi-gpu · 2023-06-14 14:07
linais that... right?#asahi-gpu · 2023-06-14 14:06
linaalyssa: 3ec: c17fbf33 sample_mask 255, 63#asahi-gpu · 2023-06-14 08:46
linaalyssa: Is that one expected?#asahi-gpu · 2023-06-14 08:46
linafirefox: ../src/asahi/compiler/agx_performance.c:30: agx_occupancy_for_register_count: Assertion `!"" "Register count must be less than the maximum"' failed.#asahi-gpu · 2023-06-14 08:11
linaWe claim to support texture barriers but we don't (and can't without special handling)...#asahi-gpu · 2023-06-14 08:11
linaFigured it out... it's a driver bug#asahi-gpu · 2023-06-14 07:27
linaalyssa: Have you ever used apitrace with X?#asahi-gpu · 2023-06-14 07:26
linaLooked at the Emacs issue and it's Xwayland/X11... I think it's another rendering loop, but Xorg doesn't like running under apitrace so I can't really check...#asahi-gpu · 2023-06-05 14:12
linaI guess I'll have to do some tracing later... I'm not sure what causes it though, whether OBS/window capture is involved or not yet#asahi-gpu · 2023-06-05 14:12
linaSo it's not that it leaks memory progressively... it's that after leaving the lid closed for a while, kwin just instantly leaks a ton of video memory.#asahi-gpu · 2023-06-05 14:07
linaWhen I opened it hours later, it instantly leaked about 2.5GB of memory, at that very instant.#asahi-gpu · 2023-06-05 14:06
linaSo about that GPU memory leak... I left it logging every second, and closed the lid#asahi-gpu · 2023-06-04 05:37
linaI'm going to log systemwide shmem usage under different conditions for a few hours at a time and see if I can at least figure out what causes it