http://bugs.winehq.org/show_bug.cgi?id=14762
--- Comment #25 from Stefan Dösinger stefandoesinger@gmx.at 2008-11-25 05:56:28 ---
Seems like my current approach won't work there, since I'm hardcoding the fixup vector in the shader. I don't think I can simply assume that the shader that is generated is only used for the currently bound texture (if there is anything bound at all).
So as soon as the bound texture changes I would have to regenerate the shader, modifying the fixup vector. That doesn't look like a good/clean approach to me.
You can use a Uniform(shader constants called in d3d. That avoids the recompile.
Note that you won't save a uniform by hardcoding the fixup. Shaders don't support immediate values in the hardware bytecode, so the driver is transparently consuming a uniform for hardcoded values on its own.