GinKage, on Sep 4 2009, 15:35, said:
In fact, I haven't tried it yet: my Omnia is only going to be delivered to me next week...
Though, I already tried to write a translation dll, just like you did: I tried to load libGLESv1_CM.dll (which only exports "gl*" functions) and libEGL.dll (which exports "egl*" functions), got procedure addresses, and exported all the functions mentioned in Qualcomm's libGLES_CM.dll (both gl* and egl* ones) by translating them to the corresponding Omnia's dll. And - yes, that also failed.
I'll try digging even deeper when my Omnia arrives, and will keep you informed of my findings.
Creating a forwarder libgles_cm is not the issue at all. I made one long before I even started this thread.
The problem is the original DLL's themselves. Try compiling a simple v1 sample (like triangle), using the original OmniaII/Pro drivers - so without the forwarder, just libGLESv1_CM.dll and libEGL.dll. It simply does not work. eglMakeCurrent will fail if libGLESv1_CM.dll is loaded (bad alloc).
You can get around by loading libEGL, libGLESv1_CM
and libGLESv2 in a certain order, but actual GL calls will still fail with AV's.
You can get around that by setting up the context by using one of the GLES2 exports in the v1 lib. This will get rid of the AV's, and actually start the compiling of the shaders used to fake v1 functions in v2 (libGLESv1_CM is a v1 emulation driver that translates to v2 call).
You can then actually use v1 functions, and an FPS counter will return FPS in the expected range for the video card to be doing actual work. However, the screen will remain blank, and debug output will return strings along the lines of that the state has not been flushed by the hardware.
Some mixing and matching with M900 drivers has once given me garbled output (like the internal buffers' line length differ between the seperate driver builds).
I've traced various of these problems with IDA, both live as well as doing a lot of reading of the code. It seems that some initialization routines in the v1 lib are creating havoc, but I am as of yet unsure. A friend of mine who was also a part of bringing hardware 3D accel to the HTC Kaiser, Polaris and Nike is also looking at it a bit, but I'm not sure how far he's looked and attempted things ATM.