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 753295 - Gets unknown enumeration value warnings when running the Nvidia proprietary driver
Gets unknown enumeration value warnings when running the Nvidia proprietary d...
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: GL
1.20.x
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-08-05 20:14 UTC by Marcus Lundblad
Modified: 2015-08-06 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gl3: Don't use deprecated constants (2.39 KB, patch)
2015-08-05 20:37 UTC, drago01
needs-work Details | Review
gl: Do not use deprecated constants with the GL3 driver (3.52 KB, patch)
2015-08-06 11:37 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Marcus Lundblad 2015-08-05 20:14:44 UTC
When running gnome-maps using clutter from recent git master, you get warnings like these:

(org.gnome.Maps:1236): Cogl-WARNING **: ./driver/gl/cogl-framebuffer-gl.c:1078: GL error (1280): Invalid enumeration value


(org.gnome.Maps:1236): Cogl-WARNING **: ./driver/gl/cogl-framebuffer-gl.c:1079: GL error (1280): Invalid enumeration value


(org.gnome.Maps:1236): Cogl-WARNING **: ./driver/gl/cogl-framebuffer-gl.c:1080: GL error (1280): Invalid enumeration value


(org.gnome.Maps:1236): Cogl-WARNING **: ./driver/gl/cogl-framebuffer-gl.c:1081: GL error (1280): Invalid enumeration value


(org.gnome.Maps:1236): Cogl-WARNING **: ./driver/gl/cogl-framebuffer-gl.c:1082: GL error (1280): Invalid enumeration value


(org.gnome.Maps:1236): Cogl-WARNING **: ./driver/gl/cogl-framebuffer-gl.c:1083: GL error (1280): Invalid enumeration value

The champlain (map view) widget becomes unresponsive, the rest of the GTK+ interface continues to function, though.
Comment 1 drago01 2015-08-05 20:37:41 UTC
Created attachment 308818 [details] [review]
gl3: Don't use deprecated constants

glGetIntegerv (GL_DEPTH_BITS, ... and friends are deprecated in GL3, we
have to use glGetFramebufferAttachmentParameteriv instead.

---

Seems to be fallout from the GL3 change, I sent Marcus that patch yesterday and it
seemed to fix the issue for him.
Comment 2 Emmanuele Bassi (:ebassi) 2015-08-06 11:11:53 UTC
Re-assigning to the right product/component.
Comment 3 Emmanuele Bassi (:ebassi) 2015-08-06 11:37:22 UTC
Created attachment 308845 [details] [review]
gl: Do not use deprecated constants with the GL3 driver

glGetIntegerv (GL_DEPTH_BITS, ... and friends are deprecated in GL3, we
have to use glGetFramebufferAttachmentParameteriv instead, like we do
for offscreen framebuffers.

Based on a patch by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
Comment 4 Emmanuele Bassi (:ebassi) 2015-08-06 11:38:08 UTC
Review of attachment 308818 [details] [review]:

Thanks for the patch.

::: cogl/driver/gl/cogl-framebuffer-gl.c
@@ +1073,3 @@
         }
     }
+  else if (ctx->driver == COGL_DRIVER_GL3)

I don't think it's a good idea to add a separate branch copying the same code that we use for the offscreen framebuffers.

I'd just add a condition to the existing branch:

  if (ctx->driver == COGL_DRIVER_GL3 ||
      (...))
    {
    }

and change the value of the attachment field depending on whether we're querying an FBO or the default framebuffer.
Comment 5 drago01 2015-08-06 13:51:04 UTC
Review of attachment 308845 [details] [review]:

OK this looks indeed cleaner.
Comment 6 Emmanuele Bassi (:ebassi) 2015-08-06 15:16:03 UTC
Thanks for the review.

Pushed to the cogl-1.20 and cogl-1.22 branches.

Attachment 308845 [details] pushed as 236efb7 - gl: Do not use deprecated constants with the GL3 driver