wined3d: Use a common function for parsing SM4 source and destination parameters.