glBlitFramebuffer problem

Hi,



I am trying to use the glBlitFrameFramebuffer function similar to the following example. This example is an MRT sample code in the book "OpenGL ES 3.0 Programming Guide."

https://github.com/danginsburg/opengles3-book/commit/28c7430ee2406b8bc2a9799e580c24aee3e8f1bc



When I executed the above code, the PowerVR emulator showed the following error message and did not render any images.


(Error) in function: glBlitFramebuffer GL: 502 (GL_INVALID_OPERATION) VF: A210B (the read buffer contains fixed-point or floating-point values, but the draw buffer contains neither fixed-point nor floating-point values)
The authors of the book also mentioned the error as you can see in the above link.
"glBlitFramebuffer does not seem to work with PowerVR Emulator v3.2 but works with Mali ARM Emulator v1.3."

In the code, the draw buffer is the default frame buffer, and the texture format attached to the read buffer is GL_RGBA & GL_UNSIGNED_BYTE. In the case OpenGL (with my AMD GPU), the sample code does not make any errors. Why cannot the emulator handle the default frame buffer as a draw buffer? Does actual devices including PowerVR GPUs also generate the same error in this case? Otherwise, is it only a bug in the emulator?

To find a solution, I checked the MRT example in PowerVR SDK 3.3 R2, but the example does not use glBlitFrameFramebuffer. Instead, the code render axis-aligned quads four times with binding the textures in the read buffer. I think this coding style will require redundant computations compared to simple Blit operations.

Does anyone have a solution using glBlitFrameFramebuffer in my case?


Thanks,


Hi,



I’ve discussed this issue with the lead PVRVFrame engineer. The bug has been fixed for our upcoming 3.4 SDK (due for release in the next few weeks).



I’ve filed a feature request against the SDK for glBlitFramebuffer() to be used instead of screen-aligned renders in our Examples targeting OpenGL ES 3.0 and newer (BRN51528).



Thanks,

Joe