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

2018-04-17 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106074

Samuel Pitoiset  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Samuel Pitoiset  ---
I have pushed your patch, thanks!

https://cgit.freedesktop.org/mesa/mesa/commit/?id=893e19efb74edd6133a607e09338bf5d449632f1

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2018-04-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106074

gloriouseggr...@gmail.com changed:

   What|Removed |Added

 CC||gloriouseggr...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2018-04-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106074

--- Comment #1 from Philip Rebohle  ---
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.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2018-04-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106074

soredake  changed:

   What|Removed |Added

 CC||fds...@krutt.org

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2018-04-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106074

Bug ID: 106074
   Summary: radv: si_scissor_from_viewport returns incorrect
result when using half-pixel viewport offset
   Product: Mesa
   Version: git
  Hardware: Other
OS: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Vulkan/radeon
  Assignee: mesa-dev@lists.freedesktop.org
  Reporter: philip.rebo...@tu-dortmund.de
QA Contact: mesa-dev@lists.freedesktop.org

Created attachment 138865
  --> https://bugs.freedesktop.org/attachment.cgi?id=138865&action=edit
Sample program to demonstrate the issue

For the following viewport, si_scissor_from_viewport returns an incorrect
scissor rectangle:

  VkViewport vp = { 0.5f, 1.5f, 1.0f, -1.0f, 0.0f, 1.0f };

Expected result:  offset = (0,0), size = (1,1)
Actual result:offset = (1,1), size = (0,0)

This breaks Final Fantasy XIV on DXVK, see:
https://github.com/doitsujin/dxvk/issues/208

The attachment contains a small C program to demonstrate the issue with the
relevant functions directly taken from si_cmd_buffer.c.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev