Let
$F$
be a totally real field in which
$p$
is unramified and let
$B$
be a quaternion algebra over
$F$
which splits at at most one infinite place. Let
$\overline {r}:\operatorname {{\mathrm {Gal}}}(\overline {F}/F)\rightarrow \mathrm {GL}_2(\overline {\mathbb {F}}_p)$
be a modular Galois representation which satisfies the Taylor–Wiles hypotheses. Assume that for some fixed place
$v|p$
,
$B$
ramifies at
$v$
and
$F_v$
is isomorphic to
$\mathbb {Q}_p$
and
$\overline {r}$
is generic at
$v$
. We prove that the admissible smooth representations of the quaternion algebra over
$\mathbb {Q}_p$
coming from mod
$p$
cohomology of Shimura varieties associated to
$B$
have Gelfand–Kirillov dimension
$1$
. As an application we prove that the degree-two Scholze's functor (which is defined by Scholze [On the
$p$
-adic cohomology of the Lubin–Tate tower, Ann. Sci. Éc. Norm. Supér. (4) 51 (2018), 811–863]) vanishes on generic supersingular representations of
$\mathrm {GL}_2(\mathbb {Q}_p)$
. We also prove some finer structure theorems about the image of Scholze's functor in the reducible case.