Roland Scheidegger wrote:
 > RCS file: /cvs/mesa/Mesa/src/mesa/main/texstore.c,v
 > revision 1.121
> date: 2006-09-20 14:28:42 +0000; author: keithw; state: Exp; lines: > +19 -12
 > Fix _mesa_swizzle_ubyte_image() to deal with RGBA->RGB->RGBA
 > conversions, ensuring that the final A value is 0xff in those cases
 > where we use a RGBA hardware texture format to store RGB textures.
 > Fix a couple of cases where hardwired texture conversions were
 > ignoring this restriction.

I think these changes potentially cause trouble, as the compute_component_mapping function will throw an error now for some weird format conversions. If you modify a driver's choosetextureformat function to always return the argb8888 format (some drivers are pretty close to that anyway), gleans pixelFormat test shows some errors and some mesa implementation errors.
Mesa 6.5.1 implementation error: Unexpected logicalBaseFormat
Please report at bugzilla.freedesktop.org
pixelFormats failed at pixel (0,0), color channel 0:
   Expected: 0xff 0xff 0xff 0x00
   Found:    0xff 0xff 0xff 0xff
   Format: GL_RGBA
   Type: GL_UNSIGNED_BYTE
   Internal Format: GL_LUMINANCE_ALPHA

OK, I'll take a closer look. In the meantime, does this diff solve the problem for you?

Keith
Index: texstore.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/main/texstore.c,v
retrieving revision 1.121
diff -u -r1.121 texstore.c
--- texstore.c  20 Sep 2006 14:28:42 -0000      1.121
+++ texstore.c  20 Sep 2006 16:09:23 -0000
@@ -1320,7 +1320,8 @@
            dstFormat == &_mesa_texformat_argb8888 &&
            srcType == GL_UNSIGNED_BYTE && 
            littleEndian &&
-           can_swizzle(baseInternalFormat) &&     
+           (baseInternalFormat == GL_RGBA ||
+            baseInternalFormat == GL_RGB) &&      
            can_swizzle(srcFormat)) {
 
       GLubyte dstmap[4];
-------------------------------------------------------------------------
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

Reply via email to