Jump to content

  • Log In with Google      Sign In   
  • Create Account


Opengl Device not cheap to set new values


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 fanaticlatic   Members   -  Reputation: 458

Like
0Likes
Like

Posted 22 May 2012 - 08:05 AM

Hello,

I have analysed my engines performance using gDebugger and it shows me a number of warnings about changes to the underlying opengl state not being cheap. From my understanding the engine should store local copies of opengl states and check against these before calling the opengl state setter functions, we currently just call the setters even if the value is the same. Does anyone have any numbers on how much an opengl renderer can be improved by doing this; obviously a lot will depend on the types of calls the engine makes over several frames.

I'd be interested to know if this is an area I should look to implement to improve engine performance before other things.
"I have more fingers in more pies than a leper at a bakery!"

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 6748

Like
1Likes
Like

Posted 23 May 2012 - 06:30 AM

Some thoughts.
Most state changes are only enqueued into the command queue at the time you call the API. The state, once your command will be executed, is not known yet. Therefore it will most probably results in a larger command queue than necessary.

The assumption how a API works, is always risky. The same argument could be turned around: the developer knows what to call and the driver don't need to double check it (better performance). But this depends on the driver implementation as long as it has not been explicitly defined in the API.

Edited by Ashaman73, 23 May 2012 - 06:31 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS