Bug 38868 - [IVB]screen mess when running 3D games(like ExtremeTuxRacer,lightsmark)
Summary: [IVB]screen mess when running 3D games(like ExtremeTuxRacer,lightsmark)
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Kenneth Graunke
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 42993
  Show dependency treegraph
 
Reported: 2011-07-01 01:02 UTC by meng
Modified: 2012-01-31 23:26 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
the photo of Extreme TuxRacer (152.31 KB, image/jpeg )
2011-07-01 01:03 UTC, meng
Details
the photo of lightsmark (454.90 KB, image/jpeg)
2011-07-01 01:04 UTC, meng
Details

Description meng 2011-07-01 01:02:36 UTC
System Environment:
--------------------------
Platform: IVB
Libdrm:  (master)2.4.26
Mesa:    (7.11)b90c710c6cd8017f59b09d935fbbbe94ada81a12
Xserver: (server-1.10-branch)xorg-server-1.10.2.901-5-g79ef102c3adf7cae8982b05320109d0439e6587c
Xf86_video_intel:(master)2.15.0-152-g18d08e49d270b7a05f14a309759c9315e5ab9679
Cairo:   (master)ea645913ba8739377ee2e2b51480310befc19b76
Libva:   (master)5343740dfec289858cfafda64dd5260179d09d4f
Kernel:  (drm-intel-fixes) f01c22fd59aa10a3738ede20fd4b9b6fd1e2eac3

Bug detailed description:
-------------------------
Screen mess when running 3D games(like ExtremeTuxRacer,lightsmark).Pls see attachment photos.

Reproduce steps:
----------------
1.xinit& 
2.run 3D games(like ExtremeTuxRacer,lightsmark)
Comment 1 meng 2011-07-01 01:03:53 UTC
Created attachment 48641 [details]
the photo of Extreme TuxRacer
Comment 2 meng 2011-07-01 01:04:58 UTC
Created attachment 48642 [details]
the photo of lightsmark
Comment 3 Ian Romanick 2011-07-11 17:00:42 UTC
These look like they're probably stencil related.  This may be a dup of bug #39132.
Comment 4 Kenneth Graunke 2011-07-22 01:14:55 UTC
Doubtful.  I can confirm this bug, even after Chad's stencil fixes.  

Interestingly, using Eric's ff_fragment_shader patches changes the misrendering (but doesn't fix it).
Comment 5 Eugeni Dodonov 2011-09-21 05:05:17 UTC
Could you please confirm if the issue still happens with latest master?
Comment 6 libo 2011-09-22 01:54:08 UTC
The problem is still exists with latest mesa master 4a96a02de7c1b8c136ffc0cd278401c85faab233 in IVB. (In reply to comment #5)
> Could you please confirm if the issue still happens with latest master?
Comment 7 fangxun 2011-11-03 23:49:19 UTC
It still exists on mesa 7.11 branch.
Comment 8 Gordon Jin 2011-12-04 22:13:41 UTC
Ken, what's the plan? Can we fix this in the next release?
Comment 9 Kenneth Graunke 2011-12-07 00:52:52 UTC
I'm fairly certain that the TuxRacer and Lightsmark bugs are separate issues.  Both are really high on my priority list for Ivybridge fixes, I just haven't had any luck figuring out the problem.  I may need to try Carl's new apitrace trim tools and see if I can cut down the problem to something more tractable.
Comment 10 Gordon Jin 2011-12-07 00:57:54 UTC
Ken, good to know this is on your high priority list. If you don't mind, I'm adding this into the release blocker tracker.

If you think they should be separated into different bug reports, just let us know.
Comment 11 Kenneth Graunke 2011-12-19 15:26:42 UTC
Here is a cut-down apitrace that reproduces the etracer issue:
http://people.freedesktop.org/~kwg/traces/et-tiny-trim.trace
Comment 12 Kenneth Graunke 2011-12-20 12:34:46 UTC
It's a dirty bit issue.  Adding more dirty bits to the gen7_ps_state atom fixes etracer, but I have absolutely no idea why any of them should be necessary.
Comment 13 Kenneth Graunke 2012-01-11 03:48:54 UTC
I've sent a patch to the mailing list that fixes ExtremeTuxRacer:
[PATCH] i965: Don't reallocate push constant URB space on new VS programs.

It did turn out to be a dirty bit issue---but I wasn't missing any on gen7_ps_state.  I had too many on gen7_urb. :)

As I suspected from the beginning, the Lightsmark issue is entirely unrelated.  No leads on that yet.
Comment 14 Kenneth Graunke 2012-01-19 14:29:44 UTC
I notice that in your lightsmark screenshot, everything is bright pink.  On my system it's bright yellow.

I know this sounds odd, but...if you run the Piglit "tex-border-1" program, does it display a pink square?  On my system it's the same bright yellow that I see in Lightsmark.
Comment 15 Kenneth Graunke 2012-01-19 14:30:27 UTC
(In reply to comment #14)
> I notice that in your lightsmark screenshot, everything is bright pink.  On my
> system it's bright yellow.
> 
> I know this sounds odd, but...if you run the Piglit "tex-border-1" program,
> does it display a pink square?  On my system it's the same bright yellow that I
> see in Lightsmark.

Also, note that the color produced likely depends on the exact machine being used.
Comment 16 Gordon Jin 2012-01-19 18:50:20 UTC
Xun, can you reply Ken today?
Comment 17 fangxun 2012-01-20 00:36:17 UTC
It display a yellow square.
Comment 18 Kenneth Graunke 2012-01-20 02:07:22 UTC
Is Lightsmark still pink, or is it yellow too?
Comment 19 Kenneth Graunke 2012-01-20 05:26:28 UTC
Nevermind, I believe I've fixed this.  I'll send the patch out shortly.
Comment 20 Kenneth Graunke 2012-01-25 01:55:46 UTC
Lightsmark is now fixed.  On master, the commit is:

commit c25e5300cba7628b58df93ead14ebc3cc32f338c
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Jan 20 03:33:40 2012 -0800

    i965: Fix border color on Sandybridge and Ivybridge.
    
    While reading through the simulator, I found some interesting code that
    looks like it checks the sampler default color pointer against the bound
    set in STATE_BASE_ADDRESS.  On failure, it appears to program it to the
    base address itself.
    
    So I decided to try programming a legitimate bound, and lo and behold,
    border color worked.
    
    +92 piglits on Sandybridge.  Also fixes Lightsmark on Ivybridge.
    
    NOTE: This is a candidate for stable release branches.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28924
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38868
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>

This has also been cherry-picked to 8.0.

Closing the report as both bugs have been fixed.
Comment 21 Gordon Jin 2012-01-28 19:49:16 UTC
so it should be mesa blocker not kernel.
Comment 22 cc 2012-01-31 23:26:27 UTC
This issue has been resolved now. My tested environment :

Mesa:		(8.0)5f60d134e68775d00afca062eec42838e7888358
Xserver:	 (server-1.11-branch)xorg-server-1.11.3
Xf86_video_intel: (master)2.17.0-605-ged1c1a7468d78e99cb4f9a4a8b8a6b00c3257a75


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.