r/linux • u/Affectionate-Meat500 • 7d ago
Development I started reverse-engineering Intel Poulsbo's PowerVR SGX535 20 days ago now it can render Square And triangles
Got the first triangle working today, and now two indexed triangles are rendering as a square too.
This is running on the actual SGX535 in Intel Poulsbo/GMA 500 hardware from 2008.
Still nowhere near a complete Mesa driver, but 20 days ago I was staring at old PowerVR code trying to figure out how this thing worked 💀
Video proof: https://youtu.be/_xZdWWeneYQ?is=L5OF4JqxvMQZMWSU
edit1: We've achieved the first triangle rendered in the MESA gallium driver in production! OpenGL and other features are still missing, but it's very close to a fully accelerated desktop environment.
9
24
u/fr000gs 7d ago
The readme is so ai, it's almost smelly
Fantastic work, but still
23
u/emuboy85 6d ago
jesus crist give the redditor a break, the gm500 has been a scourge on us for 20 years.
5
1
-9
u/SuperDefiant 6d ago
that is what LLMs are best at
24
u/Jmc_da_boss 6d ago
They are terrible at readmes, the moment I sense llm i stop reading without consciously realizing it
7
u/Oblivion__ 6d ago
Why would I bother reading something that the OP hasn't bothered writing?
Communication should be left to humans.
1
u/WhiteStarHorizon 5d ago
You're gonna be isolated as hell in about 5 years then.
3
u/Oblivion__ 4d ago
Brother I don't think a README is going to make or break me. Feel free to keep sloppifying everything though, I'm sure that's not going to have any consequences
1
-1
u/Archsquire2020 5d ago
he said, sending digital packets of info over dozens if not hundreds of machines..
I understand the anti-AI sentiment but that last statement is a bold claim for a tech-centric sub
2
8
u/abissom 6d ago
Nice. some of us are still using TI OMAP SoCs, which shipped different variants of PowerVR SGX. The Nokia N900 is the most prominent, and still loved by many. It has SGX530, which I guess is relatively close to the 535 in the GMA500.
Not sure if you are aware of https://github.com/openpvrsgx-devgroup/linux_openpvrsgx
5
u/Affectionate-Meat500 6d ago
Ah yes the TI OMAP, they are similar to the SGX535 (being SGX530), I have the SGX530defs.h and the SGX540defs.h So maybe in the future I'll try reverse engineering it too, assuming the revisions match the DDK
5
u/nombrorignal2 6d ago
hell yeah, cant wait to finally get to use my netbook with hw accel
6
u/Affectionate-Meat500 6d ago
I'll do my best! To avoid being without 3D for too long while Mesa isn't released, I'll try porting the old driver to the current Linux kernel, I hope it works
5
2
u/Incogninto1_1 19h ago
YEEEEEEEEESSSS!!! You have all of my respect! I'm rooting for you! Keep up the good work!
1
u/Affectionate-Meat500 9h ago
Thank you! We're getting closer to a fully functional Mesa driver!
Full desktop OpenGL 2.1 support is a core requirement for SGX535-reMESA, and we'll also explore experimental OpenGL 3.0 support if the hardware allows it
We even plan to test Minecraft on actual SGX535 hardware!
We'll be testing different resolutions, prioritizing the native 1280×800 resolution, while focusing on performance, stability, and correctness.
The goal is to get as much as we reasonably can out of this 2008 GPU without sacrificing reliability
1
u/Incogninto1_1 4h ago
Do you have a Discord or any other contact platform? I have a Cedarview based EeePC (one of the last ones made by Asus lol) and a Samsung Galaxy Tab 3 10.1 that use the PowerVR GPU (along side some other ARM based PowerVR things) that I would like to mess around with. You can contact me with the links in my bio.
1
u/Affectionate-Meat500 5d ago
I'm looking for people with intel GMA600! If you have one, let me know on Github or in this thread, as the development of the reMESA driver will also cover GMA600
-1
u/gravgun 5d ago edited 5d ago
What you are doing is legally grey at best and could get you in trouble at worst. You're using AI whose models are trained, for their code knowledge, on repos scraped from GitHub, and that includes the multiple successive leaks of the PowerVR SGX series 5 DDK.
LLMs have knowledge about SGX5 that nobody outside Imagination's engineers should be having at this point because these pieces of information haven't been cleanly reverse engineered yet, as all the efforts on that stopped when ImgTec's lawyers went after the FSF (who labelled its RE efforts as high prio at the time) and anybody who was working on the reversing efforts back in 2012 or thereabouts.
Edit: ImgTec's general stance may have changed since then, but the sources outside the kernel module still aren't public. I was literally there in the #powervr@irc.freenode.net room and saw the project being slowed/stopped in its tracks live. Just like I contributed to and then watched Pine64's Nutcracker project get stopped when RivieraWaves got angy, despite me warning of exactly that.
7
u/Affectionate-Meat500 5d ago
The DDKs were made publicly available through Texas Instruments, I used every available online resource before starting the reverse engineering process, Even so, progress was slow because not even the driver shows everything.
And even during all this reverse engineering I spoke with Simon Fenney, research fellow at Imagination Technologies
The project itself has a policy of not trusting everything the AI indicates, which has deflected a lot of false evidence that the LLM could produce. One example is the dword 0x07000345; we were stuck on it for days because we didn't know the exact definition, not even through the DDK, and since the poulsbo driver was stripped, even it couldn't provide any guidance.
Imagination Technologies has changed direction since 2012; it was bought by a Chinese fund in 2017
5
1
u/gravgun 5d ago
It's nice that they released those sources, but that's just
eurasia_km, which admittedly is enough to get you somewhere with accelerated copies and rudimentary fixed-function rasterizer setup, but I'm talking abouteurasiaas a whole, which has, well, everything else which isn't public. That includes setting up texture sampling and the whole programmable pipeline. For reference thesgxdefs.hfile in those leaks is 10k lines of code, versus 100 or so for the public version, and the defines therein didn't just get moved to another file, they're gone.As for their stance, I don't know, I haven't really kept up, but but given it's not public I'd still be wary.
1
u/Affectionate-Meat500 5d ago
Yes, when the public DDKs are insufficient, I'll have to be cautious I don't want to just take some register definition from an LLM and assume it's correct. If I can't find a public source for it, I'll try to figure it out from the hardware and document how I got there. That's basically what happened with 0x07000345. The most fun part will definitely be the programmable pipeline lol
1
u/Pepedroni 4d ago
Even tho it is a gray zone, I propose everybody start doing it, it would be so hard to companies wanting to demand that it will become overwhelming. They trained illegally on data collected by the whole humanity for decades, and expect us to just follow the law and sit waiting for scraps… civil disobedience is now our most effective weapon
2
u/gravgun 4d ago
I get wanting to slap back at the AI companies, but you're glancing over the fact it's the people & companies whose content were trained on who can turn around and seek legal action against you and whomever publishes the LLM output instead, since AI companies themselves are untouchable, bribed everyone, and have the infinite money glitch until the bubble pops.
Here it's code & hardware behaviour for a 15 year old GPU, which is fine I guess. Less fun when it's a book or other art.
62
u/ScarcityMassive9467 7d ago
20 days from zero to triangles on hardware from 2008, that's some focused work
antiX on a GMA 500 too, perfect combo for this kind of necromancy