Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20493 Discussions

Invalid framebuffer operation after glCheckFramebufferStatus

LBoer
Beginner
3,162 Views

I am getting a weird OpenGL error when running my application on my HD4000 and think this might be a driver bug. I found no place to report bugs, so I am posting this here. My system specs are: Windows 64bit, driver version 15.28.20.64.3347, OpenGL 3.3 Core Profile.

I boiled it down to a few OpenGL calls to reproduce it:

  1. Create two framebuffer objects.
  2. Create a texture and bind it as GL_COLOR_ATTACHMENT0 to both FBOs.
  3. Call glTexImage2D a second time on the texture
  4. Bind the first FBO and call glCheckFramebufferStatus (returns GL_FRAMEBUFFER_COMPLETE).
  5. Bind the second FBO and call glClear. The glClear gives an GL_INVALID_FRAMEBUFFER_OPERATION.

Step 3 and 4 are required to reproduce the error, which I find especially disturbing for the glCheckFramebufferStatus call. The problem also does not occur on other graphics cards (including the Nvidia card on the same machine).

If you call glCheckFramebufferStatus on the second FBO, it also returns GL_FRAMEBUFFER_COMPLETE. However, when inspecting the internal OpenGL state with apitrace, it says that the second FBO has now a color attachment with object name zero.

Re-binding the texture to the second FBO after the glCheckFramebufferStatus call resolves the error. This is working as a workaround for now, but I suppose that binding textures to various FBOs each frame is not a good idea.

Here is C++ code that reproduces the error (see the link below for the full sources):

// Create a texture and bind it to two FBOs GLuint textureName; glGenTextures(1, &textureName); glBindTexture(GL_TEXTURE_RECTANGLE, textureName); glTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); GLuint fboNames[2]; glGenFramebuffers(2, fboNames); glBindFramebuffer(GL_FRAMEBUFFER, fboNames[0]); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE, textureName, 0); glBindFramebuffer(GL_FRAMEBUFFER, fboNames[1]); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE, textureName, 0); glBindTexture(GL_TEXTURE_RECTANGLE, textureName); glTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); glBindFramebuffer(GL_FRAMEBUFFER, fboNames[0]); // Removing this line resolves the error glCheckFramebufferStatus(GL_FRAMEBUFFER); // Returns GL_FRAMEBUFFER_COMPLETE glBindFramebuffer(GL_FRAMEBUFFER, fboNames[1]); GLenum bufferTarget = GL_COLOR_ATTACHMENT0; glDrawBuffers(1, &bufferTarget); // Adding this line resolves the error // glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_RECTANGLE, 1, 0); glCheckFramebufferStatus(GL_FRAMEBUFFER); // Returns GL_FRAMEBUFFER_COMPLETE //This call causes a GL_INVALID_FRAMEBUFFER_OPERATION error. glClear(GL_COLOR_BUFFER_BIT);

I also prepared a minimal Visual Studio 2013 64bit Project with the same code: https://www.dropbox.com/s/5142j26d839gkp9/HD4000Error.zip Dropbox - HD4000Error.zip

0 Kudos
6 Replies
Allan_J_Intel1
Employee
1,549 Views

I am sorry to hear that have had issues with the Intel graphics. I would like to escalate this matter to our engineering department and I will need additional information:

According to your information, you have driver version 3347, please bear in mind the latest video drivers available on the Intel web site for the Intel HD Graphics 4000 is version 3345. If this issue is still current when using our driver version, please send the graphics report generated within graphics properties and run DirectX to get the report as well.

Also, I was unable to see Dropbox information.

To get the latest video drivers go here:

https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProductFamily=Graphics&ProductLine=Laptop+graphics+drivers&ProductProduct=3rd+Generation+Intel%C2%AE+Core%E2%84%A2+Processors+with+Intel%C2%AE+HD+Graphics+4000&ProdId=3712&LineId=1101&FamilyId=39 https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProductFamily=Graphics&ProductLine=Laptop+graphics+drivers&ProductProduct=3rd+Generation+Intel%C2%AE+Core%E2%84%A2+Processors+with+Intel%C2%AE+HD+Graphics+4000&ProdId=3712&LineId=1101&FamilyId=39

Allan

LBoer
Beginner
1,549 Views

Yes, my driver version is 3345, sorry for the typo. I have sent you a PM containing the reports you requested.

 

Thanks a lot for forwarding this! Contact me if I can be of any help in fixing this.

 

The Dropbox link is still working for me. I think the OpenGL code should be enough to reproduce it, but if you need the executable, I can find another way to send it to you.

 

 

0 Kudos
Allan_J_Intel1
Employee
1,549 Views

Thank you for the information, I am currently researching on this issue. As soon as I can, I will send you a message with my findings. Thank you for your patience and understanding.

Allan.

0 Kudos
HJanz
Beginner
1,549 Views

I too am suffering from the same problem. I run into this problem consistently on some systems, while on others I can't seem to reproduce it. So far (all 64 bit):

  • Not reproducible on
    • Windows 8.1, HD4600, driver 10.18.14.4170
  • Reproducible on
    • Windows 7, HD4600, driver 10.18.10.3958
    • Windows 7, HD4000, driver 10.18.10.4061
    • Windows 7, HD3000, driver 9.17.10.3347

Edit: it does seem to occur on the HD3000 one, too.

0 Kudos
Allan_J_Intel1
Employee
1,549 Views

@ HeinrichJanzing

Please send the graphics report generated within graphics control panel and also DirectX diagnostic report.

http://www.intel.com/support/graphics/sb/cs-009476.htm Graphics Drivers — Intel® Graphics Driver Report

To get the DirectX report, try this click Start, click Run, type dxdiag in the Open box, and then click OK.

Allan.

0 Kudos
HJanz
Beginner
1,549 Views

I sent the reports to you via a private message.

0 Kudos
Reply