When Android app layout settings is default:
glBilitFramebuffer is flipped VERTICALLY & HORIZONTALLY (diagonally) on Kindle fire HDX 7''
result correct on Nexus 5
When app layout is forced to landscape:
result correct on Kindle fire HDX ''
90 DEGREE ROTATED on Nexus 5
Here's the code exactly I'm using: the width & height is the size of texture attached to drawFBO, also is the EGLSurface's size
bool GLESContextEGL::swapBuffers(GLuint drawFBO, size_t width, size_t height)
{
::glBindFramebuffer(GL_READ_FRAMEBUFFER, drawFBO);
assert( ::glGetError() == GL_NO_ERROR );
::glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
assert( ::glGetError() == GL_NO_ERROR );
GLint w = (GLint)width;
GLint h = (GLint)height;
::glBlitFramebuffer(0, 0, w, h, 0, 0, w, h, GL_COLOR_BUFFER_BIT, GL_NEAREST );
assert( ::glGetError() == GL_NO_ERROR );
bool ret = ::eglSwapBuffers(mDisplay, mSurface) == EGL_TRUE;
::glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
assert( ::glGetError() == GL_NO_ERROR );
::glBindFramebuffer(GL_DRAW_FRAMEBUFFER, drawFBO);
assert( ::glGetError() == GL_NO_ERROR );
assert(ret);
return ret;
}
when in landscape mode, the result is 90 degree rotated and looks as if still in portrait mode, but also streched.
We had looked at a similar problem a few months ago, but believed the issue was fixed in our newest drivers, and that these drivers needed to get propagated out by Google in an updated build. Not sure about the Kindle Fire HDX.
1) Can you let us know the build versions and dates for both devices?
2) Is there a log file for the Kindle Fire HDX that shows the Adreno driver version/date?
3) Do you have a sample apk that demonstrates the problem with the above code?
Nexus 5: android version 4.4.4, kernel version: 3.4.0-gd59db4e, date: Monday March 17 15:16:36 PDT 2014.
It's been update just now and I believe it's the latest.
I'll update Kindle HDX device info later, with an APK & OBB.
Kindle Fire HDX 3rd gen has the latest version: Fire OS 4.5.3
Here's my shared APK & OBB:
https://drive.google.com/folderview?id=0B-jwAxcRPTTafmNob2l0OXRRR1VGUTJF...
Note: put the OBB in root folder of sdcard and the APK will work. this APK will also demostrate another problem I posted here.
I think we're seeing a variation of this problem on devices running Lollipop. On a Nexus 7 (2013) the picture is flipped vertically (but not stretched or otherwise distorted). When I downgrade the device to 4.4.2 then I see the rotated and stretched problem as described in this issue. We are also blitting from fbo -> EGL back buffer. I see the same problem on a Moto X 2nd Gen, but not on Nexus 6, so it seems to be confined to Adreno 3XX devices? I'll try to post an APK for you guys tomorrow.
Here's a build that should show the problem - https://www.dropbox.com/s/j14v7bcy0xevpws/HpsSandbox.apk?dl=0. Just choose the BNC sample from the first page and rotate the device to landscape if it isn't already and you'll see the stretched picture in 4.4 and the upside down one in 5.0 (and 5.1).
Evan - We tried this build on our current 8084 and 8994 (both w.Android 5.0.2) devkits, as well as on a Nexus 6 (Android 5.1) and in all cases we didn't see a stretched picture and the image appears right side up (orange part on top, green part on bottom..background gradient is purple on top, white on bottom)
On a Nexus 7 w/Android 4.4.4, we're getting an INSTALL_FAILED_OLDER_SDK message when installing.
Sorry about that, can you try this build instead: https://www.dropbox.com/s/jkz0111dmousk62/HPSSandbox-debug.apk?dl=0, this should install onto your 4.4.4 Nexus 7 and show the squashed and rotated problem. If you updated that Nexus 7 to 5.0 and run either this or the previous build I posted then you should see the upside down (but not rotated) landscape image. Our Nexus 6 hasn't showed any of the these types of problems in landscape.
Hi Evan..
We did run this our Nexus 7 w/4.4.4 and notice that when started in landscape the part is rendering upside down (green ontop of orange) compared to the Nexus 6 w/5.1 (orange on top of green). We're not seeing a squashed artifact.
We're also not seeing a difference between Nexus 7 w/5.0.2 vs Nexus 7 w/4.4.4. Both show green on top of orange.
Also, we're not able to doing profiling with the app with the Adreno Profiler, so we can't scrub the frame and look at the draw calls - is there a particular frame delimiter that is being used?
There should be an eglSwapBuffers call at the end of every frame. I don't have access to all the tablets today that I've been testing with, but I do have a Nexus 4 w/5.0.1 and Moto X 2nd gen w/5.0 that both show the upside problem. Whether the picture is squashed vs. upside down doesn't make a big difference to us since they're both are wrong, I just thought the squashed issue sounded like the problem reported by the OP in this thread. I see there's a 5.1 update available for the Nexus 4, I'll try installing that and see if there's any change.
The nexus 4 w/5.1 still shows the upside down landscape problem.
HTC One (Adreno 320) running Android 4.4.2 has the same problem.
glBlitFramebuffer from a framebuffer to the EGL buffer results in it being flipped both horizontally and vertically.
The bug does NOT show up on a Nexus 7 (2013 - Adreno 320) running Android 5.0.2
It would be helpful if all of you could provide the Android log files for the runs where the results of glBlitFramebuffer are incorrect.
I don't understand. There is nothing in the logs related to the bug. What exactly do you want from them?
Logs would help identify the exact Adreno driver version that is being used in the builds where glBlitFramebuffer is showing incorrect results.
Is this the info you're looking for? This is for the Moto X:
Yes the other logs from devices where the rotation is incorrect would be helpful..
-thanks
Nexus 7: 05-04 11:50:16.640: I/Adreno-EGL(10425): <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 01/15/15, ab0075f, Id3510ff6dc
Nexus 4: 05-05 01:56:18.966: I/Adreno-EGL(3954): <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 01/15/15, ab0075f, Id3510ff6dc
I believe these were both flashed to 5.0 with the Google factory images and then OTA updated to 5.1.
Evan - Just confirming - you are seeing the rotation problem on the Moto X, Nexus 4, and Nexus 7, and are they all running Android 5.1?
Muzza - Any information on the HTC device logs?
We're just looking for the logs from the devices where the glBlitFramebuffer rotation is incorrect
The Nexus 4 and 7 are running 5.1, the Moto is still at 5.0 (still waiting for an update from T-Mobile I guess).
This is from Nexus 7 2013 where the bug does NOT show up:
This is from HTC One which does show the bug: