Summary: | radv: si_scissor_from_viewport returns incorrect result when using half-pixel viewport offset | ||
---|---|---|---|
Product: | Mesa | Reporter: | Philip Rebohle <philip.rebohle> |
Component: | Drivers/Vulkan/radeon | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | fdsfgs, gloriouseggroll |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Sample program to demonstrate the issue
Proposed patch |
Description
Philip Rebohle
2018-04-16 11:35:40 UTC
Created attachment 138867 [details] [review] 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. I have pushed your patch, thanks! https://cgit.freedesktop.org/mesa/mesa/commit/?id=893e19efb74edd6133a607e09338bf5d449632f1 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.