After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694641 - compositer: use correct channel order for gradient texture format
compositer: use correct channel order for gradient texture format
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-25 03:16 UTC by Ray Strode [halfline]
Modified: 2013-02-28 18:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compositer: use correct channel order for gradient texture format (2.60 KB, patch)
2013-02-25 03:16 UTC, Ray Strode [halfline]
none Details | Review
background: drop #ifdefs for gradient code (5.25 KB, patch)
2013-02-28 17:56 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2013-02-25 03:16:31 UTC
Background gradients were specifying a texture format of BGRA and
then putting the colors in memory in RGBA order.

This commit makes them consistent.
Comment 1 Ray Strode [halfline] 2013-02-25 03:16:33 UTC
Created attachment 237327 [details] [review]
compositer: use correct channel order for gradient texture format
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-02-25 03:22:32 UTC
Why do this instead of specifying RGBA and letting the GPU do the swizzling?
Comment 3 Ray Strode [halfline] 2013-02-25 03:57:46 UTC
there's a comment in meta-texture-tower:

/* If the texture format in memory doesn't match this, then Mesa
 * will do the conversion, so things will still work, but it might
 * be slow depending on how efficient Mesa is. These should be the
 * native formats unless the display is 16bpp.
 */

Of course we're talking two pixels here, so it doesn't matter.
Comment 4 Ray Strode [halfline] 2013-02-28 17:56:47 UTC
Created attachment 237635 [details] [review]
background: drop #ifdefs for gradient code

There is currently code to try to fill gradients in a
hardware native format, using #ifdefs. That optimization is
unimportant since gradients only use 2 byte buffers. It's
also incorrect because it's getting the channel order wrong
at buffer initialization time.

This commit drops the ifdefs for clarity and fixes the
channel order.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-02-28 17:57:56 UTC
Review of attachment 237635 [details] [review]:

OK.