Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


16-byte aligned matrices - how?

This topic is 5857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Howdy all, I''ve just finished implementing a full 6dof camera class and all is cool except a little annoyance. I''m using the D3DX matrix routines and encounter the following msg in the debug output: D3DX: Matrices should be 16-byte aligned for optimized D3DXMatrixMultiply I''d like to make use of the "optimised" D3DXMatrixMultiply rather than the apparent unoptimised version my code is using. How do I ensure that my matrices are 16-byte aligned. I would have thought that the matrices themselves would be multiples of 16 bytes and that declaring them as the first local variables ina function or as the first members of a class would have done the job. Any suggestions would be greatly appreciated. Thanks Toby Gobsmacked - by Toby Murray

Share this post

Link to post
Share on other sites
Thanks for the reply Simon, knowledgable as ever.
Only either I''m using the D3DXMATRIXA16 wrong or it doesn''t work for me.
The comments in d3dx8math.h talk about it not working on VC6 compilers unless they have the "processor pack" installed.
How do I check if I have this installed or not?

By declaring my old D3DXMATRIX''s as D3DXMATRIXA16''s is this the correct usage of this class in order to get 16-byte aligned matrices? (in other words, is the reason it isn''t working because I may not have the pack installed?)


Gobsmacked - by Toby Murray

Share this post

Link to post
Share on other sites
I think VC6 will tell you the service pack and I think it''ll tell you in about box & it may tell you about the processor pack too. I seem to remember that the processor packs install a file called ''ppack.chm'' in one of the directories of VC. I believe that ml.exe (MASM assembler) is not supplied by default with the VC installation - it definatelly comes in processor packs.

If not you''ll need to get the latest Service Pack and the Processor Pack (PP doesn''t install without respective SP).

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!