GLES 2.0 and the emulator

Started by robert, September 22, 2012, 12:04:46 PM

Previous topic - Next topic

robert

Hi there,

Just to let you know that OpenGL ES 2.0 works on the emulator even if it reports it doesn't.

Please fix this: http://www.jpct.net/wiki/index.php/Using_the_emulator or let me know how to fix it.

EDIT: Forgot to say you need an Android 4.0.3+ virtual device and set the "GPU" emulation flag to true when creating it, or pass the "-gpu on" command line parameter when running the emulator from the command line.

Thank you.

EgonOlsen

I tried that once...it crashed my whole system pretty hard, so can't comment on it. I'll create an account for the wiki for you, so that you can edit it yourself.

EgonOlsen

You should have received an email with the login data for the wiki...

robert

Hi Egon,

Could you please send me the e-mail again ? I've updated the e-mail in my profile, the old one is no longer valid.

Thank you.

K24A3

It's working fine for me using jPCT 1.25 ES2.0 via the jellybean (4.1) Intel AVD, Intel HAX, and GPU acceleration. Performance it about the same as the phone (recent Samsung Galaxy), but it stutters every few seconds and flickers occasionally. Needs a bit of work but it's usable. 

A lot of the time I get that "Failed to allocate memory: 8" error when launching the emulator. Lowering the RAM doesn't seem to help but setting the screen resolution manually oddly seems to get it working.

EgonOlsen

Quote from: robert on September 23, 2012, 02:10:33 AM
Could you please send me the e-mail again ? I've updated the e-mail in my profile, the old one is no longer valid.
I've created another account for the new address. You should get an email notification with the password.

EgonOlsen

Quote from: K24A3 on September 23, 2012, 02:09:09 PM
It's working fine for me using jPCT 1.25 ES2.0 via the jellybean (4.1) Intel AVD, Intel HAX, and GPU acceleration. Performance it about the same as the phone (recent Samsung Galaxy), but it stutters every few seconds and flickers occasionally. Needs a bit of work but it's usable. 

A lot of the time I get that "Failed to allocate memory: 8" error when launching the emulator. Lowering the RAM doesn't seem to help but setting the screen resolution manually oddly seems to get it working.
I tried it myself after remembering that i got this fatal crash with my old Radeon 5870. Now with the GTX 680, it works. I got the same memory error and fixed it in the same way...strange. The rendered image looked good, but performance is p*** poor. From a Core i7 @ 4Ghz, 16GB, GTX 680 setup, i would expect a little more than max. 7 fps in my RPG thingy @  800*480. In the dungeons, it slowed down to 4 fps...maybe because of the parallax mapping shader that i'm using. So while it worked technically, it's far too slow IMHO. At least when using OpenGL 2.0. It might be better with 1.x.

K24A3

Quote from: EgonOlsen on September 23, 2012, 08:25:24 PM
I tried it myself after remembering that i got this fatal crash with my old Radeon 5870. Now with the GTX 680, it works. I got the same memory error and fixed it in the same way...strange. The rendered image looked good, but performance is p*** poor. From a Core i7 @ 4Ghz, 16GB, GTX 680 setup, i would expect a little more than max. 7 fps in my RPG thingy @  800*480. In the dungeons, it slowed down to 4 fps...maybe because of the parallax mapping shader that i'm using. So while it worked technically, it's far too slow IMHO. At least when using OpenGL 2.0. It might be better with 1.x.

I have a very similar PC setup so you should be getting much better performance than that. I'm seeing 60FPS with some OpenGL 1.0 apps at 1280x800 in Tablet mode using the Intel Android image ( the ARM7 image is still sloowwww )

Are you sure GPU acceleration is enabled? The GPU option was missing in the AVD Manager so I had to use the "-gpu on" command line option. Enter the command line at the bottom of the dialog in Eclipse->Select your project->Run Menu->Run configurations->Target.

Or send me the APK and I'll give it a test.

EgonOlsen

Yes, it's enabled. It wouldn't even work otherwise and the driver string also states it. But in OpenGL Es 2.0, each and every pixel has to go through the vertex/fragment shaders and emulation of these (or execution on actual hardware) seems to be slow.

K24A3

Yeah there is probably some heavy emulation happening in the background causing excessive performance issues. Worse yet, the emulation may be done within the Android VM CPU (linux display driver) rather than the Desktop CPU... who knows. Hopefully they will improve things at a later stage. GPU acceleration is experimental after all.

Either way, my apps perform fine (probably due to the minimal shader usage). For me it's a breath of fresh air testing my apps in the emulator rather than on the cumbersome phone.