| Summary: | glBlitFramebuffer produces GL_INVALID_OPERATION after rotation on iOS when using MSAA | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Cole Campbell <cole.campbell> |
| Component: | video | Assignee: | Alex Szpakowski <amaranth72> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72 |
| Version: | HG 2.1 | ||
| Hardware: | iPhone/iPod touch | ||
| OS: | iOS (All) | ||
| Attachments: | Patch to fix the error in updateFrame() | ||
Fixed in https://hg.libsdl.org/SDL/rev/a6ad6813b17b , thanks! |
Created attachment 2518 [details] Patch to fix the error in updateFrame() Tested on an iPad Mini 2 running iOS 9.3.2 After rotating the device, the call to glBlitFramebuffer() inside of swapBuffers() in SDL_uikitopenglview produces a GL_INVALID_OPERATION error every time it is called. This is because updateFrame() recreates the MSAA buffer as GL_RGBA8, regardless of whether this matches the attributes passed to SDL. When the buffers are supposed to be 16-bit, as they are by default, this produces a mismatch between the format of the MSAA buffer and the view buffer, giving rise to the error. The attached patch changes this code to use the colorBufferFormat variable rather than hard-coding GL_RGBA8, as was clearly intended.