Concerning the e-mail http://www.winehq.org/pipermail/wine-devel/2010-April/082900.html
it seems that it is broken because in wine there is no way to ensure that the string will be in the lower 2GB. Actually, according to the Windows Memory Management model:
http://www.intellectualheaven.com/Articles/WinMM.pdf
only the 2 lower Gb are able to be used in user mode in Windows. So actually in Windows OS you have a way to ensure that all user things will be in the lower 2Gb. Is there something similar in WINE, If not, would it not be logical to replicate also that behaviour, so that then d3dxhandle can rely in the MSB? What is more, if there is not that way to ensure that, and I guess that the d3dxx_xx.dll might rely on that to distinguish between strings and d3dxhandle, there might be cases even using the original d3dx, programmes would crash in wine when the wine implementation allocates strings in memory positions where then MSB = 1.
Luis Carlos Busquets Pérez luis.busquets@ilidium.com wrote:
Concerning the e-mail http://www.winehq.org/pipermail/wine-devel/2010-April/082900.html
it seems that it is broken because in wine there is no way to ensure that the string will be in the lower 2GB.
Wine behaviour depends on what application requests. You can't make Wine implementation rely on something that could change from app to app.
Am 25.09.2010 um 05:32 schrieb Luis Carlos Busquets Pérez:
Concerning the e-mail http://www.winehq.org/pipermail/wine-devel/2010-April/082900.html
If I remember correctly d3dx is broken by design in that regard. See D3DXCONSTTABLE_LARGEADDRESSAWARE in D3DXGetShaderConstantTableEx: http://msdn.microsoft.com/en-us/library/bb943959(v=VS.85).aspx
It seems that by default native makes the assumtion that there are no pointers with the highest bit set. If the app requests large address spaces via the flag in the .exe file it is supposed to pass D3DXCONSTTABLE_LARGEADDRESSAWARE to d3dx. Obviously there are apps that don't do that, like Eve Online.
Of course it'd be perfect if you can find a way that provides all the features native d3dx9 provides and doesn't rely on the address space layout. I think that the constant table functions are called often and are performance critical, so maybe this is all a nasty performance hack.