Summary: | swizzle from rgba8888 to rgba8888_rev leads to corrupt texture | ||
---|---|---|---|
Product: | Mesa | Reporter: | Hans de Goede <jwrdegoede> |
Component: | Drivers/DRI/R100 | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | z3ro.geek |
Version: | 6.5 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | The texture format hack for R300 |
Description
Hans de Goede
2007-03-31 12:22:28 UTC
Hmm yes this makes a lot of sense, except I can't reproduce it, the texture gets swizzled here correctly... When you say corrupted texture you mean there are indeed only the components swizzled wrong, not some other errors (which would for instance happen when the texture data got misaligned if updating only regions, which I didn't really test). I'm using mesa git however, as a quick guess I suspect you might need this fix: http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commit;h=9c09259b8bef8f120cc6f4bb1a44f0eae37d71b3 Note that there seem to be some problem (likely not related) with the texture format selection patch on r300, which noone really understands (https://bugs.freedesktop.org/show_bug.cgi?id=8489) (In reply to comment #1) > Hmm yes this makes a lot of sense, except I can't reproduce it, the texture > gets swizzled here correctly... When you say corrupted texture you mean there > are indeed only the components swizzled wrong, not some other errors (which > would for instance happen when the texture data got misaligned if updating only > regions, which I didn't really test). I'm using mesa git however, as a quick > guess I suspect you might need this fix: > http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commit;h=9c09259b8bef8f120cc6f4bb1a44f0eae37d71b3 > Note that there seem to be some problem (likely not related) with the texture > format selection patch on r300, which noone really understands > (https://bugs.freedesktop.org/show_bug.cgi?id=8489) > Actually (and sorry for not explaining this clearer) The texture mess-up is not in the swizzling, it indeed looks much like a stride error, the colors are correct, but the rows are not properly aligned iow, pixels that should be in the same column, do not end up in the same column. Also the texture gets shrunk to about 3/5th off the size it should be. So this might indeed be very much related to bug 8489, and the chances are indeed good that the pointed to git commit fixes this (I will try later when I'm back home). Thinking more about this, I think that bug 8489 might also be fixed by the same commit as there changing from rgba to abgr also helps, just like it did in my case. So maybe its an idea to add a comment to bug 8489 requesting the reporter to try the same git patch. I'm the one who reported bug #8489, and afaik this problem still persists even with the commit mentioned here. I'll confirm that soon by testing with the latest Git and seeing if the problem is still there. Actually my fix was to change the texture format from _dri_texformat_argb8888 to _dri_texformat_rgba8888, not the other way around as you mentioned. I just checked and my problem still persists even with the latest Git. :( Created attachment 9422 [details] [review] The texture format hack for R300 I can confirm that the git patch pointed to in comment 1 : http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commit;h=9c09259b8bef8f120cc6f4bb1a44f0eae37d71b3 Indeed fixes this, closing. |
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.