Results 1 to 6 of 6

Thread: Question about vector and matrix operations speed

  1. #1

    Question about vector and matrix operations speed

    In DX9, are the vector and matrix operations (i.e. D3DXVec3Transform) hardware accelerated, or are those made only by software? Haven't found information on that. I ask because some operations like translation could be made directly instead of wasting processor cycles calling a DX function.

  2. #2

    Question about vector and matrix operations speed

    i don't think they are hardware accelerated. if you want speed you should look into SIMD
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  3. #3

    Question about vector and matrix operations speed

    The D3DX functions are optimized for speed. I believe they take advantage of any features available such as MMX or SIMD.

    Yes, there is the overhead of a function call, but for many functions that would be a minimal amount of overhead compared to what the function does.

  4. #4

    Question about vector and matrix operations speed

    Complex D3DX math functions take advantage of available SIMD instruction set (be it 3DNow!, SSE or SSE2). For most performance when performing matrix manipulations (multiply, etc) they should be aligned on 16byte boundary. As Delphi/FPC do not allow 16byte alignment on compiler level you should watch for this. Installing DirectX SDK and compiling headers with DEBUG conditional will lead to linking against debug D3DX layer -> it emits some helpfull information via OutputDebugString.
    There are only 10 types of people in this world; those who understand binary and those who don't.

  5. #5

    Question about vector and matrix operations speed

    Do you mean the acceleration of those DX operations doesn't work on Delphi? Maybe I'm misunderstanding...

  6. #6

    Question about vector and matrix operations speed

    Sure it's working, but if your matrices are not aligned on 16byte boundaries then SSE(2?) instructions will not be working, so D3DX will need to first move your matrix.
    There are only 10 types of people in this world; those who understand binary and those who don't.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •