On Fri, 2006-09-22 at 10:34 +0100, Keith Whitwell wrote: > Michel Dänzer wrote: > > On Fri, 2006-09-22 at 09:17 +0100, Keith Whitwell wrote: > >> Michel Dänzer wrote: > >>> On Thu, 2006-09-21 at 19:28 +0100, Keith Whitwell wrote: > > > >>>> 2) How bigEndian affects how we layout hardware texture formats. > >>> It shouldn't right now, all the hardware drivers known to work on big > >>> endian take texture data in little endian. I'm investigating the swizzle > >>> paths, thanks for disabling them for now. > >> But maybe because the swizzle code tries to specify packed data ordering > >> in terms of array offsets, it is actually necessary to flip those > >> offsets on bigEndian machines to get the right results. > >> > >> In other words, the dstMap values passed down to swizzle_ubyte_image > >> should be adjusted based on whether this is a big or littleendian machine. > > > > Curiously enough, this seems true in one case but not the others. The > > attached patch works for me with the r300 driver.
Do you understand why this works? :) Should I check it in? > >> I think from Brian's description of the meaning of the texture format > >> struct naming, a driver that wanted a different component order in a > >> packed field would have to specify a different texformat struct - ie the > >> component ordering for a given texformat struct is fixed. > > > > Ah, I was confused by the different meanings of the _REV suffix for the > > OpenGL formats and Mesa's internal hardware formats. Looks like it just > > means byte swapping for the latter. > > In fact, given the naming scheme for the mesa texformats, I wonder why > the _rev designation is necessary at all -- shouldn't _argb8888_rev just > be called bgra8888 ? That would work for the formats where component and byte boundaries align, but e.g. GBARG35152 instead of ARGB1555_REV would be a little weird, wouldn't it? :) -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
