2016-11-18 0:58 GMT+01:00 Andrew Wesie awesie@gmail.com:
Assuming that viewport_test in d3d9/tests/visual.c is wrong only when render_offscreen is true, is there anyway to fix that test? Or should viewport_test be removed?
viewport_test() passes just fine currently.
The reason for the patch is that Overwatch renders to a 2D texture some UI elements. If the viewport is not what is expected, then the output is wrong (e.g. the UI elements are the wrong size or drawn at the wrong place on the texture).
Is that still an issue after 5cdb8f2486cf00a61c1aac20daef8c?
The point is that moving that block of code inside the !context->render_offscreen branch doesn't seem correct, the viewport width / height clamping should only depend on the d3d state while render_offscreen also depends on wined3d settings. By moving the code there you're effectively disabling it from wined3d with default settings. What is Overwatch depending on specifically? If it sets its viewport partially offscreen and doesn't like the clamping, we should probably make that chunk of code be (indirectly) conditional on the d3d version by means of a wined3d flag.