yashsingh1/xdaforums huggingface dataset:
[Touch Cruise ROM Development] NeoS:
WOWOWOWOW! Easy now. I can't reboot the device and start another setup with just one cab, can I?

And can the Team's name be "Team Polaris 3D"? Since i've name the directories like that :o

And someone upload the original libgles_cm.dll please, i've "displaced" mine.
[Touch Cruise ROM Development] bally3:
Sure.. though if you're naming the team..we'll have to get uniforms and everything...

What you think NuShrike? Cape or tights for you? :p
[Touch Cruise ROM Development] rogro82:
I think the only thing that really is holding us back is the "speed" of the gdi SetPixel which isnt known as fast....

Couldnt we be using something like gdiflush / swapbuffers... dont know if these would speed things up and if it would result in anything being updated in the current context, but there has to be something..
[Touch Cruise ROM Development] joergswa:
Cab is ready?

Hi@all,

i hope you put the finished cab at the first post or in a new threat?! I dont want to missed the start! ;) Very good job, THX!!
[Touch Cruise ROM Development] pananza:
But is it SetPixel, or Get and Release DC that takes time?

Is it possible to somehow store the DC in a variable and reuse?
[Touch Cruise ROM Development] NuShrike:
I withdraw this. Seems to make opening/closing 3D apps unstable. Go back to _01, but feel free to continue testing _02.

Going back to the original:

HDC hdc = ::GetDC(NULL);

::SetPixel(hdc, 0, 0, 0);	// Polaris test

::ReleaseDC(NULL, hdc);

I'm not sure we're speed limited by SetPixel since it's only one pixel. The point is to convince GDI that a screen update is needed.

rogro82: We just need to find the proper ExtEscape() command that works so we don't have to do this SetPixel() stuff.
[Touch Cruise ROM Development] rogro82:
I think lights and other samples hang when the device switches of the display... NuShrike the ExtEscape function you were using was it the setpowermanagement to keep the screen alive or was it something else?

Im going to test this by setting my energy saver off so the screen will stay on...
[Touch Cruise ROM Development] rogro82:
Ive already noticed that calling the GetForegroundWindow will make it unstable... had it in my application also..
[Touch Cruise ROM Development] NeoS:
Ok i made a cab of 001. Gonna test it on my device so i need to hard-reset.

Read: You need to hard reset your device to make this work!!!

Because of the DDi.dll overwrite.
[Touch Cruise ROM Development] NuShrike:
Direct call to DDI 3.28+ to trigger screen update. It basically tells DDI that the MDI layer is "dirty" and needs updating.

Can you test the unwrapped libgles_cm.dll and see if ExtEscape() works properly? Just remove libgles_cm.dll and rename libgles_cm_ks.dll to libgles_cm.dll.

The driver isn't designed to turn off. In the OpenGL-ES docs, power management handling is the responsibility of the app and graphics contexts need to be restored after power restore.

So, none of the sample apps we are testing handle rotation and power off.
[Touch Cruise ROM Development] bally3:
ok... tested 02 for a full 15 mins.. no slowdown or freeze.. Frame rate went up from 2.280952 (steady) to to 2.5 fps(steady).

Still no heat issues.
[Touch Cruise ROM Development] radem205:
I believe SetDIBits (http://msdn.microsoft.com/en-us/library/ms532281(VS.85).aspx) is faster than SetPixel, or am I wrong?
[Touch Cruise ROM Development] NuShrike:
ExtEscape() wrapped which works on Kaiser, don't know about Polaris:

HDC hdc = ::GetDC(NULL);

::ExtEscape(hdc, 0x186ab, 0, NULL, 0, NULL);

::ReleaseDC(NULL, hdc);

polarisExtEscape_03.zip (113.0 KB, 7 views)
[Touch Cruise ROM Development] NeoS:
I'm done with the cab of PP3D_v001.cab ;) (Project Polaris 3D Version 0.01)

How are we going to distibute this to the team?
[Touch Cruise ROM Development] bally3:
Leave that with me.. ;)

actually password the zip for the moment.. stick it on here.. pm the team with the pass. The way NuShrike and Rogro are going... we might be 3D accel by end of night lol
[Touch Cruise ROM Development] imfloflo:
who are team member? make a private forum, or a private place to upload the cab.
[Touch Cruise ROM Development] rogro82:
Its seems to be working... making a softreset right now...

Strange :confused: Cause when i made the same call from outside another app it didnt do anything... maybe because of the extra files from the driver it didnt work properly.

Edit:

Yep its working... lets see if it doesnt hangs...
[Touch Cruise ROM Development] bally3:
Hung after a few mins..
[Touch Cruise ROM Development] NeoS:
I PM'ed the team with a link. Let me know if it works.

Remember, you need to hard-reset your device to make it work.

and Bally3, now it's time to update your first post with some cool info about our stuff. (add my videos and announce our project name or something?) ;)

And should we make a fresh thread once we're done?
[Touch Cruise ROM Development] rogro82:
Ill let it run using remotespy to see if something triggers it...
[Touch Cruise ROM Development] bally3:
I've done a quick update at the moment on the front... but I'm more interested in todays developments... Thanks for the cab.. will test it later, but I think right now its important to support rogro82 and NuShrike, remember NuShrike is doing this without a Polaris.. god knows how HIS brain works..I'm having trouble just keeping up! :confused:
[Touch Cruise ROM Development] imfloflo:
can a member of the team can make a good video .thks

without polaris omg !!! good
[Touch Cruise ROM Development] NeoS:
errr, what? I'm sorry, aren't the videos any good?

Oh and Nushrike and Rogro, do we need the libgles_cm_ks.dll or not?
[Touch Cruise ROM Development] rogro82:
Ok.... im experiencing something strange...

im running glbenchmark while my device is connected via activesync and it doesnt hang and performance WAY better then when not connected :confused:

Is activesync forcing some kind of keepalive???
[Touch Cruise ROM Development] NuShrike:
It's nice that once most of the basics (correct DDI.dll, ahi2dati* dlls), are set, it should probably work the same as any other MSM7200 device. Sure works the same on the Kaiser now too, and kicks arse.

Afterall, the libgles_cm.dll and a few more .dlls comes from the LG KS20, the ahi2dati.dll comes from the HTC Diamond (and there's a more up-to-date version that HTC-CA could put out), and the rest is custom glue .dlls.

Sure would be nice to get a Toshiba G810 rom dump. The Youtube of it looks like it as has fast 2D/GDI drivers.
[Touch Cruise ROM Development] NuShrike:
libgles_cm_ks.dll is the one with all the real code. The small 19K libgles_cm.dll is just a wrapper that intercepts eglSwapBuffers() and slipstreams our SetPixel/ExtEscape() hack in.

rogro82: maybe the phone is set to 100% speed when it's feeding from ActiveSync usb 5V power. Oh and iirc, SetPixel/ExtEscape() slows down when the backlight times out.
[Touch Cruise ROM Development] rogro82:
Does anyone have a glbenchmark tool that outputs data instead of asking me to send it to the internet?
[Touch Cruise ROM Development] rogro82:
That must be it NuShrike... We could make use of SetDevicePower to simulate this i think... it would drain battery but who wants there backlight turning of while having 3d apps running :D
[Touch Cruise ROM Development] bally3:
MAKING THIS REQUEST TO ALL USERS - GET ON THE TESTING TEAM IF YOU GET THIS TOSHIBA G810 ROM DUMP - POST IT ON HERE - FIRST COME FIRST SERVED! :p
[Touch Cruise ROM Development] bally3:
Neos does.. . go on mate send it to rogro.. and ME ;)
[Touch Cruise ROM Development] bally3:
Dont know if anyones noticed.. but D3Demoapp is scorching..
[Touch Cruise ROM Development] NeoS:
Err, no. I don't have it. I have an account there. Let me benchmark them, i'll post the results here.
[Touch Cruise ROM Development] w04g005:
I've sent you a pm!!
[Touch Cruise ROM Development] rogro82:
NuShrike could this have something to do with it or was it already tried?

http://support.microsoft.com/kb/316221
[Touch Cruise ROM Development] NuShrike:
Interesting! We should try this out.
[Touch Cruise ROM Development] rogro82:
Tried it but i think it needs a softreset because gwes is loaded at startup... doing at the moment
[Touch Cruise ROM Development] NeoS:
The device doesn't seem to like lighting that much seeing from the GLBench's second test with the dino...

It's faster though. Give me a minute to finish the benchmark, i'll post the info later.
[Touch Cruise ROM Development] rogro82:
Ok i found something here... Setting Porepaint to 2 will make my screen try to go to standby like normal... but something is forcing it to wake up and its drawing a white screen.

NuShrike I think we also need a routine that checks the backlight/device and only send the extescape if the screen isnt in standby mode...
[Touch Cruise ROM Development] cbandarrinha:
Team Polaris 3D Image

Hello guys,

Here's something I've made after you announced the Official name for your team.

Hope you like it. Just made for the fun of it and taking in consideration that you guys have been making a wonderful job.

Keep up!!
[Touch Cruise ROM Development] NeoS:
I finished making v.002 of the cab. You sure you want me to upload it here on the public forums? (it is password protected though)
[Touch Cruise ROM Development] bally3:
same thing happens when you use BenchGLES... also the white screen used to happen when we first started using the CA drivers... could be linked.

Symptoms: Put in sleep mode or device goes to sleep .. on wakeup (manually and periodically) white screen that cant be got rid of - requires soft reset.
[Touch Cruise ROM Development] imfloflo:
@cbandarrinha nice but dont respect the proportion of the pictures, you must distort the image a little, don't just paste it
[Touch Cruise ROM Development] rogro82:
NuShrike can you put the following command in the swapbuffers?

SystemIdleTimerReset()

This should make the device stay alive while running...

More info:

http://www.pinvoke.net/default.aspx/coredll.SystemIdleTimerReset

Edit:

Tried in an application but it doesnt seem to force the device to stay awake...

Now trying SetDevicePower to set it to full power.
[Touch Cruise ROM Development] bally3:
nice.. cbbadarinha.. welcome back.. :)

Can you follow what rogro82 and NuShrike are doing and see if you can help them please?
[Touch Cruise ROM Development] NeoS:
The D3DMDemo still slows down after some time. Still a leak somewhere?
[Touch Cruise ROM Development] cbandarrinha:
Can you please tell me how can I help? I think that this whole thing is way over my abilities but I'm available to do whatever you can hand to me!
[Touch Cruise ROM Development] NuShrike:
HDC hdc = ::GetDC(NULL);
::ExtEscape(hdc, 0x186ab, 0, NULL, 0, NULL);
::ReleaseDC(NULL, hdc);

static size_t timer_reset = 0;	// keep the screen on
if ((timer_reset++ % (300 * 5)) == 0)	// assume 300fps * 5 seconds
{
::SystemIdleTimerReset();
timer_reset = 0;
}

I personally think it's cleaner to leave the power-management up to the app instead of the driver.

Okay, I'm out. I got other duties to followup.

polaris20080925_04.zip (113.1 KB, 17 views)
[Touch Cruise ROM Development] NeoS:
Cab time!

This is for the team only! Used for testing purposes. Added your last changes NuShrike.
[Touch Cruise ROM Development] rogro82:
me too but as long as we dont have a fix for suspending this can come in handy so we dont have to restart every 5 mins. :D

I created an application that keeps the device forced on full power that way my glbenchmark runs the same as when im connected to activesync.

i used:

SetSystemPowerState(null, POWER_STATE_ON, POWER_FORCE);

ill upload the app so people can run the tests with full throttle ;)
[Touch Cruise ROM Development] bally3:
Thanks Neos - fast work! :)
[Touch Cruise ROM Development] rogro82:
Can anyone run the glbenchmark without any powersource connection when this app is running to let me know if this is indeed forcing the power to fullpower...

My glbenchmark ran the seem as when im connected to activesync ;)
[Touch Cruise ROM Development] bally3:
frame rates dropped to 2.0 with billboard fps with keepalive.. neos should be able to give GLbechmarks.
[Touch Cruise ROM Development] rogro82:
i know the framerate drops... its because i need to send the command to force it... ill try to raise the timer so it wont affect fps too much...

But can you confirm everything keeps running?

Where does the billboard app stores the fps text file?
[Touch Cruise ROM Development] NuShrike:
How about a SetPowerRequirement() on the LCD?
[Touch Cruise ROM Development] bally3:
in a text file called fps_dump.txt in DEVICE (root)
[Touch Cruise ROM Development] rogro82:
That would indeed be better because you would only force the display... but is it possible to use BKL1 (backlight) or does the display has its own prefix?
[Touch Cruise ROM Development] rogro82:
Testing a less consuming app as we speak...
[Touch Cruise ROM Development] rogro82:
Ok here is the new file... the timer was raised and it still seems to work properly.

It could drop the fps by a bit but it wont make your device go into limp mode... This is not to speed things up just to make the tests less painfull while the suspend problem isnt fixed yet.

@bally3 what was your Billboard fps without running the keepalive method? so i have some reference about how much time its taking

edit: My triangle dropped from 318 to 315 so its taking a little bit but not much...
[Touch Cruise ROM Development] bally3:
2.5fps steady.. it was 2.38fps when we started tonight...
[Touch Cruise ROM Development] NuShrike:
Should be BKL1. You can check available device names with DotFred's Task Manager.
[Touch Cruise ROM Development] bally3:
Ok accepted. but still are you able to answer my question?
[Touch Cruise ROM Development] NikMel:
for omnia dll file you dont need to reflash your device its just make this chage in registry.

this omnia file works in all wm6.1 rom's
[Touch Cruise ROM Development] NikMel:
swtos included omnia dll in his rom and in udk's rom its not going to work I dont think so. It will do the same **** like in my rom or any other polaris rom.
[Touch Cruise ROM Development] bally3:
At least we now have an understanding of how the "3D Support" has come into the Polaris dictionary, and when I say "we" I mean the masses of Polaris xda-dev users who have been kept guessing whether we were going to see any 3D acceleration and expecting to see some hardware acceleration of some sort.

So to cap it at this stage:

If you flash any of the growing number of WM6.1 roms and install either the dll and the hook that NikMel has kindly given or the original Omnio Driver you will see some software acceleration from the optimised driver. Ii am still unsure whether the driver or dll file has been built in.

We will continue and see whether we can learn more .. so stay tuned! ;)
[Touch Cruise ROM Development] bally3:
NikMel, swtos' rom points to the d3dmref.dll file which I believe is also software rendering. Whats the difference?

(Apart from the fact the cylinder spins MUCH faster with the d3dmxsc50PB.dll file?)
[Touch Cruise ROM Development] dwaradzyn:
d3dmref.dll is very slow as it is not optimised for practical use. it was written by ms for developers to let them test that the real driver they are working on produce correct images. it is not intended for shipment
[Touch Cruise ROM Development] SuperJMN:
Based on my own experience:

I have downloaded the D3DMXSc50PB.dll file, copied it to the Windows folder and edited the registry as Bally3 mentioned. I've got the Syrius R0 currently, with no other modifications.

RESULT:

The 3D samples (including Lights.exe) run way fast, although I think it draws the frames only using software.

Every other graphic operation, like 2D seem to be as slow as always.

If somebody wants to try: follow the instructions by Bally3 http://xdaforums.com/showpost.php?p=2651168&postcount=70
[Touch Cruise ROM Development] bally3:
So would you recommend using the d3dmxsc50PB.dll file instead for future builds? (unless of course a better solution comes along - and are there any 2D improvements with either files?
[Touch Cruise ROM Development] bikerg:
Ive done the reg edit etc. is there an easy cab file for lights.exe etc?

i dont want to install them from the htc ca cab.

thanks
[Touch Cruise ROM Development] bally3:
Thanks SuperJMN, but credit should go to NikMel who along with dwaradzyne is really helping to enlighten us Polaris users.
[Touch Cruise ROM Development] bally3:
Just download nikmels file in the earlier posts and unrar it somewhere - preferably in main memory.
[Touch Cruise ROM Development] dwaradzyn:
Easy to install Omnia cab and easy to install d3d samples can be found here:

http://xdaforums.com/showthread.php?t=416474
[Touch Cruise ROM Development] ouioui01:
I confirm this fact!!!
[Touch Cruise ROM Development] dwaradzyn:
There is almost no software (besides simple demos) that would be usable with software driver. Games like Quake (GL), Doom GLES, Call of Duty are not playable without hardware 3d acceleration. Chefs want to save space and do not include this software driver by default - I understand that. I install it myself and I would preffer it to be more widespread.
[Touch Cruise ROM Development] DarkPower:
Amazing !!!!!! It is very very fast !!!

udk, you need to integrate this (or better) for the next Syrius ROM !!!!!!!

Guys, I think we've done a lot of work since one month and the end of 3D drivers is near !

Keep searching !
[Touch Cruise ROM Development] asa51n:
I second that... :)
[Touch Cruise ROM Development] NeoS:
I copied the .dll file and edited the registry. Soft reset my device. Using Syrius R0, at first I thought my scrollbar in manilla was slower than normal and it made me almost retrace my steps. Thank God I waited for the device to completely boot up.

My device runs like never before! The screen is REALLY responsive and the coolest feature: the lights.exe and other tools work!

Great work guys. The progress is finally showing.
[Touch Cruise ROM Development] dubbeld00:
The only thing now is... youtube player was running smoothly (almost smoothly) but when I now play a video, it's really slow (1 or 2 FPS)... (you have to select max bandwith (or good quality)).

Dunnow if someone can benchmark these dll's... Then we can really see whats the benefit of this driver :)
[Touch Cruise ROM Development] voxel.:
Hi,

Question : can i put this dll on a WM6.0 (original ROM) ?

It's strange, in my register, i have already this value "D3DMXSc50PB.dll" for [HKEY_LOCAL_MACHINE\System\D3DM\Drivers] "LocalHook" :confused:
[Touch Cruise ROM Development] raykisi:
Cab for Omnia driver

SJ SamsungOmnia_Driver_D3D.zip

The cab will do the registry change for you

Originally from this post:

http://xdaforums.com/showthread.php?t=416474
[Touch Cruise ROM Development] NeoS:
Great day today guys.

I'm off for now.
[Touch Cruise ROM Development] bally3:
Its back up to 2.38 to 5fps... why are the frames so low rogro? is it our method or the gpu?
[Touch Cruise ROM Development] rogro82:
Ok another version using SetPowerRequirement on the Backlight so that not the complete device is forced to full power but just the display...

Havent had time to run it a long time though...
[Touch Cruise ROM Development] rogro82:
I wonder... if you run the glbenchmark tests you get to see the doom kind of game demo... that runs great so what can be so hard about the billboard?

Strange thing is we are measuring performance with apps of which we dont even know if they are good in means of performance ;)

Thats why i dont take too much of it... I rather see something like Glbenchmark speeding up.
[Touch Cruise ROM Development] bally3:
I did wonder about that and I have Doom which seems to be faster.. also I can play youtube videos and avi's through coreplayer using direct draw which I never used to.. so somethings definitely getting better... I'll tell you what though rogro.. you and NuShrike .. make one hell of a team! :)
[Touch Cruise ROM Development] rogro82:
I think now we are at the same level the current kaiser driver ( correct me if im wrong ), so everything that has to be done from here on only gets harder to gain performance...

The first thing is stability... if that is maintained then the performance aspect becomes the first worry.
[Touch Cruise ROM Development] bally3:
Night neos.. sleep well!
[Touch Cruise ROM Development] bally3:
Yup quite right I think so too rogro.. what always made me wonder and I think has been asked many times. is why it stopped? It looked like from some of the posts that kaiser users were being encouraged to stick with the omnio as it was smoother.. better frame rates.

So I'm really looking forward to the next bit. even though its mostly development work from you and NuShrike, but it will be interesting to see how far we go in terns of performance.

the question has entered my head that maybe the integrated graphics chip was over-sold by htc and is maybe a crippled chip designed to do what its doing already and thus htc's reluctance to consider the provision of drivers, though I read somewhere it was more to do with licensing fees to Qualcomm.
[Touch Cruise ROM Development] NuShrike:
About the same. We have a code path that goes through ddF.dll and uses the ScreenUpdateByCopy() API which seems to prevent any leak/slowdown issues. I'll probably need to pick up that loaner from Jesse to debug a working ScreenUpdateByCopy() path.

However, that route is a bit mined as it pegs GLBenchmark HD frames at ~890ish score.

Using ExtEscape(), current score is ~1480ish or about 65% FPS improvement on the Kaiser (Touch Pro is at 990 score :eek:), so Polaris should get the equivalent improvement to the Kaiser.

Bally3: the d3dm_ati.dll uses OpenGL as its base API so there's probably some conversion losses going from Direct3D to OpenGL which then goes through the ahi2dati.dll layer for video memory management and then it comes back.

I'm betting the Billboard code is badly optimized too. The Omnia driver takes a different path and goes directly to DirectDraw which then goes through DDI.dll and then routes through ahi2dati.dll for video memory management.

So, Omnia is optimized for D3D, and d3dm_ati.dll is D3D emulation.

I had an app that was drawing a rotating 600 poly object in opengles before, and wasn't as laggy as Billboard, so I blame Billboard. :)

Kaiser driver dev was paused because we're working on other software projects. We have lives too..
[Touch Cruise ROM Development] rogro82:
I think we should look at the software drivers to find where it gets it performance... if you run spb benchmark you will see the dib is way faster using the software one.

btw performance:

my billboard runs somewhere between 2.5 and 2.77...
[Touch Cruise ROM Development] bally3:
rogro, is there any way we could speed up the performance even at the risk of stability to see whether we can push 10+ frames per second out of this driver as it currently is?
[Touch Cruise ROM Development] rogro82:
I think NuShrike knows more about this... but i think the simple answer is gonna be no...

( unless you want to install the software driver again :D )
[Touch Cruise ROM Development] bally3:
Well thank the lord for that! :)

Not withstanding... but I have plenty of faith in you two that the glass isnt empty till you say it is.. I'm sure theres a lot more mileage here.. but it would sure be nice to get a glimpse of it..

NuShrike, would you post up that app for me to test please?
[Touch Cruise ROM Development] bally3:
no way man...!'m strictly hardware.. no soft solution for me!

besides.. theres lots of naysayers both here and the Kaiser I'd like to see proven wrong!
[Touch Cruise ROM Development] bally3:
right.. I'm off guys.. thanks for a great enlightening evening.. I look forward to what you guys come up with next!

NuShrike, I'll pm jessew again tomorrow and ask him to contact you agan. I know he messaged you today and he pm'd me saying he was more than happy to send it to you.

Night all.. :)
[Touch Cruise ROM Development] rogro82:
Tomorrow another day... im off to bed now.