Blender and gallium on haiku
I know GL is not complete in haiku, but i want compile it on haiku and learn from now how and what i need on this anyway, I can be a mantainer if is need it i am not a developer but am a high user from linux... then i believe can be useful in this process, anyway i wanna test gallium 3d too, only for help ;).
I really apreciate respectful colaboration.

Comments
Re: Blender and gallium on haiku
Blender is impossible by now
I already review the latest version ....
Gallium, with libdrm and opengl stuff needs come first.
Re: Blender and gallium on haiku
Maybe there is a work-around? Like with some of the OpenGL demos?
Re: Blender and gallium on haiku
aljen on IRC is the guy to talk to.... he is currently working on porting gallium as his time permits. He had an older version of gallium and llvmpipe working but many improvements have been made since. If the current LLVMpipe driver were ported it would mean some games would be playable at decent frame rates at low resolution at least on multicore computers... celerons of course will be left out of the fun openarena would probably work OK on an i7 thats just my guess after having ram LLVMpipe on my AthlonII laptop which is not exactly speedy but did get aroud 15fps in openarena whereas regular mesa is a slideshow
I would expect LLVMpipe to work better on a turion class laptop and even better on i7 which I believe has a 256bit fpu though I could be wrong mine only has a 64bit fpu wheras turion has a 128bit fpu at least oh the late models...
Re: Blender and gallium on haiku
That llvmpipe with gallium sounds very interesting. Mesa is usually 1 to 5 fps for games. If llvmpipe supported multicore then it would be very cool to have and use for now. Until someday when Haiku can get real hardware 3D drivers.
Re: Blender and gallium on haiku
And where I can download it?
can you send me a copy?
michaelvoliveira@yahoo.com.br
Re: Blender and gallium on haiku
up
Re: Blender and gallium on haiku
@michaeloliviera you could ask aljen (Artur) on IRC....
The code has been in a svn branch of haiku for quite some time now... it probably isn't very stable though currently.
search for aljen in trac and you should see his latest commits
Re: Blender and gallium on haiku
Information below relates to using llvmpipe (for OpenGL):
The Gallium3D LLVMpipe driver does not touch the GPU, so it can be run with any graphics card. However, for efficient performance, you will want to be running a 64-bit operating system and a CPU that supports SSE2.0 or better. LLVM can take advantage of SSE3 and SSE4 extensions too, which will result in even greater performance. To no surprise, the better the CPU you have, the better LLVMpipe will perform. The more cores that the CPU has, the better the performance will be too, as the rasterizer supports threading and tiling. If you are running a high-end Intel Core 2 Duo/Quad, an Intel Core i3/i5/i7, Intel Xeon, AMD Athlon II X4, AMD Phenom II, or AMD Opteron your CPU should be adequate.
llvmpipe with Core i7 test:
http://www.phoronix.com/scan.php?page=article&item=gallium3d_llvmpipe&num=3
Mesa R300 (hardware OpenGL driver - uses GPU)
Gallium 3D R300 (hardware OpenGL driver - uses GPU)
llvmpipe (software OpenGL - uses lots of CPU for better performance)
*Mesa Software OpenGL not included in benchmark:
We did not compare the performance to the traditional software Mesa rasterizer in this benchmarking since it is incapable of running any of our OpenGL benchmarks beyond a couple frames per second.
My conclusion:
llvmpipe places the OpenGL burden on the CPU (higher usage). It is way better than Mesa software OpenGL but not the same as hardware OpenGL. Still, good way to start until 3D drivers are created for Haiku.
Gallium 3D rules! For 10% of CPU it really pushed up the fps in OpenArena test. In almost all test resolutions, double or more fps than Mesa R300.
Re: Blender and gallium on haiku
Huum.. I thought that you had one copy of that lib
Yes.. I saw that commits..
But to build, you have to do download of the entire branch.....
Re: Blender and gallium on haiku
Huum.. I thought that you had one copy of that lib
Yes.. I saw that commits..
But to build, you have to do download of the entire branch.....
Re: Blender and gallium on haiku
no matter how experimeental it is in this moment i want test it.
Re: Blender and gallium on haiku
...and what about OpenCL ?
Check out this interesting article (and comments too) about it.
Re: Blender and gallium on haiku
Ok!
here we go
I get the libdrm from aljen branch
and SoftPipe
http://rapidshare.com/files/404317464/SoftPipe.zip.html
but I have no idea how it works..
TinyGL (like MorphOS) could be a good choice, but lacks of sys/shm.h implementation on Haiku
see http://dev.haiku-os.org/ticket/2657
Re: Blender and gallium on haiku
up
Re: Blender and gallium on haiku
To install: Replace libGL.so (library) found in library folder. Find and move out "Mesa Software Renderer" and move in Softpipe in that folder.
Softpipe is Gallium (reference) software driver. Similar to Mesa's software driver but seems less optimized. More for learning how 3D drivers work.
I built and tested Softpipe about 3 weeks back. Using Teapot demo: Mesa software driver: 300 FPS, Gallium Softpipe (driver): 160 FPS. Aljen posted on irc that Softpipe was slower also. Softpipe was step 1 for him and step 2 was looking into i915 driver for Haiku.
MorphOS took TinyGL and used OpenGL acceleration to improve it. TinyGL is outdated and does not handle all of OpenGL.
The MorphOS version of TinyGL is only loosely based on the original implementation. It was rewritten to take full advantage of 3D hardware acceleration. Furthermore, it contains several carefully chosen MESA features. TinyGL on MorphOS provides a much richer feature set and surpasses the original's speed at the same time.
http://3d.morphos-team.net/
Better solutions, because they would give almost everyone OpenGL 3D, would be:
1) llvmpipe with basic hardware (GPU) acceleration
2) Softpipe with basic hardware (GPU) acceleration
3) llvmpipe
Rudolf with his BeOS 3D driver for TNT & Geforce 1&2 provided basic 3D hardware acceleration. I used his driver on BeOS and had Stellarium running at 50-60 FPS. #2 above would be similar to what Rudolf and MorphOS have done for their 3D drivers -ie: take software driver and use 3D (GPU) acceleration to make it usable (faster).
Re: Blender and gallium on haiku
Yeah, thanks! I got the same results here.
Including the black screen of death (SDL+OpenGL)
What leads me to think that is a bad BWindow implementation on SDL video driver
However, TinyGL is not a worst thing (there's a BGLView implementation already done)
perhaps that could bring more faster results
Re: Blender and gallium on haiku
SDL+OpenGL black screen. File a bug for it on dev.haiku-os.org using Mesa Renderer. It could be a Haiku bug. Not sure what happened to cause the Kill Thread.
If you had BeOS installed you could test SDL+OpenGL on it to see what happens. You would have to compile latest SDL for BeOS too. I don't think this was an issue on BeOS but cannot say for sure.
Unless TinyGL had 3D hardware acceleration I would say pass. It was meant for embedded systems and provides only software 3D which is good only for simple demos.
TinyGL is intended to be a very small implementation of a subset of OpenGL * for embedded systems or games. It is a software only implementation. Only the main OpenGL calls are implemented.
http://bellard.org/TinyGL/
To use TinyGL you would have to: 1) update code from 2002 to 2010 and 2) add 3D hardware support to it. If TinyGL is available for Haiku then test it out and let us know how it works!!!
If someone takes a software 3D driver (ie: Mesa Renderer, Softpipe) and adds hardware 3D acceleration then that should work pretty good (ie: hybrid (software with basic hardware calls) 3D driver) or llvmpipe. Only need 30 FPS for games at either 1024x768 or 800x600 to be playable.
Still, you will have to wait for one or more developers to pick this up. Could take 3 to 5 years to get hardware 3D on Haiku. This will not happen soon and I'm OK with that because I haven't 3D gamed for long time. But would be really cool thing to have working on Haiku.
Re: Blender and gallium on haiku
Yeah.. I already did it
http://ports.haiku-files.org/ticket/268 (please see the screenshots)
and
http://dev.haiku-os.org/ticket/3191
axeld said that could be a SDL port problem.. but I can't remmember if in BeOS was the same thing... (my hardware is not suitable)
the Kill Thread is me :D
About TinyGL, the morphOS website displays Neverball and more games that are impossible bring for Haiku now.. (Neverball builds, but the black screen appears)
let sit and wait :(
Another thing: In early versions, Quake III arena was playable, but not now
See:
http://gallery.sikosis.com/main.php?g2_itemId=43
and
http://dev.haiku-os.org/ticket/3163
Could you test?
Re: Blender and gallium on haiku
Thanks for working on this, guys. I am really looking forward to when Haiku has decent 3D.
Re: Blender and gallium on haiku
I built Neverball on Zeta or BeOS and it worked. Pretty sure it played real slow (2 to 3 fps) but was working. That's why I wanted you to test with BeOS to double check.
I tested out BeOS Quake 3 on gcc2 Haiku and it works but:
1) the game wants to connect to the internet and is failing with the same message showing over and over
2) I only get 2 to 5 fps. Very unplayable; too slow.
Quake 3 does not work with gcc4 Haiku! Complains about missing Mesa (OpenGL) renderer. Requires gcc2 renderer.
In the screenshot sikosis was getting 21 fps in Quake3. Wish I knew his hardware setup and settings.
I also downloaded Quake 3 source, made quick fix and compiled it for gcc2 Haiku. Quake3 (Haiku) starts full screen. Has distorted sound and still trying to connect to the internet. Same thing happens with BeOS version. I haven't spent any time looking into what is going on.
This was quick so I have to spend more time to test it out if I think it is worth it.
Edit:
Post above slightly updated.
Quake3 actually does have sound. BeOS & Haiku versions have distorted audio but BeOS one is worse with a buzz to it (annoying).
I enabled fastest settings in graphics and was able to get 9 to 14 fps for game play. Still too slow but better than 2 to 5 I had before.
Re: Blender and gallium on haiku
Maybe someone have sources of Quake 3 for BeOS. It would be very useful in future when we will get 3D acceleration via Gallium3D. I mail to the author of this port but he is no answered.
Re: Blender and gallium on haiku
I ask myself, what indicate this advance, is very interesting, how can this help on and what indicate?
If this game can work on haiku why not blender?
http://www.youtube.com/watch?v=_mzAcaaHotg
http://haikuware.com/directory/view-details/games/3d/quake-iii-for-haiku
I suposse clutter can be in haiku after the 3d come totally implemented.
http://www.clutter-project.org/blogs
Re: Blender and gallium on haiku
Has hardware accelerated graphics on haiku made any progress lately, is it any more stable than it was?
Re: Blender and gallium on haiku
Maybe someone have sources of Quake 3 for BeOS. It would be very useful in future when we will get 3D acceleration via Gallium3D. I mail to the author of this port but he is no answered.
Anywhere that offers binaries of the Quake 3 engine for BeOS should be able to give you the source code because it is licensed under the GNU GPL which requires this.
Re: Blender and gallium on haiku
sources are included in the archive:
"Archive contains:
1) binary for Haiku GCC2 and GCC2 Hybrid
2) binary for Haiku GCC4 and GCC4 Hybrid
3) source code "
Re: Blender and gallium on haiku
then if i understand is not posible compile the nouvveu drivers yet?
why?
DRI2, what about it?
Re: Blender and gallium on haiku
No gallium 3D hardware drivers. No nouveau 3D drivers. Because driver has to be ported to Haiku. Just like how the 2D drivers in Haiku have been ported over.
I am guessing long time before you see accelerated 3D on Haiku. No one is working on it from what I can tell.
Re: Blender and gallium on haiku
I have the will but not full knowledge. if somebody help or teach me maybe i can help in this, i know basic know about c++, from avariables to class and objects...but i dont know the logic of drivers o thats things and sincerilly jus low programing knows...but yes i am very interested.
Help! lets get 3d in haiku!
Maybe just can help and future patchs... but i am really ansius about 3d on haiku because alpha2 being useful for many things now.
Re: Blender and gallium on haiku
So you could squash a bug in SDL, to support 3D games
http://ports.haiku-files.org/ticket/268
It's all about 20 lines of code
Necessary knowledge: BGLView and BDirectWindow classes
Re: Blender and gallium on haiku
No gallium 3D hardware drivers. No nouveau 3D drivers. Because driver has to be ported to Haiku. Just like how the 2D drivers in Haiku have been ported over.
I am guessing long time before you see accelerated 3D on Haiku. No one is working on it from what I can tell.
This is a big problem for Haiku. No hardware 3D. But one that needn't be insurmountable. The answer to this problem lies in completely circumventing the problem itself. In other words... stop trying to write drivers to access hardware accelerated 3D in the video cards we have in our systems that the video card companies aren't going to ever give us the specs to...
I'm sure you're scratching your head, going, "What the... huh? How can that possibly solve our problem?"
The answer is simple... if you can't figure out how to write hardware accelerated 3D drivers for video cards that other's make... MAKE YOUR OWN VIDEO CARD!
Now, what I propose may seem insane, but it really isn't. It's simply creating a work-around solution that will, in all likelihood, provide what we want (playable 3D gaming), in a way that let's us define exactly what the card can do and how fast it can do it.
Now, before you start telling me that designing a video card takes millions of dollars and fabs to create the chips and all that stuff, let me tell you that the hardware portion of the answer is likely right where you're reading this and the initial code to make it function is only a download away.
If I have your interest piqued, do reply and/or Email me. You're not gonna believe the answer... it's a very primitive solution, conceptually, but (in theory) it should work faster than the current software solution we're having to use presently.
I just need someone (or a couple people) willing and able to give it a try...
Re: Blender and gallium on haiku
BUT linux have advantage on this, they have drivers for ATI, intel, sis, S3... Nvidia have opensource 3d drivers too, and in this precisly moment it can have at less the mid speed of the video card they support including 3d obviusly with some of bug, but this can be good to start.
http://nouveau.freedesktop.org/wiki/FrontPage#Status
I wanna do anything what i can to help in this camp, but need somebody with most experience who ask the things and help to learn for all this process.
I did´nt understand your solution, can u explain me better that?
Re: Blender and gallium on haiku
I think to combat this / get one up on linux we need to focus ALL of our effort in terms of the graphics server on making the generic graphics driver the best it can be. Add a softpipe to the system, get OpenGL/tinyGL up and running. the key lies in a universal solution for graphics. in its current state the generic VESA driver is massively powerful in haiku why not build on that.
Re: Blender and gallium on haiku
what is the suggestion? how to start this? how to implement it?
Re: Blender and gallium on haiku
what is the suggestion? how to start this? how to implement it?
In what?
Re: Blender and gallium on haiku
making the generic graphics driver the best it can be
Add a softpipe
get OpenGL/tinyGL
Re: Blender and gallium on haiku
The TinyGL in MorphOS definitely seems better than the original. But how is it better than OpenGL? How would it work better as a general solution? If anyone who knows more about the TinyGL used in MorphOS could share the knowledge, it'd be appreciated.
Re: Blender and gallium on haiku
What is needed to port Tinygl?
Re: Blender and gallium on haiku
Only fix compilation issues...
and bring-to-update the current functions
because TinyGL already have an BGLView implementation :D
-
but Again, it's better fix SDL+OpenGL issues... I'm not a coder
but I know that with a little effort, this could be done
Re: Blender and gallium on haiku
The source of ArOs Gallium can be useful for haiku? in wich way?
Re: Blender and gallium on haiku
I did not know that even AROS gallium port is surpassing Haiku...
Re: Blender and gallium on haiku
Right now it seems like people want to do everything at the same time when it comes to video drivers. One is trying to make a compatibility layer for binary blobs in Linux, one (or more?) is trying to get Gallium3D over to Haiku, and now it seems there might be people trying with TinyGL as well. I think we need some direction. What are we trying to accomplish and how do we go about it as good as possible?
I personally think Gallium3D is the way to go. It already has drivers for modern ATI and nVidia cards, and it seems to be a good framework in the way that drivers only expose hardware functions to Gallium3D and then API's like OpenGL are supported since the support is already in Gallium3D itself. In theory, we could even use Direct3D in Haiku, if only Gallium3D supports it. ;)
If anyone knows anything about the TinyGL used in MorphOS that you would like to share though, please do so. It might be awesome but I know almost nothing about it.
Re: Blender and gallium on haiku
I don't know too much about MorphOS
is someone working on TinyGL for Haiku?
I once give a try.. without success..
Firstly create a shared lib is needed
after, update it with Mesa recent changes
http://ports.haiku-files.org/ticket/371
Re: Blender and gallium on haiku
This TinyGL is a completely different beast. From MorphOS's website:
TinyGL was originally created by Fabrice Bellard as a subset of OpenGL® for embedded systems and games. It was designed with no hardware acceleration in mind at this time. Only the main OpenGL calls were implemented.
The MorphOS version of TinyGL is only loosely based on the original implementation. It was rewritten to take full advantage of 3D hardware acceleration. Furthermore, it contains several carefully chosen MESA features. TinyGL on MorphOS provides a much richer feature set and surpasses the original's speed at the same time.
- Big set of implemented functions with high degree of OpenGL® compliance
- Easy to use system layer API
- Highly configurable
- Fast and robust pipeline which was tightly optimized for lots of common cases
- Non-blocking rendering (no context locking required)
- Multitexturing, mipmapping and palette texture handling
- Cube mapping
- Stencil buffer
- Vertex arrays
- Display lists
- User clipping planes
- Selection buffer
- Evaluators
- GLUT implementation
- All primitives are supported, including lines and points (smooth or not) of variable sizes.
The TinyGL developer kit is available for download on the MDC (MorphOS Developer Connection) website.
I can't make out a lot, but I do understand that this seems a lot better than the original, feature-wise. What the point of supporting any of these two would be if we could get real OpenGL support, however, I don't know.
Re: Blender and gallium on haiku
They do have hardware acceleration based on gallium3d + nouveau driver
http://web.aros3d.org/index.php/projects
here is the bounty that is completed
http://amigaworld.net/modules/news/article.php?storyid=5547
and here is one of the demos running on nouveau : Lugaru
http://www.youtube.com/watch?v=YozKvRwlzV4
Re: Blender and gallium on haiku
Looks awesome. It should be ported to Haiku as well.
Re: Blender and gallium on haiku
Yes, great seeing Aros with hardware accelerated 3d. This bodes well for a 3d accelerated Haiku in the (hopefully) near future aswell.
Re: Blender and gallium on haiku
awwwww i want lugaru and blender in haiku...ArOs dont like to me :( ... haiku and 3d!
haiku are the best...but we really need 3d
how are the state on the port of Mesa? is done?
softpipe driver .. Wip?
Gallium3D nouveau driver NOP?? WIP??
AGP support ???
3D accelerated app_server???
what are the status on this?
Re: Blender and gallium on haiku
Mesa port is done :D
Are missing some recent game functions...
Softpipe renderer is working, but have 1/3 of Mesa renderer speed and some visual issues. To test, please see the download link of my previous comment above.
Gallium3D driver is not ready yet
AGP is ok since 2006
3D app_server is for R2 only
Re: Blender and gallium on haiku
Then i can compile the last version of mesa in haiku withaout any problem?... thats is great! then the next step are? optimization of Mesa soft pipe renderer? generate the soft pipe gallium3d? make Gallium drivers?
mmm thats parcial port of gallium can help for do this, no? are more hard than i think?
i am really learning so much things with this thread.
For me the 3d drivers on Haiku could be the more big news later of Alpha1 release.
Re: Blender and gallium on haiku
There is no Haiku port of Mesa to compile.
Instead, Haiku comes with an OpenGL kit (libGL.so, libglut.so symlink, public GL headers, add-ons API) which *use* Mesa 7.x (can't remember the extact version):
- libGL.so contains and rely on Mesa GLAPI dispatching code
- libGL.so contains and rely on Mesa GLU implementation (which is SGI's one in fact)
- libGL.so contains and rely on Mesa GLUT implementation (which lacks recent Game extensions as mentioned above)
- libGL.so contains GLRenderer, GLRendererRoster, GLAPIDispatcher and GLView base classes.
The later delegates all the ugly stuffs to a GLRenderer object, which is bound to GLAPIDispatcher (a wrapper object around the mentioned Mesa GLAPI) at GLView init. The GLRendererRoster object manage renderer add-on(s), providing one at GLView's demand.
- Mesa Software Renderer add-on contains and rely the Mesa software rasterizer, wrapped into a GLRenderer object.
- The softpipe renderer add-on from the Galluim3D branch contains and rely on Gallium3D softpipe renderer, wrapped into a GLRenderer object.
Yes, I know, it's overly complex. And consider that it's way more simpler in Haiku implementation than on Linux, where DRM, DRI, DRI2 and X drivers are involved too. For HW 3D support, it will complexify a bit more, for sure.
Optimizing the Mesa software renderer will be hard, as it's already well done since years by Mesa developers. What's lacking is using the threading power, but except the multi-bands branch (which split the rendering in several bands and threads) of latest Mesa versions (not sure it has been merged into trunk yet, though), there is not much to expect here.
Switching to Gallium API (which needs Mesa too) in order to get as free the LLVM-optimized-and-multithreaded soft pipe (dubbed llvmpipe) will give us a far quicker software renderer than currently. But it will be long away still from what kind of performance people and 3D apps are asking today: hardware accelerated 3D. Software renderers are poorman fallback solutions now, pratically useless.
The port of Gallium to Haiku is the way to go no doubt, and is already in progress. It will gives us really useable 3D support. What's lacking is free time and, most probably, a second worker to help Arthur carrying this heavy task. Maybe a GCoS next year, or some HCD (Haiku Coding Drive)...
Switching app_server to use OpenGL is definitively not yet scheduled, and depends on HW 3D support availability. There is no point to start it without.