Skip to main content
GameDev.net gamedev.net
🔒 Locked

d3dx9math - fast enough!?

Started by gamelife Jan 10, 2003 at 5:33 AM 4 replies 450+ views
Original Post
gamelife
gamelife
Is it fast enough? AFAIK, using AMD''s 3DNow or Pentium''s SSE can boost the speed of vector/matrix operations *N* times faster. I am curious.. does MS optimized functions like D3DXMatrixMultiply by 3DNow/SSE?
S1CA
S1CA
Yes. Actually engineers from AMD and Intel wrote & optimised the code for Microsoft specifically for D3D and D3DX. It''s known as the PSGP, "processor specific geometry pipeline/path"

If you step through the call to D3DXMatrixMultiply you''ll see it using whatever SIMD is present. If you look at the symbols in the .lib you''ll see things like sse_D3DXMatrixMultiply, x3d_D3DXMatrixMultiply etc

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
tok_junior
tok_junior
Yup.
I actually tried to write faster code myself, and didn''t manage to in most cases, this code is ultra optimized

--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
gamelife
gamelife
Nice. It''s always better just rely on Microsoft...

One more question: suppose I want to multiply an array of one million D3DXVECTOR4 (or D3DXMATRIX) by one *single* D3DXMATRIX, do I need to call D3DXVec4Transform (or D3DXMatrixMultiply) 1 million times?
I cannot find D3DX functions for batch transforms. Some articles from google presented batch multiplication functions that can be optimized further and faster.
xyzzy00
xyzzy00
D3DXVec4TransformArray was added in D3DX9.

xyzzy

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.