I have VESA up and running in nice high resolutions with 32 bit color etc... Everything is good, but slow! So I wanna use HW acceleration!
I really have no idea how to start, I can't find any resources or threads on the forum. What type of things can you do with HD acceleration? Right now when I draw a square fill every pixel by iteration; with HW accel. could I tell the graphics card to do that with 1 instruction?
How much faster is HD accel. than software rendering?
As you can see, any information is great! Thanks,
Lster
Pondering Hardware Accelaration
It is a lot faster but the problem is that most information about the hardware is proprietary and not available to the public whith exception of the linux opensource drivers. So getting hardware acceleration will become dificult. So you problably need to do software optimisation in your drivers.
Another thing that i heard on this forum is that you need write-combining (search wiki/forum). This should generally improve by about 50 % according to the forum threads. If you wish you can put some code for your pixel plotting here and we can point to optimisations. Though if you search the forum you will problably also find a lot of info. The next thing you can look at is that you dont draw to much again. for instance when updating a caption of a window you do not draw the whole window, not even the whole caption box, only the part that changed.
I guess that if you can improve your speed by a factor 2 it will already feel fast. (for a day or two
)
Another thing that i heard on this forum is that you need write-combining (search wiki/forum). This should generally improve by about 50 % according to the forum threads. If you wish you can put some code for your pixel plotting here and we can point to optimisations. Though if you search the forum you will problably also find a lot of info. The next thing you can look at is that you dont draw to much again. for instance when updating a caption of a window you do not draw the whole window, not even the whole caption box, only the part that changed.
I guess that if you can improve your speed by a factor 2 it will already feel fast. (for a day or two
![Wink :wink:](./images/smilies/icon_wink.gif)
Author of COBOS
Yes MTRRs makes a big difference, and vesa is fast enough for a hobby GUI OS.
But in most case, its slow dew to bad coding. First write a test program to test the number of FPS and start to improve on the number of FPS.
Look at bottlenecks and bit by bit optimise your code.
PS: I once had a bit of a compo, where i posted some code that filled the screen in vesa 640x480 32bpp from a buffer and timed the FPS, It was a compo to see who got the highest FPS and Brendan won.
Maybe something like this would help to optimise your or other peoples vesa code ?.
But in most case, its slow dew to bad coding. First write a test program to test the number of FPS and start to improve on the number of FPS.
Look at bottlenecks and bit by bit optimise your code.
PS: I once had a bit of a compo, where i posted some code that filled the screen in vesa 640x480 32bpp from a buffer and timed the FPS, It was a compo to see who got the highest FPS and Brendan won.
Maybe something like this would help to optimise your or other peoples vesa code ?.
You might be able to look at the Nouveau drivers if you just want 2D graphics. I've read that they have somewhat basic 2D support.os64dev wrote:It is a lot faster but the problem is that most information about the hardware is proprietary and not available to the public whith exception of the linux opensource drivers. So getting hardware acceleration will become dificult. So you problably need to do software optimisation in your drivers.
C8H10N4O2 | #446691 | Trust the nodes.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
I hear there are several options available these days, Projects exist for reverse engineering both ATI and NVIDIA chipsets.
From what I can tell, basic 2D support exists for both in the X.Org source tree..
ATI r300 based cards are supported by the DRI project, IIRC both 2D and 3D acceleration.. There is apparently even work being done on ATI "r500" chips..
As for NVIDIA, The Nouveau drivers are quite alpha quality.. The X.Org "nv" driver would be a better location to look for "basic 2D" support.
Other open source friendly(ish) chipsets exist, some from VIA have both 2D and 3D drivers... and Matrox cards are well supported IIRC..
You can even find source code for Intel based graphics cards...
From what I can tell, basic 2D support exists for both in the X.Org source tree..
ATI r300 based cards are supported by the DRI project, IIRC both 2D and 3D acceleration.. There is apparently even work being done on ATI "r500" chips..
As for NVIDIA, The Nouveau drivers are quite alpha quality.. The X.Org "nv" driver would be a better location to look for "basic 2D" support.
Other open source friendly(ish) chipsets exist, some from VIA have both 2D and 3D drivers... and Matrox cards are well supported IIRC..
You can even find source code for Intel based graphics cards...