We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3378 - glBlitFramebuffer produces GL_INVALID_OPERATION after rotation on iOS when using MSAA
Summary: glBlitFramebuffer produces GL_INVALID_OPERATION after rotation on iOS when us...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: iPhone/iPod touch iOS (All)
: P2 normal
Assignee: Alex Szpakowski
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-26 18:17 UTC by Cole Campbell
Modified: 2016-07-02 16:39 UTC (History)
1 user (show)

See Also:


Attachments
Patch to fix the error in updateFrame() (734 bytes, text/plain)
2016-06-26 18:17 UTC, Cole Campbell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cole Campbell 2016-06-26 18:17:03 UTC
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.
Comment 1 Alex Szpakowski 2016-07-02 16:39:10 UTC
Fixed in https://hg.libsdl.org/SDL/rev/a6ad6813b17b , thanks!