GraphicsPipelineState *ps changes back to default every time QSGMaterialShader::updateGraphicsPipelineState is invoked
-
We are trying to optimise function
updateGraphicsPipelineState(..)
to make sure that we only return true only when pipeline state changed. But we found that GraphicsPipelineState *ps always pass in the default value even if we set the blend values inside this function.
Also by looking at the source code qsgbatchrender.cpp, we found thatm_gstateStack.push(m_gstate);is pushing the default values ofm_gstatetom_gstateStack, is this correct? Shouldn't this push happen aftermaterialToRendererGraphicsState(&m_gstate, &shaderPs);so that the changed values are pushed into the stack?
Otherwise m_gstate = m_gstateStack.pop(); will just pop the default value right after new value is set to m_gstate, right?
Thanks.