I'm coding an open source realtime video editing program called OpenTZT which built heavily on DirectX. The program keeps most surfaces in system memory and is currently optimized for MMX. I would like to work on integrating SSE optimizations but am having a hard time figuring out how to align DX surfaces. From what I've been able to gather thus far it doesn't look possible, so I've considered making my surfaces 15 pixels wider than they need to be and then just start the actual data at the start pointer + (pointer MOD 16).
s_ptr=(LPWORD)lpddsoSource->GetPointer();
s_start=s_ptr + (s_ptr % 16);
I suppose that's a possible solution, but it doesn't seem very elegant. Is there some way to force DX to put system memory surfaces on a 16 byte boundary?
Thanks,
-Esotic
s_ptr=(LPWORD)lpddsoSource->GetPointer();
s_start=s_ptr + (s_ptr % 16);
I suppose that's a possible solution, but it doesn't seem very elegant. Is there some way to force DX to put system memory surfaces on a 16 byte boundary?
Thanks,
-Esotic