From Farshid Lashkari, "I'm working on a custom ShaderComposer? and I need access to the full StateSetStack? of the State object within the getOrCreateProgram() method. The problem is that "State::apply(const StateSet?* dstate)" does not add the specified stateset to the stack. I'm not sure if this was intentional, but I've updated the function to push/pop the stateset.
I hope the change seems reasonable. I searched the entire code base for code that accesses the StateSetStack?, and noticed RenderBin? and RenderStage? use it. However, I don't think that code would ever be called from within the State::apply() function, so I'm fairly confident the change should be safe."