  A deformation of the N=2 topological string partition function is analyzed by
considering higher dimensional F-terms of the type W^{2g}*Upsilon^n, where W is
the chiral Weyl superfield and each Upsilon factor stands for the chiral
projection of a real function of N=2 vector multiplets. These terms generate
physical amplitudes involving two anti-self-dual Riemann tensors, 2g-2
anti-self-dual graviphoton field strengths and 2n self-dual field strengths
from the matter vector multiplets. Their coefficients F_{g,n} generalizing the
genus g partition function F_{g,0} of the topological twisted type II theory,
can be used to define a generating functional by introducing deformation
parameters besides the string coupling. Choosing all matter field strengths to
be that of the dual heterotic dilaton supermultiplet, one obtains two
parameters that we argue should correspond to the deformation parameters of the
Nekrasov partition function in the field theory limit, around the conifold
singularity. Its perturbative part can be obtained from the one loop analysis
on the heterotic side. This has been computed in [1] and in the field theory
limit shown to be given by the radius deformation of c=1 CFT coupled to
two-dimensional gravity. Quite remarkably this result reproduces the gauge
theory answer up to a phase difference that may be attributed to the
regularization procedure. The type II results are expected to be exact and
should also capture the part that is non-perturbative in heterotic dilaton.
