[08/23] wined3d: Allow viewport to be out-of-bounds if using offscreen target.

Matteo Bruni matteo.mystral at gmail.com
Mon Nov 21 18:51:54 CST 2016


2016-11-18 0:58 GMT+01:00 Andrew Wesie <awesie at 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.



More information about the wine-devel mailing list