On 9/5/06, Roland Scheidegger <[EMAIL PROTECTED]> wrote: > Shawn Starr wrote: > > The Fedora people have been hanging on to a patch for Mesa since > > 6.4.1 for the r300, I am currently using this patch without issue > > (for all the latest compiz stuff). Is there a reason this isn't in > > 6.5.x yet? > > - return do32bpt ? _dri_texformat_rgba8888 : > > + return do32bpt ? _dri_texformat_argb8888 : > What is the reason this is needed? The chip and driver can handle both > formats, and the driver is free to choose an internal representation. > The exact same code can be found in other drivers (radeon, r200 at > least). I think rgba8888 is chosen instead of argb8888 because of the > lower cost converting a given texture to the internal format (because it > probably already is in rgba8888 format).
The problem is that while the hardware both argb8888 and rgba8888, the driver always only configures the hardware to use one of these. Which means that texture upload for argb8888 is just a memcpy, while rgba8888 upload has to swap. For implementing GLX_EXT_texture_from_pixmap, it just happens to choose the wrong format, so texture upload from an X pixmap always has to swap. Ideally, the driver should configure the hardware to use the right format so both cases reduce to memcpy, but the patch just swaps the slow and fast case so that the AIGLX texture_from_pixmap implementation hits the memcpy path. Kristian BTW. The patch we carry apply to the r100 driver - I don't where Shawn got the r300 patch he mentions. See http://cvs.fedora.redhat.com/viewcvs/rpms/mesa/devel/mesa-6.4.1-radeon-use-right-texture-format.patch?rev=1.2&view=auto ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev