<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 21, 2016 at 6:51 PM, Matteo Bruni <span dir="ltr"><<a href="mailto:matteo.mystral@gmail.com" target="_blank">matteo.mystral@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">viewport_test() passes just fine currently.<span class=""><br></span></blockquote><div> </div><div>I agree it does currently. If you play around with the viewport values though, then it will have differing behavior on real Windows and Wine. For instance, on my Windows machine, if I modify viewport_test to use a width and height of 1024x1024, then the behavior diverges from Wine.</div><div><br></div><div>When I tried different values for the viewport width and height in viewport_test, there seemed to be different behavior once the viewport width x height >= 2*1024*1024. For instance, a 1448x1448 viewport behaves differently than a 1449x1448 viewport. This behavior is likely dependent on the target size, which is 640x480 in the d3d9 tests.</div><div><br></div><div>The width and height values that are in viewport_test (10000 and 10000) seem arbitrary. Does that test reflect a real world program?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span>Is that still an issue after 5cdb8f2486cf00a61c1aac20daef8c<wbr>?<br></blockquote><div><br></div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The point is that moving that block of code inside the<br>
!context->render_offscreen branch doesn't seem correct, the viewport<br>
width / height clamping should only depend on the d3d state while<br>
render_offscreen also depends on wined3d settings. By moving the code<br>
there you're effectively disabling it from wined3d with default<br>
settings.<br></blockquote><div><br></div><div>I am trying to figure out why that block of code is even necessary. At the moment, it just appears to make viewport_test work, which is only useful if viewport_test reflects a real world program. My best guess was that the code was introduced to solve a problem when context->render_offscreen is false; hence I moved the code rather than eliminate it entirely.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What is Overwatch depending on specifically? If it sets its viewport<br>
partially offscreen and doesn't like the clamping, we should probably<br>
make that chunk of code be (indirectly) conditional on the d3d version<br>
by means of a wined3d flag.<br></blockquote><div><br></div><div>Overwatch renders some UI elements to a texture that is smaller than the viewport. By clamping the viewport, the elements are now drawn incorrectly because you just changed the mapping from clip space to screen space.</div><div><br></div><div>I am not convinced that the original code is correct for any d3d version. The behavior I noted above with regards to testing different heights and widths demonstrates that pretty clearly. I can submit a patch to the test to make it clearer, if that is needed.</div></div><br></div></div>