yashsingh1/xdaforums huggingface dataset:
[Touch Cruise ROM Development] bally3:
It does work.. theres no more scrolling or freezing.. but this is only to test what works and what doesnt.. I would be VERY suprised, and only if the gpu is bitterly crippled - and granted that in itself isnt outside the realms of reality where htc are concerned - if hardware aceleration was SLOWER than software optimised drivers it would be the first time I've ever heard of it..thats for sure.. then again.. when I think about graphic chips I usually think of graphic cards which in essence this is not.. so we will wait and see.. but I'm very confident it can only get better from on here.
[Touch Cruise ROM Development] NuShrike:
Does Triangle.exe from the HTC-CA drivers pack work? This is the simplest OpenGL test.

White screen means full-screen updates is broken. It was fixed by hex-editing libgles_cm.dll (now libgles_cm_ks.dll) to always run in Windowed mode, and should be the one I just uploaded.

Lights.exe is D3D which does some special initialization of the OpenGL drivers it depends on (if using the default HTC-CA/ATI drivers -- Omnia driver directly uses DirectDraw).

Scrolling might be caused by msm_clk.dll. I'm not sure which dll has the LCD driver in it.
[Touch Cruise ROM Development] NeoS:
This is gonna take a while... I'll need to soft reset after every file i add. :S
[Touch Cruise ROM Development] bally3:
I've just ran the Mesh program... and its not as fluid as the omnio driver... but its much more vivid.. of course this could be placebo but I did look at it closely.
[Touch Cruise ROM Development] NuShrike:
Until you understand which files is the set you need and then no more! :D
[Touch Cruise ROM Development] bally3:
Triangle works.. works great actually...much more smoother than the mesh program..

But theres some crashing going on.. mesh rebooted my polaris after running for a few minutes... and triangle.exe froze after a minute or so.
[Touch Cruise ROM Development] NeoS:
AHA! It's the libgles from the KS that's not checked with the dll checker. Pure timings then? :)
[Touch Cruise ROM Development] NeoS:
Confirmed working. Nice job guys! Only my GLBench won't run anymore... Let's see if we can fix that.

I made a new set of files that should work. Now it only needs to be set in a .cab for testing purposes to speed up the progress.
[Touch Cruise ROM Development] bally3:
basically the only files we need are the ones that dll checker doesnt complain about...currently the ones it does complain about are:

ahi2dati.dll

ahi2dati_dm.dll

d3dm_ati.dll

libgles_cm.dll

msm_clk.dll

trsTai_extensioF.dll

wce_pmeF.dll

wce_reF.dll

wce_rex_dm.dll

clkregim.dll (cant remember if it asked me for this)

all others it does not need... but the zipped CA dlls that Neos gave me also had ddF.dll ... could this be the offending file?
[Touch Cruise ROM Development] bally3:
aah.. maybe I'm wrong then.. it was a few hours ago.. but then again.. you copied OVER the libgles_ks file didnt you? and it still didnt work...
[Touch Cruise ROM Development] bally3:
Neos .. get that video posted up will ya..I dont have a youtube account.. and sides .. I have to go to bed..

so its ALL in your hands till tomorrow.. tell NikMel and rogro to follow my instructions to the dot..

NuShrike, thank you very much for your help so far mate.. if you ever in england and come up north.. I'll buy you a pint.. lancashire style ;)
[Touch Cruise ROM Development] bally3:
Neos, mate .. get back to me with the test as soon as please so I can do some testing tomorrow.. I'll wait up another five minutes or so while I smoke my celebretory ciggy... :cool:
[Touch Cruise ROM Development] NeoS:
I'm gonna smoke one to. cheers.

Anyways, I'm making a cab of it, with the registry tweak. One click install mate! ;)

And i'll make a vid afterwards. You just make sure you post it in your first post tomorrow.
[Touch Cruise ROM Development] NuShrike:
ddF.dll is a stability and optimization patch that replicates the ScreenUpdateByXXXX functions from ddi.dll so which version of ddi (past 3.28+ such as 3.57) didn't matter anymore.

Your system going unstable after a few minutes would be the same as when we used the same method on the Kaiser. Maybe it pushes the GPU too hard, or it abuses DDI/WinCE too much because we're forcing it to update instead of letting it decide.
[Touch Cruise ROM Development] bally3:
Good idea about the cab, but whaterver you do, do not post it up just yet.

until its properly tested and working I dont want anyone to be given a cab from us yet. Last thing I want is "it broke my polaris" complaints. If anyone downloads the other files and follows the instructions and it causes damage, thats there perogative.. We've posted enough that this is for 3D development and not the finished product. Pass it onto NikMel and the others.. ask NikMel to create a working rom for us to start testing with.

I'm off to bed.. wheres that benchmark proggie?
[Touch Cruise ROM Development] bally3:
Ok..understand better about the ddF file.. still not sure what else we had that caused it not to run for the others before but at least we know what works.

So this method isnt going to be the final method if I understand correctly?
[Touch Cruise ROM Development] NeoS:
Ah, k. Won't post anything yet.

GLBench won't run anymore, like NuShrike said: It won't run fullscreen, so it won't run at all. I'll do what i can though. But i need my beautysleep, so i'll probably make all the stuff tomorrow.

Heads up, we're getting there faster than we could ever imagine!
[Touch Cruise ROM Development] DarkPower:
By the way, I'm interested in the cab. :)

Maybe by MP.

Thx
[Touch Cruise ROM Development] NuShrike:
Did GLBench used to run, just the screen rolled?

Bally3: this could be one method as long as it stays stable. It's a good step since it proves the 3D hardware on the Polaris can be accessed too. For something production, let's see why the rolling even happens at all.
[Touch Cruise ROM Development] NeoS:
No, it ran perfectly. No rolling. And damn fast too. I posted a video about it here.
[Touch Cruise ROM Development] bally3:
it runs swapbuffers and HD ES etc..but crashes around the 3D rendering sub pixel bit. bt all the tests run fine.. cant see the results as you have to post them to some of the tests give a black screen.
[Touch Cruise ROM Development] bally3:
Lights Parallel x 2 x 4 x8 dont run - black screen.
[Touch Cruise ROM Development] NeoS:
I'll post the results, running benchmark now.
[Touch Cruise ROM Development] bally3:
Thats good to know.. hope you'll stick around and help us get to the end of this NuShrike.. and thanks once again :)

Right.. off to bed.. i'm up in 6 hours to go to work.. not good :rolleyes: night all!
[Touch Cruise ROM Development] NuShrike:
Wow, I just saw that video.

Okay, let me try to understand. So that setup was:

default Polaris 3.13 rom?

you added Kaiser ddi.dll 3.28

latest HTC-CA drivers

and then GLBenchmark ran just fine but Lights.exe rolled? I feel like I took you guys backwards a few steps just to get D3D working when OpenGL was working just fine. Need to think about this some more. I know the HTC-CA drivers don't work too well with cooked roms.

For GLBenchmark, you should let it run all the way to finish. There'll be quite a few black screens where that particular test fails, but it'll still run through all of them to finish.
[Touch Cruise ROM Development] NeoS:
Almost. I'm using udK's Syrius R0 with ddi.dll 3.28 and HTC CA drivers in that video.

New benchmark i just did was almost exactly the same.
[Touch Cruise ROM Development] NuShrike:
Same rom, same files, no ddF.dll, and just my new libgles_cm pack?

Need to figure out if ddF.dll is causing the rolling problems then.
[Touch Cruise ROM Development] Dave_Kjam:
Did you guys noticed the MSM7500 driver and our Polaris has the MSM7200 chip?
[Touch Cruise ROM Development] NuShrike:
In the KaiserGL SDK thread, the BREW docs explain that MSM7500 names a specific Qualcomm 3D chip technology generation being used (Convergence), not which MSM cpu.
[Touch Cruise ROM Development] SomethingWicked:
@NuShrike: are you interested in a loaner polaris? I pm'd you but didnt get an answer. You are welcome to mine for testing if you wish... It's starting to sound like you all may about have this whipped, but the offer stands. Appreciate your help in the project... :)
[Touch Cruise ROM Development] SomethingWicked:
I hate to look like a dumb-@$$, but sometimes the answer is... could the scrolling have anthing to do with v-blank? I know flickering does, but...

jesse
[Touch Cruise ROM Development] speed_pour:
i'm not sure i would blame it on pushing the GPU too hard unless there is some noticeable heat.

In my experience, the most common cause of crashing after a period of time like that should be related to a memory leak. I've also noticed that drivers that make use of non-system memory (i.e. video ram) may have flaws in the way they are managing memory and/or the addressing of that memory. This theory is generally tough to prove, and harder to fix...but it also would seem more likely given that it's using drivers that aren't written expressly for this hardware combination.

Take note, i've never done 3d programming or serious driver development. On that note, if there's anything in the way of coding that you guys need, soon i'll have a little bit of time to help out on this project.
[Touch Cruise ROM Development] NuShrike:
Yes, most likely, although it could be leaking handles, OS/WinCE issues. It's hard to tell.

JesseW: ya, maybe something to do with the LCD timing. Anybody experienced with LCD driver timing?
[Touch Cruise ROM Development] rogro82:
Can it be there has to be a releasedc or something?
[Touch Cruise ROM Development] NeoS:
Here we are:

http://www.youtube.com/watch?v=58PFxhIVeE0

To accomplish this, copy ddi.dll (v.3.28) to your windows directory.Then extract the htc ca.cab and copy all file but the libgles_cm files to your Windows directory. Set HKLM\system\D3DM\Localhook=d3dm_ati.dll.

And last but not least, copy the dll files uploaded by NuShrike and soft-reset your device.

Again, we're not responsible for any damage to your device in any way. You try this at your own responsibility.
[Touch Cruise ROM Development] joergswa:
Ok, that seems to be a breaktrough?! When it is possible to use it without risk to brick the Device? Is this with a effect to watching Videos on the Polaris or may use the TFL 3D from Diamond on our Device?
[Touch Cruise ROM Development] rogro82:
Nive vid... your fingers arent really touch friendly though :D

I really finally feel we are getting somewhere...

Are there any outstanding issues i can/need to put my eyes on? Or should we focus on perfomance?? Just let me know...
[Touch Cruise ROM Development] benleonheart:
zomg!

That really is nice...

Just, hands down to all the testers that wouldnt mind bricking a Polaris...

*takes hat off*

:)
[Touch Cruise ROM Development] NikMel:
Looks really promissing!!!

Nice done guys!!:D
[Touch Cruise ROM Development] udK:
uhuh that's nice, very impressive ;)

I will try some test today.
[Touch Cruise ROM Development] NeoS:
Wait till you see this:

http://www.youtube.com/watch?v=495ZJZssnMc

Yes, that's something else, isn't it?

3 FPS. Oh well.

Interesting fact:

If you've seen my earlier video of Manila, you'll see with the scrolling issue, but i have a much higher FPS.

Something we should look at?
[Touch Cruise ROM Development] SaBo:
Pretty impressive.

This looks real promising!

Thanks for all the combined effort you put into this.

Sascha
[Touch Cruise ROM Development] rogro82:
NeoS can you make a cab file of it so we dont have to look for all the files everytime we need a hardreset :D happens to me a lot during development and i have so many files now... and cant keep track of every file at home and at work :D
[Touch Cruise ROM Development] NeoS:
Will try as soon as i get home. I don't have the files @work. So it'll be another 5 hours before i can make it.
[Touch Cruise ROM Development] ouioui01:
congratulations to the team ;-))

wow! i'm three days off.....and how many changes !!!!!
[Touch Cruise ROM Development] soterman:
Very very impressive work boys... keep it up!
[Touch Cruise ROM Development] radem205:
Good work guys! How can it be that the cube is working flawless, but the simple manilla clock doesn't?
[Touch Cruise ROM Development] ouioui01:
maybe because manilla's using it's own libgles_cm.dll

i tried it with manilla.exe copied to manilla folder and delete libgles_cm from the folder....as it was said in HTCClass. site and the clock works flawless ;)
[Touch Cruise ROM Development] iseeka:
can u post a vid? great work!
[Touch Cruise ROM Development] imfloflo:
Really nice work, and if udK looks the videos too interesting :).

If i can help.. I'm in .

lol : In the lastest video we ca see another manilla in the reflect of the polaris . you recorde this vid with an HTC diamond ?
[Touch Cruise ROM Development] whitealien:
It seems that memory is not freed. It loads one frame in memory and don't unload it and then loads next frame in another place in memory and so on untill you get out of memory or start overwriting system memory parts and get crushed.

wce_pmeF.dll uses two functions to allocate and free memory. Maybe cause is there. Just speculating.

P.S. Neo watch out, I saw your boss walking behind you :D

Yeah, and nice work guys, gz. Even udK is impressed :)
[Touch Cruise ROM Development] bally3:
Hey people..

Just a reminder that this is still a work in progress and as NuShrike mentioned earlier we still have a lot of changes to make so please be patient for a little while longer.

Thanks for posting the vid Neos btw.. and what did you benchmark?. :)
[Touch Cruise ROM Development] rogro82:
It shouldnt be a public cab to try out if its working but just something to know everyone is working on the same thing and not using different files ;)

We need to make some kind of versioning else development will be a *****...
[Touch Cruise ROM Development] NeoS:
You're right. I guess Bally3 started this thread, so he'll be the one to round up the team of testers.

And here's full speed manila on Polaris: http://www.youtube.com/watch?v=PkrfXvnKIew

I forgot to replace the .exe and libgles. lol.
[Touch Cruise ROM Development] benleonheart:
z.o.m.g.:eek:
[Touch Cruise ROM Development] radem205:
Nice man, beatiful job!! It's working flawless now, or not?
[Touch Cruise ROM Development] whitealien:
Very funny how it slows down at the end :D
[Touch Cruise ROM Development] NeoS:
That's normal. When the clock is synchronizing it slows down when it's nearly complete.
[Touch Cruise ROM Development] eduran:
Nice work you guys! Congrats!

Any thing i can contribute, just name it!

Cheers

EDLL
[Touch Cruise ROM Development] boart:
Im really impressed what u guys where doing here... great! And it seems as if here is a great community too!

If i would have some free days next time i would love to become a helper of u. But im busy right now, so im just watching... and... again: GOOD JOB BOYS!! Stay motivated. We are setting all hopes in you!
[Touch Cruise ROM Development] ouioui01:
@ Neo

who do you find your battery drain ? :confused:

faster than before ?

cheers
[Touch Cruise ROM Development] rogro82:
battery drain?? whats that... my device is constantly connected via active sync to debug using vs :D
[Touch Cruise ROM Development] NeoS:
No, not at all. Normal. But I soft reset after rigorous testing.

It might be that if you did alot of testing, that some instructions aren't stopped correctly, that the battery is drained faster. I don't have it (yet) though.
[Touch Cruise ROM Development] twotimer:
First of all, thank you all guys for dedicating you time to this uneasy quest :).

My question might seem to be a bit ahead of the time, but did anybody of you guys tried to compare the performance of some real-life apps with the new drivers you use?

Synthetic benchmarks are undoubtedly useful for quick tests and debugging, however we would all like to see the performance increase in other graphics-related apps, say TomTom for example.

Here's an old video with comparison of TT demo speed on Magician and Kaiser: http://uk.youtube.com/watch?v=zIJWAu6IRe4

I wonder if TomTom (6 or 7) would run smoother on tweaked devices, 'coz on my XDA Orbit2 with De_At_Ch map it runs at painfull 3-4 fps. This might be due to the map size though, 'coz on the map of Italy it yields at least twice the frame rate.
[Touch Cruise ROM Development] rogro82:
NuShrike i just used RemoteSpy to track the messages send to the window. I see a loop of wm_paint AND wm_erasebkgnd messages..

Is it possible to not make the wm_erasebkgnd invalidate the screen? because this will actually make the screen redraw itself twice during one update... Or can it be that the SetPixel is triggering this?

If we can find a way to not make the background update everytime i think there will be a massive performance gain....
[Touch Cruise ROM Development] NeoS:
TomTom doesn't use 3D, so it won't be performing better than usual.

About the performance in the D3DMdemo, if you keep it running long enough it will slow down until it totally stops and holds up your device. So there's alot of "leaking" memory.
[Touch Cruise ROM Development] NuShrike:
By George, I think you found it. I didn't do a ReleaseDC()! It would certainly explain the slowdown when initially tested with GLUTce back in July.

How do I get the current HWND now? I'm guessing NULL.

Generally, the app would have to be written to ignore WM_ERASEBKGND. The other way is to trigger DDI to update directly with a ExtEscape() command. This is why it's so important I have it down exactly which DDI.dll is active.

The previous ExtEscape() command I gave should have worked with DDI 3.28+ installed. It worries me because you said it doesn't.
[Touch Cruise ROM Development] rogro82:
It should allow NULL for the current hwnd... update the wrapper and i will try :)

Maybe the apps are allready ignoring the wm_erasebkgnd, havent looked into it...
[Touch Cruise ROM Development] NuShrike:
updated libgles wrapper

Okay, current code:

HDC hdc = GetDC(NULL);

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

::ReleaseDC(NULL, hdc);

I've also turned off the dependency on ddF.dll in libgles_cm_ks.dll. If this causes problems, just switch back to the previous libgles_cm_ks.dll.

edit:

libgles_cm_ks.dll now looks for a ddX.dll which won't exist and stopping the scrolling problem (for now).

edit:

retired in favor of _03 patch

polaris20080925_01.zip (113.0 KB, 22 views)
[Touch Cruise ROM Development] rogro82:
Yep using the new libgles_cm_ks will cause the scrolling so using the old one and using the new libgles_cm....

results so far look promising... can someone else do some tests?

Reminder: do not use the libgles_cm_ks included in the new zipfile ;)
[Touch Cruise ROM Development] NuShrike:
All the HTC-CA .dlls are versioned. :)
[Touch Cruise ROM Development] NuShrike:
Tweaked/fixed. We can now almost isolate the scrolling to DDI.dll.

Since DDI.dll and disptools.dll come as a pair, has anybody tried dropping the Kaiser's disptools.dll in too. I hate to suggest this without disassembling first, but why not jump in the pool then swim. ;)
[Touch Cruise ROM Development] rogro82:
Are u catching up on old posts :D

Triangle remains at same fps now :D it says 318 but dont know if its foolin me ;)
[Touch Cruise ROM Development] NuShrike:
Just woke up over here. :) So, same ridiculous rates on the Kaiser too, but check GLBenchmarks. Besides, it's only 1 triangle. It better be updating that fast.

This update method was abandoned previously because of the leak problem, but also slower FPS in the benchmark. Maybe it's solved now and people can get that July 22 speed back. :P

edit: totally ridiculous rates in GLBenchmark

on the Kaiser it went from:

GLBenchmark HD ES 1.0 :	830 Frames

GLBenchmark Pro ES 1.0 :	78 Frames

to

GLBenchmark HD ES 1.0 :	1431 Frames

GLBenchmark Pro ES 1.0 :	79 Frames

And all the triangles (for failed tests) that used to peak at 500K triangles / sec are now peaking at 2 million triangles / sec. Makes me wonder if the default (system approved) update path has some VBL stall programmed into it, or this is the driver thinking we're full-screen (not windowed).

Fine by me! This is almost a 2x increase in FPS. We might need to manually slow down the FPS so it doesn't chew up the battery! ;) And, it blows away the Touch Pro/Diamond also.
[Touch Cruise ROM Development] rogro82:
cant we just do a sendmessage wm_paint to the screen so it updates? or isnt that working?
[Touch Cruise ROM Development] NuShrike:
It's DDI/GDI that has to do all the actual hardware calls for screen updating. WM_PAINT is only asking the app what it wants updated.
[Touch Cruise ROM Development] bally3:
Evening everyone.. :)

Just got in from work and catching up on the posts. Rogro82, I agree versioning is a good idea.

Neos, make the cab version 0.0.1 and increment as we go along please (gives us some manouvering if it takes longer than we expected! ;)

I've cleared the first post and will start updating our progress on there as we get the cabs out.

You guys seem to be cracking on with this so I'll do a bit of reading and testing for a bit I think!

Just as a general update though, I've had the files running all day and I've been surfing and playing.. I mean testing ( ;) ) all day too.. no crashes and no heat problems so far.. phone working same as usual.
[Touch Cruise ROM Development] bally3:
Just tested the new file with Billboard fps - got average 3.5 fps and ran for about three minutes then froze.so we still got leaks somewhere.
[Touch Cruise ROM Development] NeoS:
You guys update the package too fast! :D

Seriously, please pm me the files needed so i can make a proper cab package. Secondly, i'm trying to get that d3dm_ati.dll regtweak in there but it won't work for some reason...

By the way, Bally3, will you for a test / dev team for this? So we can actually share stuff? oh and give the project a proper name, so i can add it in the cab.
[Touch Cruise ROM Development] NeoS:
And another problem here. I can't add ddi.dll to the cab. It's in use by the device, so it won't update. Any ideas?
[Touch Cruise ROM Development] bally3:
Project Name: Polaris Project P3D

CAB Name: Polaris CA Kaiser Port P3D Driver

(dont want to steal someones else's efforts)

Development and Testing Team: Bally3, NikMel, Neos2007, NuShrike, Rogro82

Bally3 - Development, Testing and updates

NikMel - ROM updates, development and Testing

Neos2007 - CAB updates, videos, Testing

NuShrike - Development

Rogro82 - Development and Testing

Other testers will be brought on as we move along. Please PM me if you want to be a tester to avoid flooding this thread with pointless postings.

JesseW - can you take up the cudgels on the design front please?

I'll PM you with what I need. (and yes you still get credit for making the offer ;)

I'll update this info on the front of the site, NikMel can we version the ROMS from 0.1 please? so that would place us on ver. 0.2 - I think we should look for a ver 1 release when the project is completed.
[Touch Cruise ROM Development] bally3:
Would you be able to do a double install as it were? add htc_d3dm.dll and change the localhook to that then force reboot... overwrite ddi.ddl and install rest of files?
[Touch Cruise ROM Development] HRQ.SLV:
Sorry to interrupt your work guys, but just a thought:

Shouldn't this thread be STICKY

Keep up the good work!

P.S.: my F5 is on fire!:D
[Touch Cruise ROM Development] NuShrike:
new current code:

HWND hwnd = ::GetForegroundWindow();

HDC hdc = ::GetDC(hwnd);

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

::ReleaseDC(hwnd, hdc);

Got BillboardFPS to run over 7 minutes, then I gave up. I'm not convinced it fixes D3D/leak problems though. The Omnia D3D is faster anyways, however OpenGL-ES certainly smokes now.

polaris20080925_02.zip (113.0 KB, 15 views)
[Touch Cruise ROM Development] bally3:
Thats excellent NuShrike! :)

does that mean yo know what might be causing the leak?