Software Renderer - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Community Zone (/forum-4.html)
+--- Forum: Assembly Room (/forum-13.html)
+--- Thread: Software Renderer (/thread-2463.html)
Software Renderer - macnib - Aug 12, 2008 09:42 PM
I was just wondering about the Apple Software Renderer.
When OpenCL comes out can Apple utilize it within the Apple Software Renderer? I figure if it were fast enough it might provide consistent behavior across many video cards -- all these video cards seems like the real issue from my perspective. Still, seems like a noobs perspective but fun to ponder.
Software Renderer - arekkusu - Aug 12, 2008 11:14 PM
There is no connection between the Apple (OpenGL) Software Renderer, and OpenCL.
Software Renderer - macnib - Aug 13, 2008 07:03 AM
There must be some general purpose math computation in there. The Apple software renderer could be optimized with OpenCL. I guess something analogous would be to use the accelerate framework. Though, it would not be a pure software renderer if they did that.
Just tired of all these cards I have to test on. I'm worried my Nvidia 8800GT might burn out at any moment.
Software Renderer - Skorche - Aug 13, 2008 08:29 AM
GPUs just aren't going to go away any time soon. OpenCL isn't going to change that, or magically unify them all.
Also, the accelerate framework helps you take advantage of SIMD instructions without having to write processor specific code. It doesn't use any specialized hardware to do it beyond extra instructions that may be available on the processor. I'm pretty sure it doesn't require any particular set of processors either.
Software Renderer - arekkusu - Aug 13, 2008 11:10 AM
What's your real question here? "How do I get consistent behavior across video cards"?
OpenGL and OpenCL are two completely separate APIs, designed to do two completely separate things: render graphics, and compute, respectively.
I'm not going to talk about OpenCL details. But saying you could use it to optimize the OpenGL software renderer is sort of like saying you can optimize an orange with a banana. It's meaningless.
If you want a full-featured, accurate OpenGL renderer that works the same* way across every Mac, use the Apple Software Renderer. It's already there. And while there's always room for improvement, it's already highly optimized (JIT, SIMD, etc.) It won't be fast enough to run a modern game at 60fps, but it's up to you to decide what's more important-- framerate or reproducible results.
*The OpenGL spec is purposely very loose about many details of rasterization, to allow implementors freedom to approximate and optimize. Just like all of the hardware, the software renderer takes full advantage of that freedom. For example, it uses the SIMD instructions for sqrt estimate and log estimate. These instructions produce slightly different results across G4, G5 and x86, so while the results of rendering a textured triangle are visually "the same", they aren't exactly the same across all Macs.
Finally, you need to test your application on whatever configs you want to support. Regardless of what API you use, this is unavoidable. Only you know which features you are using. OpenGL happens to be an API with a very wide range of features that aren't uniformly supported across all hardware.