http://bugs.winehq.org/show_bug.cgi?id=14762
--- Comment #38 from Stefan Dösinger stefandoesinger@gmx.at 2008-12-03 12:39:52 --- In theory your changes look good, I can't promise that it will work though. The GLSL shader part is incomplete(PsamplerRectFixup is not declared anywhere, and isn't loaded), and in state.c you're not taking care of the texture matrix side fixup yet. But all in all it moves into a reasonable direction.
by the way, I think you can ignore vertex samplers. I do not know any card that supports them, but doesn't support unconditional NP2 textures. (Geforce 6,7 support NP2, ati radeon <= X1999 do not support vertex samplers*, and I think the GF5 doesn't support vertex samplers either)
(*) Actually, they support them, but you can only use 0 of them concurrently. That's ATIs dirty trick to get Shader Model 3.0 support certified(where vertex samplers are mandatory), even though their cards don't support them.