wined3d: Rewrite pshader_glsl_texreg2rgb to properly take the write mask into account.