Bug 23122 - mipmap_comp_tests will cause radeon_validate_texture error
Summary: mipmap_comp_tests will cause radeon_validate_texture error
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R100 (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
Depends on:
Reported: 2009-08-03 15:38 UTC by Roland Scheidegger
Modified: 2019-09-18 18:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Roland Scheidegger 2009-08-03 15:38:06 UTC
this should happen on all radeons since radeon-rewrite. The issue here is that if texture images are specified from level 0 to some level, but if because of gl state (baselevel, maxlod etc.) the actually needed textures for rendering go from level x (!=0) to some level, miptree comparison will fail. The driver then will try to create another tree, but since it does try this only with level 0 as base it will always fail (with the error message "radeon_validate_texture failed to alloc miptree") if the calculated required firstlevel is not 0.
Note that actually there's another bug here since the fallback then always segfaults, but I didn't look at this.
I'm not actually sure what the intention of the code how to handle this is, but note that on r300 and up this should probably be fixed by not messing with the miptree at all when the required base level changes, since these chips can easily clamp both min and max levels. However, miptree changes are required for r100/r200 (which can only clamp the smallest mipmap used).
Comment 1 Maciej Cencora 2009-11-18 14:21:21 UTC
Can you check if current mesa_7_7_branch fixes the problem?
Comment 2 Maciej Cencora 2009-11-23 13:11:05 UTC
Please check if commit 960464e42dce138fde11c379ce7744bc4be14aa2 on mesa_7_7_branch fixes the problem.
Comment 3 Andrew Randrianasulu 2010-05-19 03:29:43 UTC
I can't see any error with mipmap_comp_tests on rv280 and mesa up to 

commit 4cd259ca59128ff2712c42ff2d2340b01a3b74a8
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Tue May 18 14:45:10 2010 -0400
    dri2_glx: Put the invalidate b/c code back in


BUT I see somewhat strange image in this test .. let me open new bug .....
Comment 4 GitLab Migration User 2019-09-18 18:39:45 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/272.

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.