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==--