Attila Kinali wrote:
Although you can see shaders as a form of CPU,
they are a very specialized form of CPU. And they
have to be specialized to achieve the performance needed.
Thus i would not talk of shaders as CPUs.
They have an instruction set with 4 x 32 bit floating point
registers like AltiVec/SSE, which can also be used for
scalar operations like the conventional regs on a CPU. They
have add, sub, mul, div, like a conventional ALU, plus some
more specialised dot/cross product type operations which
are like those in AltiVec and SSE. (There is no requirement
in OpenGL shading languages that a matrix multiply be
executed as a single operation: all the cards I know of
implement it as a series of instructions.)
With PixelShader 2 and GLSL they have compare instructions
(scalar or SIMD) and branch instructions, even calls to
subroutines. If this isn't a CPU, what is it?
Sites like gpgpu.org exist because GPUs can be used for a
lot of general purpose number crunching; and going the
other way the latest Intel chipsets do programmable shading
*without* a GPU - the chipset has specialised hardware to
assist, but most of the shaders are translated into x86
and executed on the main CPU. The performance isn't bad
either, about equal to an nVidia FX5000 series card.
No it will not. Shaders are highly parallel SIMD units.
general purpose CPUs are SISD constructs with SIMD extensions.
Very few of them can execute more than 2 SIMD instructions
in parallel which limits the number of shader operations
done in parallel which in turn limits the fill rate
(super linearly because there are second order effects
that are not obvious).
Not to talk about the limited I/O bandwidth and added
latency that you get when going off chip. And even less
about the issues when you have more than one system
accessing the memory (which you can get around if you
have full control of them if they are all on the same chip).
Attila, you are missing the point. I don't claim that a
general purpose CPU can outperform a GPU. But it *could*
execute programmable shaders with enough performance to
be 'good enough' for many 3D purposes, and it would be
a hell of a lot quicker and easier than designing our
own.
--
Hugh Fisher
DCS, ANU
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)