Kenneth Ostby wrote:

Actually when it comes hardware there is surprisingly little matrix
matrix multiplication in the 3D world.

Duck test:

        P' = T*P

        |p'1|   |t11,t12,t13| |p1|
        |p'2| = |t21,t22,t23|*|p2|
        |p'3|   |t31,t32,t33| |p3|

We can write this out explicitly but it is still a matrix * a vector:

        p'1 = t11*p1 + t12*p2 + t13*p3
        p'2 = t21*p1 + t22*p2 + t23*p3
        p'3 = t31*p1 + t32*p2 + t33*p3

IIRC, this is called a linear transform which is a special case of a dot product.

Note that this can be accomplished by MAC instructions and there are no dependencies to stall the pipeline.

With a 3-word SIMD you need to:

        clear the accumulator
        load P in a register
        perform 3 MAC vector instructions

If you have a 4-word SIMD you can also do the same for P which is a 4 vector and a 4x4 transform matrix, and it only takes one more MAC.

--
JRT
        
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to