[Mesa-dev] [PATCH 0/3] i965: Add runtime checks for line antialiasing in Gen < 6
Iago Toral Quiroga
itoral at igalia.com
Tue May 27 03:50:13 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=78679
The c->runtime_check_aads_emit field has been unused since the removal of the
old ARB_fragment_shader backend in commit
098acf6c84333edbb7b1228545e4bdb2572ee0cd.
This field was relevant in Gen < 6 to do proper rendering of polygons in a
scenario where line antialising is enabled and one of the polygon faces
is rendered in GL_LINE mode while the other remains GL_FILL.
Currently, this scenario is broken in gm45 and ironlake (although ironlake
was broken before than commit too). Particularly, the GL_FILL face of the
polygon renders incorrectly with noise and wrong colors. Line color
interpolation also seems to be incorrect in some cases although I don't know
if this is related to the removed code or is a completely different issue.
There is a test case attached to the bug report that showcases the problem
in Gen4 and Gen5.
This patch series fixes the following issues in this scenario:
* In Gen5: Fixes incorrect rendering of the polygon's GL_FILL face.
* In Gen4: Removes noise and incorrect coloring of the polygon's GL_FILL face.
The following issues remain (would need further investigation):
* In Gen5 and Gen4: color interpolation in GL_LINE faces is not correct (color
is not interpolated in most cases). This seems to be unrelated to antialiasing
settings although behavior is improved when AA is enabled with this patches
(some lines do interpolate in some cases).
* In Gen4: the GL_FILL face's color is flat (does not interpolate). This is
unrelated to antialiasing settings, and happens every time there is a face
being rendered in GL_LINE and another in GL_FILL.
Patch 1: fixes possible crashes when processing code streams that end in a
block structure. This popped up while testing since the second patch creates
this situation.
Patch 2: Checks runtime conditions for proper AA setup in Gen < 6 when doing
framebuffer writes.
Patch 3: Saves unnecessary MOV in some cases involving AA in Gen < 6.
Iago Toral Quiroga (3):
i965: Always set a valid block end pointer
i965: Add runtime checks for line antialiasing in Gen < 6.
i965: Do not prepare antialiasing data if it is not required
src/mesa/drivers/dri/i965/brw_cfg.cpp | 5 ++
src/mesa/drivers/dri/i965/brw_fs.h | 5 ++
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 107 ++++++++++++++++++---------
3 files changed, 81 insertions(+), 36 deletions(-)
--
1.9.1
More information about the mesa-dev
mailing list