Bug 21693 - i945 support for compressed cubemaps is completely broken
Summary: i945 support for compressed cubemaps is completely broken
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-11 14:56 UTC by Steinar H. Gunderson
Modified: 2019-09-18 19:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Test case source code (9.94 KB, text/x-csrc)
2009-05-11 14:56 UTC, Steinar H. Gunderson
Details
Reference test case rendering (2.83 KB, image/png)
2009-05-11 14:57 UTC, Steinar H. Gunderson
Details
i945 rendering of test case (Mesa 7.4.1) (2.91 KB, image/png)
2009-05-11 14:57 UTC, Steinar H. Gunderson
Details
i945 rendering of test case (Mesa 7.4.1 + hack described in bug description) (3.03 KB, image/png)
2009-05-11 14:58 UTC, Steinar H. Gunderson
Details

Description Steinar H. Gunderson 2009-05-11 14:56:57 UTC
Created attachment 25761 [details]
Test case source code

i945 hardware supports compressed cube maps. However, it seems like the texture memory layout completely forgets to handle the fact that they take up less memory.

I've made a small test program (attached; basically the same as in bugs 21691 and 21692, only with DXT1 instead of uncompressed textures) that creates a 64x64 cubemap and renders all faces at all mip levels. reference-cubemap.png is what it looks like on ATI and nVidia (well, actually, that's a white lie; in reality the colors are slightly wrong since DXT1 is 565 instead of 888, but you get the general idea). i945-compressed-cubemap.png is what it looks like on my i945 with unmodified Mesa 7.4.1. i945-compressed-cubemap-with-hack.png is what it looks like if I change the call to intel_miptree_set_image_offset() in i945_miptree_layout_cube() from

           intel_miptree_set_image_offset(mt, level, face, x, y);

to

           intel_miptree_set_image_offset(mt, level, face, x, y/4);

Of course, it's a hack, and it still doesn't work properly for the lower mip levels (probably related to bugs 21690 and/or 21691), but at least it shows that the layout has to be adjusted for lower memory use.
Comment 1 Steinar H. Gunderson 2009-05-11 14:57:23 UTC
Created attachment 25762 [details]
Reference test case rendering
Comment 2 Steinar H. Gunderson 2009-05-11 14:57:50 UTC
Created attachment 25763 [details]
i945 rendering of test case (Mesa 7.4.1)
Comment 3 Steinar H. Gunderson 2009-05-11 14:58:31 UTC
Created attachment 25764 [details]
i945 rendering of test case (Mesa 7.4.1 + hack described in bug description)
Comment 4 Elizabeth 2017-10-26 22:54:20 UTC
Good afternoon Eric, Steinar, this is quite old (Mesa 7.4.1), is this case still valid with latest software? Thanks.
Comment 5 Steinar H. Gunderson 2017-10-26 23:00:21 UTC
I don't really have this hardware anymore. If you still care about it, you'd have to run the reference code and see.
Comment 6 GitLab Migration User 2019-09-18 19:32:31 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/674.


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.