Opens profile photo
Follow
Alyssa Rosenzweig
@alyssarzg
Linux hacker tinkering with graphics drivers
Joined July 2021

Alyssa Rosenzweig’s Tweets

Pinned Tweet
No hardware documentation. No reference code. No hardware I can control. No problem. 1 hardware bug only affecting MediaTek. 1 software bug only affecting Apple M1. 1 new reverse-engineering tale. Get the scoop on writing a graphics driver in the dark:
22
1,323
Show this thread
Now with documentation on the "twiddled" image layout used by the Apple GPU. , , hopefully we can get closure now😊 mesa.pages.freedesktop.org/-/mesa/-/jobs/
Quote Tweet
I just published "ail", a small library for working with Apple GPU image layouts, incorporating @LinaAsahi and @dougallj's research into the GPU's tiled textures. ail replaces buggy code predating their fantastic research. The code fixes two glmark2 scenes and @Inochi2D. 🧄🧄🧄
Show this thread
1
59
Finally, isl (and ail) decouple the logical representation of layouts from the specific way the layout is communicated with the hardware or the API. This should future-proof the code for Vulkan and future Apple GPUs😉
1
37
Show this thread
For testing, isl (and ail) are "leaf" nodes in Mesa. That requires more code overall than embedding the logic inside the driver. However, hardware tiling/compression is now decoupled from API-visible so we can unit test effectively. ail has 1000+ lines of mipmap test data alone.
1
23
Show this thread

Topics to follow

Sign up to get Tweets about the Topics you follow in your Home timeline.

Carousel

ail borrows isl's solution: standardized unit suffixes for most variables. Sure, you could type foo_pixels + bar_samples ...but to the reviewer, it will sound as ungrammatical as "Big Brother is ungood".
2
22
Show this thread
In theory, we need simple dimensional analysis. In practice, we're writing C code (sigh), so the type system can't check our work. If you accidentally add pixels and samples, gcc won't care (they're both integers). Your code is still broken.
1
24
Show this thread
Worse, layout calculations involve many units with subtle differences. Pixels? Samples? Blocks? For some images, those are all the same. Mix them up and you might not notice... but your users will.
1
24
Show this thread
What's so hard about image layouts? The combinatorics. There are too many image types, dimensions, and formats, all multiplied by bespoke combinations of GPU-specific tiling and compression. Hardware-independent conformance tests aren't enough to check correctness.
1
34
Show this thread
If we fix bugs, someone complains the code is too slow. If we make it fast, someone complains it's missing an obscure feature. If we do it all, we burn out. (And someone complains about that.) Be kind to your FOSS maintainers.
8
727
Congrats for getting kmscube spinning with an open source Linux driver for the Apple M1 GPU* * on an x86 machine over USB, with my Mesa driver and her Python kernel driver. I am proud to be a part of this eldritch horror 🥰
4
351
How To "Just Say No" To Becoming The Primary Maintainer Of Somebody's Abandoned Open Source Project That You Don't Use But Feel Guilty Leaving Unmaintained (For Dummies)
9
519
I'm excited to join the board. The X.Org Foundation stewards the free and open source graphics stack. X.Org members' work ranges from Linux's graphics subsystem to Mesa to X and Wayland Thank you for what you do.
Quote Tweet
A big congrats to Alyssa Rosenzweig (@alyssarzg) for being elected to the @XOrgFoundation Board of Directors! She joins Mark Filion, Collabora's Senior Marketing Manager, who was also re-elected for a second term! x.org/wiki/BoardOfDi #Panfrost #OpenSource
Image
18
731
Nothing like working on the M1 Linux GPU driver from my M1 Linux machine :-) 1/2 mesa:asahi / libasahi_tests OK 0.00s 2/2 mesa:asahi / agx_tests OK 0.00s
11
662
Me, playing with Verilog: I have so much respect for hardware engineers. I am humbled... software is easier. Me, writing drivers: What the actual **** were the hardware people thinking? Steaming garbage. how can anyone with multiple brain cells think ANY of this is a good idea?
14
870
Show this thread
Nontrivial data structures by language I use: Python: import nontrivial_data_structure C++: (500 lines of template errors) Rust: Crystal clear error from borrow checker, no idea how to fix, screw it I'll use an arena. C: Segmentation fault
6
320
Anyway, I've had a lot of fun bringing up open source drivers for Mali "Valhall" GPUs. So I hope you enjoy reading about the final product, more than I "enjoyed" debugging two unrelated cache coherency problems to get there 😅
3
56
Show this thread
"Wait, Alyssa, this driver is new Mali GPUs. How could an M1 issue factor in?" Shameless, completely accurate M1 Linux click bait. Look, somehow a quirk of Apple's input/output memory management unit (DART) triggered a bug in *userspace*. Oops?
1
37
Show this thread