[Mesa-dev] [Bug 106074] radv: si_scissor_from_viewport returns incorrect result when using half-pixel viewport offset

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 16 14:52:08 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=106074

--- Comment #1 from Philip Rebohle <philip.rebohle at tu-dortmund.de> ---
Created attachment 138867
  --> https://bugs.freedesktop.org/attachment.cgi?id=138867&action=edit
Proposed patch

The attached patch fixes the issue in FF XIV. I'm not sure if that is entirely
correct, but the use of the integer version of 'abs' in the following code
looks incorrect given that 'scale[i]' can be non-integer even if the viewport
size is integer.

    rect.offset.x = translate[0] - abs(scale[0]);
    rect.offset.y = translate[1] - abs(scale[1]);
    rect.extent.width = ceilf(translate[0] + abs(scale[0])) - rect.offset.x;
    rect.extent.height = ceilf(translate[1] + abs(scale[1])) - rect.offset.y;

Also it seems that my assumption that the size should be (1,1) was incorrect,
it should indeed be (2,2). This is in line with what RadeonSI returns.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180416/25a144cc/attachment.html>


More information about the mesa-dev mailing list