alphan
05-13-2005, 12:25 AM
Hi,
I have developed a GPU based ray casting system. The system itself consists of several fragment programs (kernels) executed in a loop. I need exact timing of each kernels. In order to be as precise as possbile I count cpu ticks (using RDTSC instruction). On the other hand;
startTimer
doSomeGlStuff
endTimerimmediately returns and gives incorrect results, as the GPU handles operations concurrently.
To remedy, I instead use
glFinish() // to finish any pending gl operations
startTimer
doSomeGlStuff
glFinish() // ditto
endTimerglFinish() functions here may adversely affect the overall performance though.
My question; is this the correct way to measure the performance, or are there better more precise ways ?
Thanks
I have developed a GPU based ray casting system. The system itself consists of several fragment programs (kernels) executed in a loop. I need exact timing of each kernels. In order to be as precise as possbile I count cpu ticks (using RDTSC instruction). On the other hand;
startTimer
doSomeGlStuff
endTimerimmediately returns and gives incorrect results, as the GPU handles operations concurrently.
To remedy, I instead use
glFinish() // to finish any pending gl operations
startTimer
doSomeGlStuff
glFinish() // ditto
endTimerglFinish() functions here may adversely affect the overall performance though.
My question; is this the correct way to measure the performance, or are there better more precise ways ?
Thanks