Bug 24585 - radeon texture size checks with bit 11
Summary: radeon texture size checks with bit 11
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
Depends on:
Reported: 2009-10-17 00:25 UTC by Mathias Fröhlich
Modified: 2009-11-05 11:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Bit 11 texture check (1.53 KB, patch)
2009-10-17 08:06 UTC, Mathias Fröhlich
no flags Details | Splinter Review

Description Mathias Fröhlich 2009-10-17 00:25:02 UTC

I have a problem with my r520 accepting mipmapped textures huger than 2048 with the current in kernel texture size check code.

The problem boils down to the order when the bit11 of the texture size is or'ed to the original width. In the end each mipmap level has the same width or height because of that 11 bit is ored to the scaled down lod with and thus blows up the size again to the full size or more due to the power of two rounding afterwards.

The attached patch changes this order so that the texture sizes are computed correct. Also the on error the yet missing inputs to the size computation are printed which helped me to find out where it really breaks.

Please apply or fix in a more appropriate way.

Comment 1 Nicolai Hähnle 2009-10-17 04:47:18 UTC
Thanks again, but it seems the patch is missing here as well?
Comment 2 Mathias Fröhlich 2009-10-17 08:06:59 UTC
Created attachment 30500 [details] [review]
Bit 11 texture check

Huch, so, now that I can debug mesa, I might need to learn how to use firefox :)

Hopefully attached now ...

Comment 3 Alex Deucher 2009-11-05 11:58:57 UTC
pushed to drm-next:

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.