12. The range of negative values of $a$ that make the inequality $\sin ^{2} x+a \cos x+a^{2} \geqslant 1+\cos x$ hold for all $x \in \mathbf{R}$ is $\qquad$
Solve:
$\sin ^{2} x+a \cos x+a^{2} \geqslant 1+\cos x \Rightarrow \cos ^{2} x+(1-a) \cos x-a^{2} \leqslant 0$ always holds. Let $t=\cos x \in[-1,1]$, then $t^{2}+(1-a) t-a^{2} \leqslant 0$ for all $t \in[-1,1]$. Therefore, $\left\{\begin{array}{l}1+(1-a)-a^{2} \leqslant 0, \\ 1-(1-a)-a^{2} \leqslant 0\end{array} \Rightarrow\left\{\begin{array}{l}a^{2}+a-2=(a-1)(a+2) \geqslant 0, \\ a^{2}-a=a(a-1) \geqslant 0\end{array}\right.\right.$ $\Rightarrow a \geqslant 1$ or $a \leqslant-2$. Therefore, the range of negative values for $a$ is $(-\infty,-2]$.