Summary: | glGetFramebufferAttachmentParameteriv failing if certain FB attributes are zero | ||
---|---|---|---|
Product: | Mesa | Reporter: | Martina Kollarova <martina.kollarova> |
Component: | GLX | Assignee: | Tapani Pälli <lemody> |
Status: | RESOLVED NOTABUG | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | ||
Version: | 10.1 | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
reproducer.output
glxinfo.output fix for invalid enum issue |
Description
Martina Kollarova
2015-04-24 11:40:24 UTC
Created attachment 115303 [details]
glxinfo.output
I'm not able to reproduce this (tested using Mesa 10.6 and 10.4.7). I noticed from your glxinfo.output that you are using quite old version, Mesa 10.1.3. Could you test with more recent version? I reproduced it with Mesa 10.6.0-devel (git-971be2b 2015-05-12 trusty-oibaf-ppa). I got the drivers from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers (In reply to Martina Kollarova from comment #3) > I reproduced it with Mesa 10.6.0-devel (git-971be2b 2015-05-12 > trusty-oibaf-ppa). I got the drivers from > https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers And so did I, I was simply using wrong branch of your github repo. Thanks, will take a look what's wrong. These errors are according to the spec and happen because of following reason. ---- 8< ---- OpenGL 4.0 Compatibility, page 449: If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE, no framebuffer is bound to target. In this case querying pname FRAMEBUFFER_- ATTACHMENT_OBJECT_NAME will return zero, and all other queries will generate an INVALID_OPERATION error. ---- 8< ---- In the application before all other queries, you'll need to query for attachment object type: glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &type); If type is GL_NONE, then other queries should not be made. Please resolve as NOTABUG if you agree with this. Having said that, I noticed that glGetFramebufferAttachmentParameteriv is broken if you try to query type or name of non-existing attachment point (for desktop GL). But that should be another bug. > glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
> GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &type);
This query generated a GL_INVALID_ENUM for me.
(In reply to Martina Kollarova from comment #7) > > glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, > > GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &type); > > This query generated a GL_INVALID_ENUM for me. Yep, like stated in comment #6, that seems to be broken. I'm attaching here a patch to make it work in case you have Mesa from git repository to try. I will send this patch later to mesa-dev after some careful spec investigation and testing. Created attachment 115736 [details] [review] fix for invalid enum issue This helps in getting GL_NONE as object type when there is no attachment in given attachment point. I'm resolving this as per comment #5 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.