What: Shares of graphics chip company NVIDIA (NVDA -3.33%) surged 12.7% in August, according to S&P Capital IQ data. A weak PC market wasn't enough to derail NVIDIA's second-quarter results, and the company handily beat analyst estimates for revenue thanks to growth in its gaming business.

So what: NVIDIA reported second-quarter revenue of $1.15 billion on Aug. 6, up 5% year-over-year and about $140 million higher than analysts were expecting. NVIDIA had previously guided for a substantial revenue decline, but strong sales of its gaming GPUs were able to counteract an extremely weak PC market.

NVIDIA's gaming revenue, which is mostly comprised of its GeForce GPUs, increased by 59% year over year during the second quarter. The performance of the gaming PC market has turned out to be completely detached from the performance of the PC market as a whole, largely shielding NVIDIA from PC weakness. NVIDIA's lead over rival AMD increased, with NVIDIA shipping over 80% of all discrete graphics cards during the second quarter.

NVIDIA did report a substantial decline in earnings, but two one-time charges were the main culprits. NVIDIA took a $0.19-per-share charge to wind down its Icera modem business, and another $0.02 per-share charge related to its recall of SHIELD tablets. On a non-GAAP basis, NVIDIA's earnings grew by 13% year over year to $0.34 per share.

Now what: NVIDIA's ability to grow revenue despite the PC market slump is impressive. Other parts of NVIDIA's business didn't perform as well, however. Sales of NVIDIA's Tesla graphics cards, which are used in supercomputing and HPC applications, declined year over year, as did sales of Tegra, NVIDIA's mobile SoC. In a way, this makes the performance of NVIDIA's gaming business even more impressive, given that it drove growth despite these challenges.

Going forward, NVIDIA faces increased competition from AMD, which recently launched new graphics cards, as well as the expiration of its licensing deal with Intel, which brings in $200 million per year. NVIDIA will receive its last payment in January 2016, and it's unclear whether the agreement will be renewed.

It is clear, however, that NVIDIA's core business is performing very well, and investors drove NVIDIA's stock higher during August as a result.