Linux in a Pixel Shader - A RISC-V Emulator for VRChat
Sometimes you get hit with ideas for side-projects that sound absolutely plausible in your head. The idea grips you, your mind’s eye can practically visualize it already. And then reality strikes, and you realize how utterly insane this would be, and just how much work would need to go into it. Usually these ideas appear, I enjoy dissecting them for a few days, and then I move on. But sometimes. Sometimes I decide to double down and get Linux running on my graphics card. This is the story of how I made the rvc RISC-V emulator within VRChat, and a deep-dive into the unusual techniques required to do it. Here are some specs up front, if you’re satisfied with piecing the story together yourself: (image credit: @pema99, thanks!) Be warned that this post might be a bit rambly at times, as I try to recall the many pitfalls of writing this shader. Let’s hope it will at least turn out entertaining. Around March 2021 I decided on writing an emulator capable of running a full Linux Kernel in VRC
Linux in a Pixel Shader - A RISC-V Emulator for VRChat 25 August 2021 , by _pi_ views for comments see Hacker News , r/programming or r/vrchat Intro Sometimes you get hit with ideas for side-projects that sound absolutely plausible in your head. The idea grips you, your mind’s eye can practically visualize it already. And then reality strikes, and you realize how utterly insane this would be, and just how much work would need to go into it. Usually these ideas appear, I enjoy dissecting them for a few days, and then I move on. But sometimes. Sometimes I decide to double down and get Linux runn
saved by
related reading
- Tristan's Site - Tristan Humethume.ca
- Ubershaders: A Ridiculous Solution to an Impossible Problemdolphin-emu.org
- Write your Own Virtual Machinejmeiners.com
- A case for learning GPU programming with a compute-first mindset – Maister's Graphics Adventuresthemaister.net
- PiTorch: ML on Baremetal Raspberry Pis | projectsmasonjwang.com
- GitHub - adam-maj/tiny-gpu: A minimal GPU design in Verilog to learn how GPUs work from the ground up · GitHubgithub.com
- Hello World! | Fragment Foundryhughsk.io
- What happens when you run a CUDA kernelfergusfinn.com
- Writing Toy Software Is A Joyblog.jsbarretto.com
- The Case for Use.GPU — Acko.netacko.net
- CUDA C++ Programming Guide (Legacy) — CUDA C++ Programming Guidedocs.nvidia.com
- p0: Running Rust code on RISC-V in QEMU · Meyer Zinnmeyerzinn.tech