D3DXMatrixstack: where to go....

paulo lesgaz jeremielapuree at yahoo.fr
Wed Oct 29 07:18:23 CDT 2008


I did several patches about D3DXMAtrixStack. All were uncorrect.

The idea of Henri to implement it is this one:
it is very time -comsumming to allocate or to free memory. So one needs to do that as less as possible.

So, we start with a stack with predefined size. When the stack is full, one multiplies by 2 its size. When one releases items enough of the stack, one divides its size by 2.

Here are patches that implemented that idea.

When looking at your patch, I saw that in my patch, in the D3dxMatrixstackImpl_release function, I do not free the memory of the array of matrix. It should be done.

In the tests patch, I did not check if d3dxmatrixstackcreate fails. If it fails, tests should be skipped. At the end of the test, I did not call the _Release function. It should be done too.

Maybe, you should use these patches and try to improve them.

All the tests passed on my Windows XP box.

David



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20081029/1337a003/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-the-basic-functions-for-MatrixStack(2).patch
Type: application/octet-stream
Size: 3948 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081029/1337a003/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Implement-a-few-tests-for-MatrixStack.patch
Type: application/octet-stream
Size: 6401 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081029/1337a003/attachment-0003.obj 


More information about the wine-devel mailing list