All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.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	[thread overview]
Message-ID: <bug-89012-502@http.bugs.freedesktop.org/> (raw)


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

             reply	other threads:[~2015-02-06 16:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 16:06 bugzilla-daemon [this message]
2015-02-06 16:07 ` [Bug 89012] Incorrect behaviour of half_pixel_center = 0 rasterizer setting on R600 and SI 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-89012-502@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.