http://bugs.winehq.org/show_bug.cgi?id=14762
--- Comment #23 from Stefan Dösinger stefandoesinger@gmx.at 2008-11-24 18:08:40 --- You can't use the render target size here. You have to use the texture size of the texture you're sampling from. In all your apps the texture happens to have the size size as the render target, but that isn't necessarily the case.
You can get the texture sizes from device->stateblock->texture[i]->currentDesc.(With,Height). You have to keep in mind though that the texture doesn't have to be a 2D texture(the shader code is checking that already, otherwise it won't generate a RECT read), or it could be NULL.