[Milestone XT720 Android Development] Mioze7Ae:
I think I've figured this out

Ok, here's the scoop: contrary to what I thought, xav's hacked egl.cfg actually disables the software renderer all together. In testing with Quadrant Advance I get identical (best) performance from either of these two egl.cfg's:

1 1 android
0 1 POWERVR_SGX530_121

and (my recommendation):

0 1 POWERVR_SGX530_121

More info

The documentation header for egl.cfg says:

#
# One line per configuration, of the form:
#
# D I TAG
#
# D: display (0: default)
# I: implementation (0: software, 1: hardware)
# TAG: a unique tag
#
# The library name loaded by EGL is constructed as (in that order):
#
# /system/lib/egl/libGLES_$TAG.so
# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so
#

Now, what had me confused in the past is I couldn't make heads or tails of what "D: display (0: default)" means. Somehow when re-reading that today had the obvious revelation that it's referring to "display number" and 0 is the display number of the primary screen (the default screen) the same way that X11 in Unix refers to displays. So:

1 1 android

means "use the android software renderer as a hardware renderer on the second display" (we don't have a second display and I don't think it can mean the TV or HDMI out, either because Motorola never defined any renderers for a second device). In fact, you can just delete or comment out the entire 0 0 android line and get the same results.

From testing, a tale-tale sign of the software renderer being used is that messed up moon. Hardware rendering doesn't have the messed up moon.

Motorola's default enables both:

0 0 android
0 1 POWERVR_SGX530_121

It turns out that even making the software renderer available is bad for 3D performance.

So why does having the software renderer around cause trouble? Speculation: I thought OpenGL is supposed to figure out the best way to render things, so why is it getting this wrong? My guess is the software renderer must provide APIs that are preferred compared to what the hardware interface provides so applications or the GL library negotiates to use the software API rather than a less desirable hardware-accelerated library or perhaps they can't tell the difference. Or perhaps Quadrant is a piece of junk. That's my guess anyway.

Here's a bunch of testing I did (default kernel frequencies/voltages):

egl.cfg: 0 0 android
0 1 POWERVR_SGX530_121
# Has the messed up moon
Tot CPU Mem I/O 2D 3D
------+----+---+---+---+----
1: 573 954 813 630 194 273
2: 590 989 841 648 195 276
3: 627 1029 981 654 195 277
4: 597 1008 842 663 195 275
5: 601 1025 847 662 194 277

egl.cfg: 1 1 android
0 1 POWERVR_SGX530_121
# No messed up moon
Tot CPU Mem I/O 2D 3D
------+----+---+---+---+----
1: 612 925 820 601 194 521
2: 590 935 842 459 195 519
3: 654 949 977 626 196 524
4: 642 1009 822 656 195 527
5: 643 998 854 645 194 524

egl.cfg: 0 1 android
0 0 POWERVR_SGX530_121
# Noticably awful--feels like a Macintosh 512k
# Quadrant warns about using software rendering
# Has the messed up moon
Tot CPU Mem I/O 2D 3D
------+----+---+---+---+----
1: 465 803 730 562 79 151
2: 477 735 784 635 80 152
3: 487 773 791 638 80 153
4: 472 750 757 622 80 153
5: 468 785 773 552 80 152

egl.cfg: 0 0 POWERVR_SGX530_121
# No messed up moon
Tot CPU Mem I/O 2D 3D
------+----+---+---+---+----
1: 613 860 860 626 193 524
2: 635 963 836 658 194 522
3: 641 1014 807 661 196 526
4: 654 989 912 653 194 522
5: 674 1026 977 648 194 525

egl.cfg: 0 1 POWERVR_SGX530_121
# No messed up moon
Tot CPU Mem I/O 2D 3D
------+----+---+---+---+----
1: 609 919 960 452 193 519
2: 601 946 716 620 195 528
3: 664 999 960 647 195 521
4: 627 1014 751 651 194 527
5: 642 1008 820 661 192 529

egl.cfg: 0 1 POWERVR_SGX530_121
0 0 android
# Has the messed up moon
Tot CPU Mem I/O 2D 3D
------+----+---+---+---+----
1: 575 917 872 626 189 269
2: 595 967 890 651 193 273
3: 597 978 901 634 194 277
4: 577 1006 845 571 192 272
5: 591 982 834 665 195 278