Bug 23857 - [i965 bisected] incorrect rendering in openarena
Summary: [i965 bisected] incorrect rendering in openarena
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: high major
Assignee: Zou Nan hai
QA Contact:
URL:
Whiteboard:
Keywords:
: 23868 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-11 01:35 UTC by zhao jian
Modified: 2009-09-24 23:52 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg.0.log (28.76 KB, text/plain)
2009-09-11 01:35 UTC, zhao jian
Details
incorrect rendering in openarena (736.27 KB, image/x-png)
2009-09-11 01:40 UTC, zhao jian
Details

Description zhao jian 2009-09-11 01:35:02 UTC
Created attachment 29404 [details]
xorg.0.log

System Environment:
--------------------------
Arch:           x86-64
Platform:       G45
Libdrm:         (master)67e4172394a88d4922fb8d9c7c3d96ce7e02c5a6
Mesa:           (mesa_7_6_branch)796c96de808790826d9c9077d159390ebee62888
Xserver:        (server-1.6-branch)3044711412d0a08ba65a491bd2441c0c8980f5e2
Xf86_video_intel:    (master)efbcf29dd1a1ca058b7a2a93f0685102c06c9369
Kernel: (master)74fca6a42863ffacaf7ba6f1936a9f228950f657

Bug detailed description:
-------------------------
Start X and the openarena,  when it runs there may be many incorrect rendering at any time. It especially easy to reproduce when it runs to the corner or near the wall. As the attached picture shows. And it was caused by the commit in mesa 50d8b295f6c950da3b8783ff6e1803bdfbb5c7cc.

commit 50d8b295f6c950da3b8783ff6e1803bdfbb5c7cc
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Sep 1 12:05:41 2009 -0600

    intel: use _mesa_meta_clear(), it's a bit faster

Reproduce steps:
----------------
1. xinit &
2. run openarena
Comment 1 zhao jian 2009-09-11 01:40:10 UTC
Created attachment 29405 [details]
incorrect rendering in openarena
Comment 2 Gordon Jin 2009-09-13 18:32:18 UTC
*** Bug 23868 has been marked as a duplicate of this bug. ***
Comment 3 Zou Nan hai 2009-09-15 00:58:28 UTC
I have build latest mesa on my G45 box. It seems everything is ok.
Can you retest it?
Comment 4 Sven Arvidsson 2009-09-15 05:43:17 UTC
The bug is still there, but some maps work better than others. 

To reproduce the bug, try OA_RPG3DM2 and walk close to walls and corners.
Comment 5 zhao jian 2009-09-15 20:32:42 UTC
(In reply to comment #4)
> The bug is still there, but some maps work better than others. 
> To reproduce the bug, try OA_RPG3DM2 and walk close to walls and corners.

Yes. It is still very easy to reproduce on G45 with the newest code on master branch. 
Comment 6 Zou Nan hai 2009-09-15 22:28:45 UTC
fixed in 7_6 branch
Comment 7 Gordon Jin 2009-09-15 22:36:15 UTC
Branch: mesa_7_6_branch
Commit: 76e836a41ad47237f80195c5dacb8bc57a7f2b69
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=76e836a41ad47237f80195c5dacb8bc57a7f2b69

Author: Zou Nan hai <nanhai.zou@intel.com>
Date:   Wed Sep 16 13:25:46 2009 +0800

i965: do a flush in clear, fix openarena render issue,
      fd.o bug# 23857

---

 src/mesa/drivers/dri/intel/intel_clear.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index bce2372..9efe6a2 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -170,6 +170,7 @@ intelClear(GLcontext *ctx, GLbitfield mask)
 	 }
 	 DBG("\n");
       }
+      intelFlush(&intel->ctx);
       _mesa_meta_clear(&intel->ctx, tri_mask);
    }
 
Comment 8 zhao jian 2009-09-17 02:28:54 UTC
(In reply to comment #6)
> fixed in 7_6 branch

Nanhai, with your commit, its incorrect renderring has been fixed successfully, but the performance of ut2004-demo has a downgrade of 5% ~ 10%. 
Comment 9 Eric Anholt 2009-09-21 10:36:35 UTC
Applying a hack like this is not a fix for the bug. (worse, the commit message didn't clearly state that it was only a hack around a real bug)
Comment 10 Eric Anholt 2009-09-24 16:25:11 UTC
commit cc8084932cc552587e3036dbbf62c77db3b4a08e
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Sep 24 16:15:52 2009 -0700

    intel: Flush the batch when we're about to subdata into a VBO.
    
    This fixes the clears in openarena with the new metaops clear code, and
    the new piglit vbo-subdata-sync test.
    
    Bug #23857.
Comment 11 zhao jian 2009-09-24 23:52:47 UTC
There is now no rendering issues and only 1%~2% slower but I think it is acceptable. 
Libdrm:         (master)ac71f0849928f4b2fbb69c01304ac6f9df8916a1
Mesa:           (mesa_7_6_branch)cc8084932cc552587e3036dbbf62c77db3b4a08e
Xserver:        (server-1.6-branch)507e57381fea6334f7dc8da6925e53d2c76fddcb
Xf86_video_intel:    (master)a92bbcc94904684e7709b3ddaad82bc04607af26


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.