From: Viral P. <Vir...@an...> - 2009-08-12 18:11:19
|
That does look like you are hitting the timer resolution threshold. You might want to try: QueryPerformanceFrequency QueryPerformanceCounter For high resolution timing. Something like: inline __int64 currentTime() { LARGE_INTEGER li; QueryPerformanceCounter(&li); return li.QuadPart; } inline __int64 counterFreq() { LARGE_INTEGER li; QueryPerformanceFrequency(&li); return li.QuadPart; } const __int64 start = currentTime(); ... STUFF const __int64 totalTime = currentTime() - start; if (time == 0) return 0; double msec = double(time) / double(counterFreq()) * 1000.0; From: Karl Schultz [mailto:kar...@gm...] Sent: 12 August 2009 18:27 To: vinit bansal Cc: mes...@li... Subject: Re: [Mesa3d-users] Regarding Performance in Mesa Are you using the Mesa windows (gdi) driver? It is 100% software, so performance will be slow. Also, if you are on Windows, the standard timer is very low resolution. If I remember right, that timer has about a 16 ms period, which may explain the values you are getting. If you want higher resolution, then use the multimedia timer, or time things that take longer. On Tue, Aug 11, 2009 at 10:52 PM, vinit bansal <ban...@gm...> wrote: Hi Brian, Actually i wrote a wrapper for all opengl-es functions so that it'll call our gl fuction only. for ex for glorthox, internally in my wrapper i'll call glotho only. this way i m able to run my opengl-es program using MESA .. :D:D My aim is , I want to know how much time my WGL calls are taking. So i used clock function. here is my code: long start,end,time; start = clock(); wglcreatecontext(); end = clock(); time = end-start; fprintf("print this time in file"); same i did for wglmakecurrent/glreadpixels etc ... prob is , i am drawing a single frame again and again still i m getting every time diff value. please find my attach logs. for glreadpixels: glreadpixels : 0.000000 mSec glreadpixels : 16.000000 mSec glreadpixels : 16.000000 mSec glreadpixels : 0.000000 mSec glreadpixels : 0.000000 mSec glreadpixels : 16.000000 mSec glreadpixels : 0.000000 mSec glreadpixels : 15.000000 mSec glreadpixels : 16.000000 mSec glreadpixels : 0.000000 mSec glreadpixels : 0.000000 mSec glreadpixels : 16.000000 mSec glreadpixels : 0.000000 mSec glreadpixels : 16.000000 mSec glreadpixels : 0.000000 mSec glreadpixels : 16.000000 mSec for wglCreateContext and wglMakeCurrent: wglCreateContext : 0.000000 mSec wglMakeCurrent : 16.000000 msec wglCreateContext : 0.000000 mSec wglMakeCurrent : 16.000000 msec wglCreateContext : 0.000000 mSec wglMakeCurrent : 0.000000 msec I dont know why this time is different in each call? Best regards Vinit On Tue, Aug 11, 2009 at 8:14 PM, Brian Paul <br...@vm...> wrote: vinit bansal wrote: Hi All, I tried some opengl 2.0 es example using MESA. I am able to render it properly but performance is not so good. Is there any flag i need to enable to use optimized performance from Mesa? What is the meaning of performance data ? What all it should include? So you're using the opengl-es branch? You're probably using the "softpipe" gallium driver. What kind of GPU do you have? -Brian ------------------------------------------------------------------------ ------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mesa3d-users mailing list Mes...@li... https://lists.sourceforge.net/lists/listinfo/mesa3d-users |