On Thursday 07 January 2010 09:11:11 michal wrote:
> Zack,
> 
> 1. Do I understand correctly that while
> 
> D_ADD dst.xy, src1.xy, src2.zw
> 
> will add one double, is the following code
> 
> D_ADD dst, src1, src2.zwxy
> 
> also valid, and results in two doubles being added together?

Good question. I guess that would be up to us to define. The DX/AMD CAL don't 
allow that because they define inputs as being in the xy component only so all 
the double instructions operate on exclusively one double. 
We could allow it but simply not use it right away from the state tracker 
side.

> 2. Is the list of double-precision opcodes proposed by Igor roughly
> enough for OpenCL implementation?

Another good question. It will largely depend how our implementation of math 
functions for CL 1.1 will look like. CL 1.1 defines double support for such 
math functions as  acos, acosh, acospi, cs, cosh, cospu (same with sin and 
tan), ceil, copysign, exp, exp2, exp10, fabs, fdim, floor, fmax, fmin, fmod, 
frack, frexp, hypot(x, y) [computes value of the square root of x^2+y^2], log, 
log2, log10, mad, mod, pow, pown, remainder, rint, round, rsqurt, sqrt, trunc 
(and various permutations of those and some that are obviously implementable 
with above), so it all boils down to how we'll implement those functions.

I think that a minimal set that could be enough would be: dadd, ddiv, deq, 
dlt, dfrac, dfracexp, dldexp, dmax, dmin, dmov, dmul, dmuladd, drcp and dsqrt, 
plus conversion instructions that convert between float and double and back. 
(this is assuming table or some other fixed implementation of trigonometric 
functions and in general assumes that we trade performance for simplicity at 
least for the time being).

z

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to