Hi,
For those intested here is a quick patch against dlls/wined3d/utils.c, I'll submit an "official" one to wine-patches later, in the meantime feedback is appreciated.
I planned sending a similar patch which looked quite the same, but I'll let you do this.