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 660387 - test-color-mask fails due to uninitialized texture data
test-color-mask fails due to uninitialized texture data
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-09-28 19:04 UTC by Luca Bruno
Modified: 2011-09-29 09:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initialize texture data in cogl test-color-mask (1.60 KB, patch)
2011-09-28 19:04 UTC, Luca Bruno
none Details | Review

Description Luca Bruno 2011-09-28 19:04:08 UTC
Created attachment 197694 [details] [review]
initialize texture data in cogl test-color-mask

Hello,
test-color-mask fails because the texture data sometimes contains random color bits,
I've attached a patch that corrects the problem by clearing the texture using the FBO.
Comment 1 Luca Bruno 2011-09-29 09:23:18 UTC
For reference (glTexImage2D spec):

"In GL version 1.1 or greater, data may be a null pointer. In this case, texture memory is allocated to accommodate a texture of width width and height height. [...] The image is undefined if the user tries to apply an uninitialized portion of the texture image to a primitive."

So apparently creating a texture_with_size will not zero-initialize it, thus a cogl_clear (or passing data with zeros?) is necessary.
Comment 2 Neil Roberts 2011-09-29 09:36:12 UTC
Pushed to master as e7cdb1b11b and cogl-1.8 as 4cd8ba0c4. Good catch, thank you!