Bug 13181 - i915: mipmap rendering broken
Summary: i915: mipmap rendering broken
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Zou Nan hai
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-11 06:45 UTC by Tobias Jakobi
Modified: 2009-08-24 12:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
screenshot with mipmaps enabled (859.52 KB, image/png)
2007-11-11 06:46 UTC, Tobias Jakobi
Details
screenshot without mipmaps and only bilinear filtering (183.97 KB, image/jpeg)
2007-11-11 06:54 UTC, Tobias Jakobi
Details
quake3 screenshot with mipmap on and standing on the lower level of the map (159.05 KB, image/jpeg)
2007-11-12 13:09 UTC, Tobias Jakobi
Details
quake3 screenshot with mipmap on and standing on a position at the top of the map (168.96 KB, image/jpeg)
2007-11-12 13:10 UTC, Tobias Jakobi
Details
quake3 without mipmaps, only bilinear filtering here (167.52 KB, image/jpeg)
2007-11-12 13:11 UTC, Tobias Jakobi
Details

Description Tobias Jakobi 2007-11-11 06:45:44 UTC
Hi there,

I'm using a recent Mesa GIT version, tag 578641941f45c56deb382317a7ff7cad496679cf, and noticed that the mipmap support is appearently broken.

I noticed this while playing CS 1.5 through wine. I have gl_texturemode set to GL_LINEAR_MIPMAP_NEAREST which enables bilinear filterung of the base texture and mipmaps without filterung (so no trilinear here). Now all textures that were a few steps away from the player were corrupted, lots of black bars and stuff. I'm going to upload a screenshot of the problem.

I set the gl_texturemode variable to GL_LINEAR, so no mipmaps this time. And the problem went away. Of course performance is degraded now and visuals looks really ugly.
Comment 1 Tobias Jakobi 2007-11-11 06:46:58 UTC
Created attachment 12454 [details]
screenshot with mipmaps enabled
Comment 2 Tobias Jakobi 2007-11-11 06:54:54 UTC
Created attachment 12455 [details]
screenshot without mipmaps and only bilinear filtering

This problem does not depend on the use of wine or the use of CS als test-application. I can also reproduce this with quake3 (OK, the engine history is the same)
Comment 3 Roland Scheidegger 2007-11-12 10:45:31 UTC
is this a i915 or i945 (mipmap layout is somewhat different)?
Also, are you using compressed textures? And if so, does it happen without?
There are similar bugs (10986,11699), I thought I fixed them, but maybe not (only tested on i915), and it's also possible they resurfaced with the i915 unification.
Comment 4 Tobias Jakobi 2007-11-12 11:12:49 UTC
This is a i915 card I'm running CS on.

What do you mean by using compressed textures? If the game is using c-textures or the driver? I can't imagine that old CS 1.5 is already using compressed image data, so I would say no. I can however test this with quake3, because IIRC it has the option to compress textures prior to uploading to the graphics memory.
Comment 5 Roland Scheidegger 2007-11-12 12:08:00 UTC
(In reply to comment #4)
> This is a i915 card I'm running CS on.
> 
> What do you mean by using compressed textures? If the game is using c-textures
> or the driver? I can't imagine that old CS 1.5 is already using compressed
> image data, so I would say no. I can however test this with quake3, because
> IIRC it has the option to compress textures prior to uploading to the graphics
> memory.
The game will not be using compressed textures if you haven't installed an additional s3tc library. Don't know about CS but you're right quake3 will only use it if you enable it (not by default, and the setting won't have any effect without that library). So it looks like it's not a problem specific to compressed textures.

Comment 6 Tobias Jakobi 2007-11-12 13:08:37 UTC
OK, I did have compressed textures on in quake3 by default. But it didn't change nothing when disabling the setting. I tried both with vid_restart and restarting the whole engine. The effects remain.

BUT the effect is a little different in quake3. There it looks more like a clipping plane bug. See for yourself. I'm going to attach three screenshots.

Two with mipmapping enabled (r_textureMode GL_LINEAR_MIPMAP_NEAREST) and one without mipmapping. The funny thing is that when having only bilinear filterung the visual in quake3 still has some errors (see the screenshot).

The first screen (with mip on) is from the player standing on the "base level" of the map. There you clearly see the effects on the textures in front of you. The effect moves while you move through the map.

The second screen shows the situation when the player is at the top of the map. I did choose an area where you can still see the floor. Notice that the textures on the "upper level" are free of the effect. But the base floor is still affected. Quite weird.
Comment 7 Tobias Jakobi 2007-11-12 13:09:31 UTC
Created attachment 12484 [details]
quake3 screenshot with mipmap on and standing on the lower level of the map
Comment 8 Tobias Jakobi 2007-11-12 13:10:39 UTC
Created attachment 12485 [details]
quake3 screenshot with mipmap on and standing on a position at the top of the map

Notice that the lower floor still has this black bars
Comment 9 Tobias Jakobi 2007-11-12 13:11:31 UTC
Created attachment 12486 [details]
quake3 without mipmaps, only bilinear filtering here

Notice that the decal-like texture on the floor is not applied correctly here
Comment 10 Tobias Jakobi 2007-11-26 13:16:05 UTC
I downgraded from GIT to 7.0.2 and the problem doesn't occur anymore. Going to stay with 7.0.2 until the next stable release.
Comment 11 Zou Nan hai 2008-02-28 00:16:43 UTC
So I will mark it as fixed, if you find the issue occurs again, please reopen the bug.
Comment 12 Adam Jackson 2009-08-24 12:28:19 UTC
Mass version move, cvs -> git


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.