c++ - CPU Usage during glFinish() -
context : measuring cpu usage during graphical rendering of qt test application. rendering done via qt quick module, makes use of dedicated scene graph based on opengl.
environment : run tests on mobile panel running windows ce , track cpu activity celog event tracker.
problem : when qquickwindow emits signals afterrendering() , frameswapped(), call glfinish() function. since glfinish() job wait previous opengl commands complete, understand cpu should waiting gpu complete tasks. , therefore expected have low cpu usage during call. however, not observe celog tracker. can observe that, during glfinish() time frame, threads belonging test app still using cpu. , in end cpu usage in same range rest of rendering loop.
so wondering, there explanation cpu being used while glfinish() running ?
opengl employs asynchronous execution model. opengl commands queued in render command pipeline , pipeline may not executed @ , queued commands lay dormant until pipeline execution forced flushing pipeline glflush
or making synchronizing opengl call, causes implicit flush , wait glfinish
(or …swapbuffers
).
hence it's not surprising if things busy on cpu , gpu after call glflush
.
Comments
Post a Comment