Software Renderer

Member
Posts: 81
Joined: 2007.05
Post: #1
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. Smile Still, seems like a noobs perspective but fun to ponder.
Quote this message in a reply
Sage
Posts: 1,234
Joined: 2002.10
Post: #2
There is no connection between the Apple (OpenGL) Software Renderer, and OpenCL.
Quote this message in a reply
Member
Posts: 81
Joined: 2007.05
Post: #3
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. Smile
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #4
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.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Sage
Posts: 1,234
Joined: 2002.10
Post: #5
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.
Quote this message in a reply
Post Reply