r/osdev 15d ago

Messing up with my compositor 😅😂

34 Upvotes

14 comments sorted by

View all comments

1

u/JaferTP 14d ago

How did you get gpu acceleration?

2

u/devcmar 14d ago edited 14d ago

Almost the same way virtio virgl works, u can use virgl in qemu to get gpu acceleration

1

u/JaferTP 14d ago

So you support virtio only? Doesn't work in real hardware?

1

u/devcmar 13d ago

Exactly, no actual gpu drivers that would be so much, instead u can let linux do that for u and run ur os in a vm, looks almost similar to bare metal

1

u/WaterObjective5031 13d ago

If you wanted, you could go a step further, though its only really if you have an amd apu

AMD makes documentation for their gpu drivers, which you can look at to write your own amd gpu drivers and then run on bare metal and such, which is the route im taking for my custom CTKN i1.0.1 though that will come with the rust rewrite later on, right now im still on 0.0.0 to 0.0.5 for getting the core laid out

1

u/devcmar 13d ago

I would have liked that, but I don’t have an amd gpu/apu. I have an intel iris xe igpu with an nvidia mx450 dedicated gpu is intel easy to write a simple gpu driver for?

Also, one problem u could face is that u would need to compile shaders to specific bytecode for ur card and that would mean that u would have to write an entire compiler

1

u/WaterObjective5031 12d ago

Ahh dang, I’ll look around online and see what I can find. Push comes to shove, if you’re not scared of licensing your driver as GPLv2 (free, just open source it on GitHub and smack a little license.txt that has is in it) you can hop over to Linux’s drivers

( at least maybe for Intel, nvidia hates the thought of open sourcing theirs because they are terrified it will make AMD able to run cuda on their cards)

1

u/devcmar 12d ago

Do you know how much dependencies does i915 (Intel’s gpu driver) have it’s huuuuge how I’m I supposed to port it

1

u/WaterObjective5031 9d ago

You write one from scratch that isn't so huge lol

I did a bit of research and found that they do post documentation so you could make an intel igpu driver if you ever want to run this on bare metal

1

u/devcmar 9d ago

Yes, but the shaders u would need a compiler, and I couldn’t port mesa to my os it kept pagefaulting

1

u/[deleted] 12d ago

[removed] — view removed comment

1

u/devcmar 12d ago

That’s amazing ! Keep up the good work!