Bug 18844 - [gem] Incorrect texture in games doom3/quake4
Summary: [gem] Incorrect texture in games doom3/quake4
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
: 18516 (view as bug list)
Depends on:
Blocks: 18841 intel-3d-release
  Show dependency treegraph
 
Reported: 2008-12-01 23:57 UTC by lin, jiewen
Modified: 2009-08-10 02:10 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
log (49.19 KB, text/plain)
2008-12-01 23:57 UTC, lin, jiewen
Details
conf (3.76 KB, text/plain)
2008-12-01 23:58 UTC, lin, jiewen
Details
screenshot (116.08 KB, image/png)
2008-12-02 00:01 UTC, lin, jiewen
Details
screenshot (515.25 KB, image/png)
2008-12-02 00:03 UTC, lin, jiewen
Details
screenshot (222.57 KB, image/png)
2008-12-02 00:04 UTC, lin, jiewen
Details
screenshot (160.78 KB, image/png)
2008-12-02 00:05 UTC, lin, jiewen
Details

Description lin, jiewen 2008-12-01 23:57:10 UTC
Created attachment 20725 [details]
log

System Environment:
--------------------------

--Platform: g45
--Architecture(32-bit,64-bit,compatiblity): 32-bit
--3D driver: (master)f1c9016af16aefc08a3e4e859a897009652dac23
--DRM:shipped with kernel for-airlied branch
--Kernel: for-airlied branch commit 728ced8c47f99a2287cdd0d3e77f5ae1a3d410e6

Bug detailed description:
--------------------------
Start X and play doom3/quake4, the display is dark and incorrect, details could be seen in the the attaches.
Reproduce steps:
----------------
1. startx&
2. ./doom3
Comment 1 lin, jiewen 2008-12-01 23:58:10 UTC
Created attachment 20726 [details]
conf
Comment 2 lin, jiewen 2008-12-02 00:01:01 UTC
Created attachment 20727 [details]
screenshot
Comment 3 lin, jiewen 2008-12-02 00:03:21 UTC
Created attachment 20728 [details]
screenshot
Comment 4 lin, jiewen 2008-12-02 00:04:26 UTC
Created attachment 20729 [details]
screenshot
Comment 5 lin, jiewen 2008-12-02 00:05:13 UTC
Created attachment 20730 [details]
screenshot
Comment 6 lin, jiewen 2008-12-02 00:06:56 UTC
With drm-next branch, it also exists.
Comment 7 Gordon Jin 2008-12-02 18:22:21 UTC
This may be the same as bug#18822, which has bisected to a commit. Could you also check if it's caused by that commit?

How about on 965?

Comment 8 lin, jiewen 2008-12-02 19:19:27 UTC
    Maybe, I need soome screenshot to make sure but there are none in that bug. "git checkout 8e5639577c03ccd75bb421e494638fbb5a3e7dcd~1 <--- Works", on our g45, it is the first commit with which we can test games without low performance or freezing.
Comment 9 lin, jiewen 2008-12-02 22:35:03 UTC
(In reply to comment #8)
>     Maybe, I need some screenshots to make sure but there is none in that bug.
> "git checkout 8e5639577c03ccd75bb421e494638fbb5a3e7dcd~1 <--- Works", on our
> g45, it is the first commit with which we can test games without low
> performance or freezing.
> 
q965, gm45 have this issue too, 945 is fine.
Comment 10 Eric Anholt 2008-12-03 11:53:18 UTC
I'm confused, are you saying that this bug is gone with 8e5639577c03ccd75bb421e494638fbb5a3e7dcd~1?  If so, it should be fixed in master, but this bug report started at something that was before 8e5639577c03ccd75bb421e494638fbb5a3e7dcd.
Comment 11 lin, jiewen 2008-12-03 17:31:21 UTC
(In reply to comment #10)
> I'm confused, are you saying that this bug is gone with
> 8e5639577c03ccd75bb421e494638fbb5a3e7dcd~1?  If so, it should be fixed in
> master, but this bug report started at something that was before
> 8e5639577c03ccd75bb421e494638fbb5a3e7dcd.
> 

In other words, no low performance and freezing issue in doom3/quake4, but they have incorrect texture issue. f1c9016af16aefc08a3e4e859a897009652dac23
is a mistake, it should be 154a9e5317f890618932cea0129ef887e16baf84.
Sorry for the confusion. 
Comment 12 Sven Arvidsson 2008-12-06 17:52:58 UTC
This is most likely the same as bug 18516 I reported earlier. Feel free to mark it as a duplicate of this.
Comment 13 Gordon Jin 2008-12-09 22:19:24 UTC
*** Bug 18516 has been marked as a duplicate of this bug. ***
Comment 14 Sven Arvidsson 2008-12-20 08:25:13 UTC
Shadows are correct in Mesa 7.2, I will try bisecting it to find the problem.
Comment 15 Sven Arvidsson 2008-12-23 11:54:32 UTC
Bisecting lead to this:

2511d57fa487e4b46a4919913103c2491da7a856 is first bad commit
commit 2511d57fa487e4b46a4919913103c2491da7a856
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Mon Sep 22 17:23:40 2008 -0700

    i965: Adapt to new TNL program tracking semantics
    
    This fixes bugzilla #17718.

:040000 040000 1841c56af7560cbf06e8d0d5946e263e10cf3952 c24eab238976ea5daac465a8d5ba521c68530a0e M	src

Comment 16 Eric Anholt 2009-01-07 14:57:46 UTC
reproduced in quake4-demo.  Thanks for the bisect.

note to self: emit_state_always doesn't help.  probably a functional change in the porting of the code to mesa core?
Comment 17 Eric Anholt 2009-05-14 11:56:48 UTC
I was looking into quake4 last night -- everything looks fine with depth clears stubbed out to software (tri_mask &= ~BUFFER_BIT_DEPTH).

glFlush before/after depth clear doesn't help.
depth clear separate from stencil clear doesn't help.
always_flush_batch=true doesn't help.
glReadPixels(GL_DEPTH_COMPONENT) of ((xmin+xmax)/2, (ymin+ymax)/2) before and after the depth clear shows no changes.
Between depth clears, the depth value sampled moves slowly from 1.0 down to 0.95ish over the course of the half a minute of moving around I do in the level while testing.
glGetError() returns 0 before/after.
ctx->Stencil stays the same before/after except for _Enabled (since _mesa_update_state isn't called again by the time I was comparing results)
ctx->Depth stays the same before/after.

incoming depth state to intel_clear_tris:
DepthRange is at (0,1), so that being missing isn't the problem.
depth test true
depth mask true
func GL_ALWAYS
clear value 1.0.
Comment 18 Eric Anholt 2009-07-20 18:32:48 UTC
commit 81d555068408d4343d7627c8bedda5675f09bd21
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Jul 20 17:58:12 2009 -0700

    i965: Don't clip everything if FRONT_AND_BACK culling while culling disabled
    
    Fixes everything-black with meta_clear_tris on quake4-mpdemo and doom3-demo.
    
    Bug #18844, 22077.
Comment 19 Gordon Jin 2009-07-22 20:07:47 UTC
Eric, we are verifying it's fixed on master. Do you have plan to put it into mesa_7_5_branch?
Comment 20 Gordon Jin 2009-08-10 02:10:38 UTC
verified on master


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.