Perceiving, like imagining, remembering, speculating, inferring, etc., is a species of thinking.
Descartes: For any human mind, to think is to exist (cogito ergo sum).
In other words, when and while I am thinking, in the first person present tense mode, I must be existing.
Berkeley: For any human mind, to be (to exist) is to perceive (esse est percipere).
In other words, when and while I am perceiving in the first person present tense mode, I must be existing.
In my opinion, Berkeley's esse est percipere (to be is to perceive) and Descartes' cogito sum (while thinking, I am) are saying precisely the same thing.
To this extent Berkeley and Descartes are in agreement.
They both claim, each in his own way, that the existence or being of a human mind depends upon its perceiving or thinking.
However, Berkeley takes a major step beyond Descartes.
Unlike Descartes, Berkeley also claims the "esse" of every object of human perception depends upon its "percipi," i.e., the existence of every object depends exclusively upon its being perceived by a human mind.
However, Descartes was unable to go as far as Berkeley did because he claimed that, with the single exception of personal existence, the existence of all objects of human thought could not be indubitably certain.
In other words, for Descartes the performance of the esse est percipi (the to be is to be perceived) is neither existentially consistent nor existentially self-verifying, when and while I am performing it in the first person present tense mode, i.e., it cannot overcome hyperbolic doubt and, thus, is not indubitably certain.
Only the performance of the Cogito Sum is existentially consistent and existentially self-verifying, i.e., indubitably certain, when and while I am performing it in the first person present tense mode.