* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
@ 2015-02-06 16:06 bugzilla-daemon
2015-02-06 16:07 ` bugzilla-daemon
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-02-06 16:06 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 2305 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
Bug ID: 89012
Summary: Incorrect behaviour of half_pixel_center = 0
rasterizer setting on R600 and SI
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: dri-devel@lists.freedesktop.org
Reporter: axel.davy@ens.fr
QA Contact: dri-devel@lists.freedesktop.org
Created attachment 113228
--> https://bugs.freedesktop.org/attachment.cgi?id=113228&action=edit
result drawn by the test. The bottom triangle is wrong.
Tested on Evergreen and CAPE VERDE.
Nine uses the rasterize setting half_pixel_center = 0,
which means, as the docs puts it:
"the rasterizer should use (0, 0) pixel centers for determining pixel
ownership". This is the mode needed for d3d9.
The hw has a state for that.
For example on SI, PA_SU_VTX_CNTL has PIX_CENTER set to 0 to get this
rasterizer mode. The doc says that the hw implements it by adding 0.5. This is
the same for R600.
But is seems it requires some other things to work, or that it is buggy, or
something else we don't know.
We have some games having bugs because of off by 1 results for the drawing.
This causes red shadows for example for Borderlands 2.
Nouveau and llvmpipe don't hit these bugs.
The problem is that the translation seems to suffer precision issue or
something.
We tried play a lot with the states for IEEE-> fixed float prevision on the two
cards and with FLOAT_ROUND, but that didn't solve the issue.
The problem can be reproduced with the attached demo, using Xnine (you need
edit Xnine.c to fix the loading path of the nine module). This attached image
show the visual result: on two triangles drawn, one gets off-by one pixels(the
one of the bottom). These issues only happen with corner cases vertex
positions.
The program also outputs some numbers, and the green ones should show 1,
but on R600 and radeonsi they will show 0.999998. the fact this result is below
1, will make floor result in the wrong number, and causes the off by one pixel
issue of the demo.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 3831 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
@ 2015-02-06 16:07 ` bugzilla-daemon
2015-02-06 16:31 ` bugzilla-daemon
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-02-06 16:07 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 383 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
--- Comment #1 from Axel Davy <axel.davy@ens.fr> ---
Created attachment 113229
--> https://bugs.freedesktop.org/attachment.cgi?id=113229&action=edit
Image showing the expected triangle (top, drawn with nouveau), and the triangle
got on R600/SI (bottom)
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1499 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
2015-02-06 16:07 ` bugzilla-daemon
@ 2015-02-06 16:31 ` bugzilla-daemon
2015-02-06 16:50 ` bugzilla-daemon
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-02-06 16:31 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 884 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
Tiziano Bacocco <tizbac2@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tizbac2@gmail.com
--- Comment #2 from Tiziano Bacocco <tizbac2@gmail.com> ---
Created attachment 113231
--> https://bugs.freedesktop.org/attachment.cgi?id=113231&action=edit
Xnine testcase that checks the output of fract on texcoord.x*16-1/256
Beware that the part to d3dadapter9.so is hardcoded so you will need to change
it
This testcase renders a quad of two triangles that cover the entire screen (
256x16) , and outputs what happens with frac along the X axis on the 15th line,
where the triangle that has problems lies
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2502 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
2015-02-06 16:07 ` bugzilla-daemon
2015-02-06 16:31 ` bugzilla-daemon
@ 2015-02-06 16:50 ` bugzilla-daemon
2015-02-06 16:51 ` bugzilla-daemon
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-02-06 16:50 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 416 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
Alex Deucher <alexdeucher@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #113228|text/plain |image/png
mime type| |
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1097 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
` (2 preceding siblings ...)
2015-02-06 16:50 ` bugzilla-daemon
@ 2015-02-06 16:51 ` bugzilla-daemon
2015-02-24 18:30 ` bugzilla-daemon
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-02-06 16:51 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 416 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
Alex Deucher <alexdeucher@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #113229|text/plain |image/png
mime type| |
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1097 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
` (3 preceding siblings ...)
2015-02-06 16:51 ` bugzilla-daemon
@ 2015-02-24 18:30 ` bugzilla-daemon
2015-03-08 7:34 ` bugzilla-daemon
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-02-24 18:30 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 251 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
--- Comment #3 from Marek Olšák <maraeo@gmail.com> ---
It also seems to be incorrect with half_pixel_center = 1.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1092 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
` (4 preceding siblings ...)
2015-02-24 18:30 ` bugzilla-daemon
@ 2015-03-08 7:34 ` bugzilla-daemon
2015-03-21 14:26 ` bugzilla-daemon
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-03-08 7:34 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 717 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
--- Comment #4 from Axel Davy <axel.davy@ens.fr> ---
With additional tests, we found out the problem comes out from the barycentric
coordinates. On one of the triangle, one barycentric coordinate is very
slightly below the expected value. It's not just on some pixels, but on all the
pixels of the triangle.
We also tested on an r600 card (hd3650), and the bug is the same. However for
SI and R600, the handling of the barycentric interpolation seems to have
evolved a lot.
Could it be some state that has been forgotten in the doc, that would specify
barycentric coordinates rounding ?
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1534 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
` (5 preceding siblings ...)
2015-03-08 7:34 ` bugzilla-daemon
@ 2015-03-21 14:26 ` bugzilla-daemon
2015-03-21 15:00 ` bugzilla-daemon
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-03-21 14:26 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1525 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
--- Comment #5 from Axel Davy <axel.davy@ens.fr> ---
Created attachment 114504
--> https://bugs.freedesktop.org/attachment.cgi?id=114504&action=edit
Additionnal test
Additional test that draws a square of size 256 * 24.
The pos coordinates of the square are (-1-(1/256), 1+(1/16)) and (1-(1/256),
-1+(1/16))
the first texcoord a is 0 for the left of the square and 1 for the right
the second texcoord b is 0 at the top, 23 at the bottom.
the images shows the b-th bit of the mantisse of a.
On ilo, nouveau and llvmpipe, the image is black, except at the top, where we
see some white pixels with a specific scheme.
On radeonsi and r600, the top right triangle is the same than for the others,
but the bottom left triangle is almost full white.
This shows that the texcoord a has a value just below what it should have for
this triangle. This is the root of the problem, as the game shader with the
problem multiplies the texcoord value by a power of two, and then applies
floor. Because of this bug, it gets off by one problem.
This 'little below expected value on one of the triangle' problem doesn't
depend on the half_pixel_center = 0 parameter. It just happens that for what
the game does, the texcoord value with half_pixel_center = 1 instead of 0
(which would be correct value for nine), is above what it should be, and then
with the floor, the result is correct and not off by one.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2467 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
` (6 preceding siblings ...)
2015-03-21 14:26 ` bugzilla-daemon
@ 2015-03-21 15:00 ` bugzilla-daemon
2015-03-24 13:32 ` bugzilla-daemon
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-03-21 15:00 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 423 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
Axel Davy <axel.davy@ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #114504|text/plain |application/octet-stream
mime type| |
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1096 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
` (7 preceding siblings ...)
2015-03-21 15:00 ` bugzilla-daemon
@ 2015-03-24 13:32 ` bugzilla-daemon
2015-03-24 13:38 ` [Bug 89012] Incorrect interpolation " bugzilla-daemon
2015-03-31 21:59 ` bugzilla-daemon
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-03-24 13:32 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 466 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
--- Comment #6 from Tiziano Bacocco <tizbac2@gmail.com> ---
Created attachment 114582
--> https://bugs.freedesktop.org/attachment.cgi?id=114582&action=edit
OpenGL version of the testcase
The red line at right and bottom is because coords are meant for dx9 raster
rules and not opengl ones
To compile GL , GLU, GLEW and GLUT are needed
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1443 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect interpolation on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
` (8 preceding siblings ...)
2015-03-24 13:32 ` bugzilla-daemon
@ 2015-03-24 13:38 ` bugzilla-daemon
2015-03-31 21:59 ` bugzilla-daemon
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-03-24 13:38 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 536 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
Axel Davy <axel.davy@ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Incorrect behaviour of |Incorrect interpolation on
|half_pixel_center = 0 |R600 and SI
|rasterizer setting on R600 |
|and SI |
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1117 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug 89012] Incorrect interpolation on R600 and SI
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
` (9 preceding siblings ...)
2015-03-24 13:38 ` [Bug 89012] Incorrect interpolation " bugzilla-daemon
@ 2015-03-31 21:59 ` bugzilla-daemon
10 siblings, 0 replies; 12+ messages in thread
From: bugzilla-daemon @ 2015-03-31 21:59 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 659 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=89012
Marek Olšák <maraeo@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
--- Comment #7 from Marek Olšák <maraeo@gmail.com> ---
This is how the hardware works. Even though it may lead to incorrect rendering
sometimes, there is no workaround. This issue has been reported to hardware
designers.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2132 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-03-31 21:59 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-06 16:06 [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI bugzilla-daemon
2015-02-06 16:07 ` bugzilla-daemon
2015-02-06 16:31 ` bugzilla-daemon
2015-02-06 16:50 ` bugzilla-daemon
2015-02-06 16:51 ` bugzilla-daemon
2015-02-24 18:30 ` bugzilla-daemon
2015-03-08 7:34 ` bugzilla-daemon
2015-03-21 14:26 ` bugzilla-daemon
2015-03-21 15:00 ` bugzilla-daemon
2015-03-24 13:32 ` bugzilla-daemon
2015-03-24 13:38 ` [Bug 89012] Incorrect interpolation " bugzilla-daemon
2015-03-31 21:59 ` bugzilla-daemon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.