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

Henri Verbeet hverbeet at gmail.com
Mon Nov 14 08:52:17 CST 2016


On 13 November 2016 at 23:40, Matteo Bruni <matteo.mystral at gmail.com> wrote:
> You need to make the same change to viewport_miscpart_cc() (you can
> blame me for that).
>
Maybe a little. But yes, it would probably make sense to have a common
function for that.

> Again, it would be very nice to have a testcase for this. Extending
> viewport_test() in d3d9/tests/visual.c and adding similar tests to the
> other d3d versions shouldn't be too hard.
>
Well, the issue with that is that context->render_offscreen is always
true on common (modern) configurations. I.e., offscreen targets imply
context->render_offscreen, but the reverse isn't generally true.

Perhaps more importantly though, I suspect this change is more about
the wined3d_rendertarget_view_get_drawable_size() call than clamping
the viewport. There was an issue with calling
surface_get_drawable_size() for render targets that aren't 2D
textures, but commit 5cdb8f2486cf00a61c1aac20daef8c7cac0d8312 should
have mostly made that gone away.

We only need the drawable height in case context->render_offscreen is
false, so perhaps it makes sense to only retrieve it for that case,
but at this point that's only a (minor) optimisation.



More information about the wine-devel mailing list