mesa: only check errors when the state change in glLogicOp()