- if (is_vertex_shader(This->desc.Version))
- IDirect3DDevice9_SetVertexShaderConstantF(device, desc.RegisterIndex + i, (float *)fvector,
- desc.RegisterCount);
You should probably just use 1 instead of desc.RegisterCount in SetVertexShaderConstantF, as you are already in a loop for each vector. Also, why are you casting a (float *) to a (float *)? Especially after creating a float array just for that.
However, making you use a temporary array to convert struct D3DXVECTOR4 to (float *) was somewhat my bad suggestion I believe. My concern was that the structure maybe didn't have its fields packed (with some padding between the fields of the structure for alignment reasons) and just casting the struct pointer to (float *) would not give correct results. Looking at the definition of D3DXVECTOR4 (and assuming it is correct), it appears to not be the case, so you can simply cast it to (float *). Then you can remove the for loop altogether and just set min(count, desc.RegisterCount) registers in the Set{Vertex/Pixel}ShaderConstantF call. Sorry for not being clear enough / giving wrong directions.
Please add a "(try n)" suffix to the email subject when you're sending new versions of a patch.