Defold OpenGL state change cache

Is Defold caching render state changes so that if I set the same value twice it will only send the first to the graphics card driver, or should I keep track of the state enabling/disabling so that I don’t do unnecessary state changes?

In other words: is the render state enable/disable just a thin wrapper to opengl or is there more to it?