  In previous work, we used new mathematical relations between Gopakumar-Vafa
(GV) invariants and rank 0 Donaldson-Thomas (DT) invariants to determine the
first few terms in the generating series of Abelian D4-D2-D0 indices for a
class of compact one-parameter Calabi-Yau threefolds. This allowed us to obtain
striking checks of S-duality, namely the prediction that these series should be
vector-valued weakly holomorphic modular forms under $SL(2,\mathbb{Z})$. In
this work, we extend this analysis to the case of D4-D2-D0 indices with two
units of D4-brane charge, where S-duality instead predicts that the
corresponding generating series should be mock modular with a specific shadow.
For the degree 10 hypersurface in weighted projective space
$\mathbb{P}_{5,2,1,1,1}$, and the degree 8 hypersurface in
$\\mathbb{P}_{4,1,1,1,1}$, where GV invariants can be computed to sufficiently
high genus, we find that the first few terms indeed match a unique mock modular
form with the required properties, which we determine explicitly. Turning the
argument around, we obtain new boundary conditions on the holomorphic ambiguity
of the topological string amplitude, which in principle allow to determine it
completely up to genus 95 and 112, respectively, i.e. almost twice the maximal
genus obtainable using gap and ordinary Castelnuovo vanishing conditions.
