While running on the PC with the PVR frame emulator we have no issues using GL_DEPTH_STENCIL_ATTACHMENT when calling InvalidateFrameBuffer. However when we move over to the headunit that is running the native Power VR series 6 system we are getting an GL_INVALID_OPERATION when we try and use a GL_DEPTH_STENCIL_ATTACHMENT in the InvalidateFrameBuffer. If on the other hand we do a GL_STENCIL_ATTACHMENT with a GL_DEPTH_ATTACHMENT it works fine. Any ideas?
“If the default framebuffer is bound, then attachments may contain GL_COLOR, identifying the color buffer; GL_DEPTH, identifying the depth buffer; and/or GL_STENCIL, identifying the stencil buffer.”
The default frame buffer cannot be passed GL_DEPTH_STENCIL_ATTACHMENT.
I have filed a bug against PVRVFrame to check for this case as BRN58009.
I have placed a glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &drawFboId); right before the point we hit the invalidateFramebuffer and it shows a number other than 0. It is the same number we have when we are binding the frame buffer so nothing has modified it. It looks like the buffer is not the default one.