ID3DXEffect::SetValue

Luis Carlos Busquets Pérez luis.busquets at ilidium.com
Mon Feb 6 11:18:56 CST 2012


The current implementation includes a check on param->bytes >= bytes

specifically:

if (data && param->bytes >= bytes)
{

...

}

So if bytes<param->bytes returns D3DERR_INVALIDCALL.

However, the MS version does not act that way: If the parameter is 
shorter than the length of the data, then the data that fits in the 
parameter is put and returns D3D_OK

Therefore, the check of the size should be eliminated and in memcpy 
instead of referring to bytes, it should refer to min(bytes, param->bytes)

Luis



More information about the wine-devel mailing list