Petter Urkedal and Timothy Miller wrote:
6. There may be more flags than we need. For integer division by
zero we can use the overflow, since that's the only way a division can
be out of range. For floating point division by zero, infinity seems
like a natural choice, but I recall there was some discussion on the
list some time ago about special requirement for the Inf and NaN
semantics for rendering so I'm not sure whether we need to differentiate
Inf and zero division for float.
Graphics programmers don't care about really little or really big
numbers, especially if it slows things down. Any denormalized float
can be rounded down to zero, any really big number is infinity. And
don't stop or thrown an exception when this happens, just keep
going.
As mentioned above, we could differentiate long condition-less jumps and
short relative branches if we need to.
(c) Someone else will have to tell us about computed branches.
(Just quoting this as a reminder to the readers.)
Shader Models 1 through 4, corresponding to DirectX up to version 10 and
OpenGL up to 2.1, don't require computed branches. All flow of control
instructions are to known labels or entry points within the source code.
So for just 3D, there's no need for anything but PC-relative/absolute.
But it occurs to me that GPUs these days also get used for decompressing
images/video and various kinds of Photoshop style image filtering. Since
this is done on existing hardware I'd assume that they don't *need*
indirect branching, but maybe it would make it easier? Anyone want to
comment?
DirectX 11, just coming out, has a new general purpose computer shader
API. And there's OpenCL ... Long term, I'd suggest people are going to
want computed branches on their GPUs, so allow for it in the design.
--
Hugh Fisher
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)