10. (20 points) Given that $m$ is a constant, the function
$$
f(x)=\sin ^{4} x+m \sin x \cdot \cos x+\cos ^{4} x
$$

has a range of $\left[0, \frac{9}{8}\right]$. Find the value of $m$.
10. From the problem, we know
$$
f(x)=1+\frac{m}{2} \sin 2 x-\frac{1}{2} \sin ^{2} 2 x \text {. }
$$

Let $t=\sin 2 x(-1 \leqslant t \leqslant 1)$. Then
$$
\begin{array}{l}
f(x)=g(t)=1+\frac{m}{2} t-\frac{1}{2} t^{2} \\
=-\frac{1}{2}\left(t-\frac{m}{2}\right)^{2}+\frac{m^{2}+8}{8} .
\end{array}
$$

If $-1 \leqslant \frac{m}{2} \leqslant 1$, then
$$
\frac{m^{2}+8}{8}=\frac{9}{8} \Rightarrow m= \pm 1 \text {. }
$$

When $m=1$, the minimum value of $f(x)$ is $g(-1)=0$, which meets the requirement;

When $m=-1$, the minimum value of $f(x)$ is $g(1)=0$, which meets the requirement.
If $\frac{m}{2}>1$, then
$$
\left\{\begin{array} { l } 
{ g ( 1 ) = \frac { 9 } { 8 } , } \\
{ g ( - 1 ) = 0 }
\end{array} \Rightarrow \left\{\begin{array}{l}
1+\frac{m}{2}-\frac{1}{2}=\frac{9}{8}, \\
1-\frac{m}{2}-\frac{1}{2}=0
\end{array}\right.\right.
$$
$\Rightarrow$ there is no value of $m$;
If $\frac{m}{2}<-1$, then
$$
\left\{\begin{array} { l } 
{ g ( - 1 ) = \frac { 9 } { 8 } , } \\
{ g ( 1 ) = 0 }
\end{array} \Rightarrow \left\{\begin{array}{l}
1-\frac{m}{2}-\frac{1}{2}=\frac{9}{8}, \\
1+\frac{m}{2}-\frac{1}{2}=0
\end{array}\right.\right.
$$
$\Rightarrow$ there is no value of $m$.
In summary, $m= \pm 1$.