http://bugs.freedesktop.org/show_bug.cgi?id=19910
Summary: Can't blend with the alpha from an RGB texture updated via texture-from-pixmap Product: Mesa Version: unspecified Platform: x86 (IA32) OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/i915 AssignedTo: dri-devel@lists.sourceforge.net ReportedBy: n...@linux.intel.com Created an attachment (id=22487) --> (http://bugs.freedesktop.org/attachment.cgi?id=22487) Test case In metacity-clutter (Mutter) we use multi-texturing to render shaped windows. The shape of the window is copied into a GL_ALPHA texture which is blended with the window's texture using multi-texturing such that the areas outside the window's shape end up with zero alpha and aren't displayed. The texture for the window should usually be GL_RGB format and is updated using the texture from pixmap extension. The texture environment is set up so that layer 0 (the window texture) is left at the default and layer 1 uses GL_COMBINE. The RGB is set to GL_REPLACE with the values from the previous texture (the window texture). The alpha is set to GL_MODULATE with the mask layer and the previous layer. As far as I understand from the man pages for glTexEnv, the alpha from an RGB texture when used for blending will be constant 1 so it should work. It works fine on my i965 laptop with Mesa 7.2 (from Ubuntu Intrepid) when LIBGL_ALWAYS_INDIRECT enabled and also on an Nvidia box. However, when testing on an Aspire One (i945) with the Moblin alpha release image, the blending does not work correctly. The shaped windows appear completely transparent as if maybe the non-existent alpha value from the window texture is being used. We currently workaround this in Mutter by using a different blending mode when the window has a 24 bit depth. In this case we ignore the alpha from the window texture and modulate directly with GL_PRIMARY_COLOR. The attached test case demonstrates this without using Clutter. It creates a small white window with a black circle outline drawn it and then creates another window which clones the small window using texture from pixmap. The texture is blended with a 2x2 GL_ALPHA texture which is full opacity except the bottom left pixel. So the window should appear as a black scaled up circle on a white background except for the bottom left corner which should show the blue underneath. Under Moblin, it shows a completely blue window instead. You can enable the workaround by setting the WORKAROUND environment variable. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel