We present a general prescription by which we can systematically compute exact partition functions of five-dimensional supersymmetric theories which arise in Higgs branches of the $T_N$ theory. The theories may be realized by webs of 5-branes whose dual geometries are non-toric. We have checked our method by calculating the partition functions of the theories realized in various Higgs branches of the $T_3$ theory. A particularly interesting example is the $E_8$ theory which can be obtained by Higgsing the $T_6$ theory. We explicitly compute the partition function of the $E_8$ theory and find the agreement with the field theory result as well as the enhancement of the global symmetry to $E_8$.