Issues using GL_DEPTH_STENCIL_ATTACHMENT

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?

This is in reference to the ticket 628.

Thanks,
Devin

Hello Easter,

Could you please confirm if you have the default frame buffer attached?

According to https://www.khronos.org/opengles/sdk/docs/man3/html/glInvalidateFramebuffer.xhtml

“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.

Thanks,
Paul

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.

Thanks,
Devin

Hello Easter,

I can confirm this is a driver bug (in addition to PVRVFrame BRN above) I will investigate further and get back to you with a bug report number.

Thanks,
Paul

Have you tried using GL_DEPTH and GL_STENCIL instead as a work-around?

Thanks,
Paul

We have tried using GL_DEPTH and GL_STENCIL and it does work.

Hello Easter,

This was fixed in the driver as BRN61129. All drivers 1.3+ will work correctly.

If this is critical I would suggest contacting your system provider. Otherwise I would continue to use the workaround.

Thanks,
Paul