From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Fri, 06 Feb 2015 16:06:16 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0262696879==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 329FA6E96E for ; Fri, 6 Feb 2015 08:06:16 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0262696879== Content-Type: multipart/alternative; boundary="1423238776.4551Bda0.9267"; charset="UTF-8" --1423238776.4551Bda0.9267 Date: Fri, 6 Feb 2015 16:06:16 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" 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. --1423238776.4551Bda0.9267 Date: Fri, 6 Feb 2015 16:06:16 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"
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 [details]
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.
--1423238776.4551Bda0.9267-- --===============0262696879== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0262696879==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Fri, 06 Feb 2015 16:07:31 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0992516120==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id D83756E972 for ; Fri, 6 Feb 2015 08:07:30 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0992516120== Content-Type: multipart/alternative; boundary="1423238850.f8BE0.9747"; charset="UTF-8" --1423238850.f8BE0.9747 Date: Fri, 6 Feb 2015 16:07:30 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 --- Comment #1 from Axel Davy --- 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. --1423238850.f8BE0.9747 Date: Fri, 6 Feb 2015 16:07:30 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 1 on bug 89012 from
Created attachment 113229 [details]
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.
--1423238850.f8BE0.9747-- --===============0992516120== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0992516120==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Fri, 06 Feb 2015 16:31:17 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0452843457==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CEC06E980 for ; Fri, 6 Feb 2015 08:31:17 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0452843457== Content-Type: multipart/alternative; boundary="1423240277.a4DB1.17261"; charset="UTF-8" --1423240277.a4DB1.17261 Date: Fri, 6 Feb 2015 16:31:17 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 Tiziano Bacocco changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tizbac2@gmail.com --- Comment #2 from Tiziano Bacocco --- 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. --1423240277.a4DB1.17261 Date: Fri, 6 Feb 2015 16:31:17 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" changed bug 89012
What Removed Added
CC   tizbac2@gmail.com

Comment # 2 on bug 89012 from
Created attachment 113231 [details]
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.
--1423240277.a4DB1.17261-- --===============0452843457== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0452843457==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Fri, 06 Feb 2015 16:50:41 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1522154300==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 6811D6E96B for ; Fri, 6 Feb 2015 08:50:41 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1522154300== Content-Type: multipart/alternative; boundary="1423241441.cacF43E2.23662"; charset="UTF-8" --1423241441.cacF43E2.23662 Date: Fri, 6 Feb 2015 16:50:41 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 Alex Deucher 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. --1423241441.cacF43E2.23662 Date: Fri, 6 Feb 2015 16:50:41 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" changed bug 89012
What Removed Added
Attachment #113228 mime type text/plain image/png


You are receiving this mail because:
  • You are the assignee for the bug.
--1423241441.cacF43E2.23662-- --===============1522154300== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1522154300==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Fri, 06 Feb 2015 16:51:03 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1209763180==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 3BB226E970 for ; Fri, 6 Feb 2015 08:51:03 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1209763180== Content-Type: multipart/alternative; boundary="1423241463.cAA3DBD5.23662"; charset="UTF-8" --1423241463.cAA3DBD5.23662 Date: Fri, 6 Feb 2015 16:51:03 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 Alex Deucher 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. --1423241463.cAA3DBD5.23662 Date: Fri, 6 Feb 2015 16:51:03 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" changed bug 89012
What Removed Added
Attachment #113229 mime type text/plain image/png


You are receiving this mail because:
  • You are the assignee for the bug.
--1423241463.cAA3DBD5.23662-- --===============1209763180== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1209763180==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Tue, 24 Feb 2015 18:30:31 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1187775254==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 92DFC6E579 for ; Tue, 24 Feb 2015 10:30:31 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1187775254== Content-Type: multipart/alternative; boundary="1424802631.CaFD2.30064"; charset="UTF-8" --1424802631.CaFD2.30064 Date: Tue, 24 Feb 2015 18:30:31 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D89012 --- Comment #3 from Marek Ol=C5=A1=C3=A1k --- It also seems to be incorrect with half_pixel_center =3D 1. --=20 You are receiving this mail because: You are the assignee for the bug. --1424802631.CaFD2.30064 Date: Tue, 24 Feb 2015 18:30:31 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Comment= # 3 on bug 89012<= /a> from Marek Ol=C5=A1=C3=A1k
It also seems to be incorrect with half_pixel_center =3D 1.
        


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1424802631.CaFD2.30064-- --===============1187775254== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1187775254==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Sun, 08 Mar 2015 07:34:28 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0660835054==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id B8ED06E0FA for ; Sat, 7 Mar 2015 23:34:28 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0660835054== Content-Type: multipart/alternative; boundary="1425800068.51F81.8668"; charset="UTF-8" --1425800068.51F81.8668 Date: Sun, 8 Mar 2015 07:34:28 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 --- Comment #4 from Axel Davy --- 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. --1425800068.51F81.8668 Date: Sun, 8 Mar 2015 07:34:28 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 4 on bug 89012 from
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.
--1425800068.51F81.8668-- --===============0660835054== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0660835054==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Sat, 21 Mar 2015 14:26:55 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0750892495==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 74AE66E15F for ; Sat, 21 Mar 2015 07:26:55 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0750892495== Content-Type: multipart/alternative; boundary="1426948015.35171.17847"; charset="UTF-8" --1426948015.35171.17847 Date: Sat, 21 Mar 2015 14:26:55 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 --- Comment #5 from Axel Davy --- 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. --1426948015.35171.17847 Date: Sat, 21 Mar 2015 14:26:55 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 5 on bug 89012 from
Created attachment 114504 [details]
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.
--1426948015.35171.17847-- --===============0750892495== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0750892495==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Sat, 21 Mar 2015 15:00:28 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1460181744==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id D44246E520 for ; Sat, 21 Mar 2015 08:00:28 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1460181744== Content-Type: multipart/alternative; boundary="1426950028.6aC0D1.25457"; charset="UTF-8" --1426950028.6aC0D1.25457 Date: Sat, 21 Mar 2015 15:00:28 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 Axel Davy 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. --1426950028.6aC0D1.25457 Date: Sat, 21 Mar 2015 15:00:28 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" changed bug 89012
What Removed Added
Attachment #114504 mime type text/plain application/octet-stream


You are receiving this mail because:
  • You are the assignee for the bug.
--1426950028.6aC0D1.25457-- --===============1460181744== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1460181744==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Date: Tue, 24 Mar 2015 13:32:58 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2091500683==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B31A6E6DE for ; Tue, 24 Mar 2015 06:32:59 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============2091500683== Content-Type: multipart/alternative; boundary="1427203979.AF07De1.28280"; charset="UTF-8" --1427203979.AF07De1.28280 Date: Tue, 24 Mar 2015 13:32:59 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 --- Comment #6 from Tiziano Bacocco --- 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. --1427203979.AF07De1.28280 Date: Tue, 24 Mar 2015 13:32:59 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 6 on bug 89012 from
Created attachment 114582 [details]
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.
--1427203979.AF07De1.28280-- --===============2091500683== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============2091500683==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect interpolation on R600 and SI Date: Tue, 24 Mar 2015 13:38:58 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1016449348==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 30CB489E08 for ; Tue, 24 Mar 2015 06:38:58 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1016449348== Content-Type: multipart/alternative; boundary="1427204338.dc0C1.30124"; charset="UTF-8" --1427204338.dc0C1.30124 Date: Tue, 24 Mar 2015 13:38:58 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89012 Axel Davy 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. --1427204338.dc0C1.30124 Date: Tue, 24 Mar 2015 13:38:58 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" changed bug 89012
What Removed Added
Summary Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI Incorrect interpolation on R600 and SI


You are receiving this mail because:
  • You are the assignee for the bug.
--1427204338.dc0C1.30124-- --===============1016449348== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1016449348==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89012] Incorrect interpolation on R600 and SI Date: Tue, 31 Mar 2015 21:59:56 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1427887104==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 491066E786 for ; Tue, 31 Mar 2015 14:59:56 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1427887104== Content-Type: multipart/alternative; boundary="1427839196.3BaaF262.21068"; charset="UTF-8" --1427839196.3BaaF262.21068 Date: Tue, 31 Mar 2015 21:59:56 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D89012 Marek Ol=C5=A1=C3=A1k changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #7 from Marek Ol=C5=A1=C3=A1k --- This is how the hardware works. Even though it may lead to incorrect render= ing sometimes, there is no workaround. This issue has been reported to hardware designers. --=20 You are receiving this mail because: You are the assignee for the bug. --1427839196.3BaaF262.21068 Date: Tue, 31 Mar 2015 21:59:56 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable = Marek Ol=C5=A1=C3=A1k changed bug 89012<= /a>
What Removed Added
Status NEW RESOLVED
Resolution --- WONTFIX

Comment= # 7 on bug 89012<= /a> from Marek Ol=C5=A1=C3=A1k
This is how the hardware works. Even though it may lead to inc=
orrect rendering
sometimes, there is no workaround. This issue has been reported to hardware
designers.


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1427839196.3BaaF262.21068-- --===============1427887104== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1427887104==--