Revisiting GameWorks: AMD, Nvidia tangle over optimizations to The Witcher 3: Wild Hunt
Over the past week, there’s been a storm brewing over the state of optimizations for The Witcher 3: Wild Hunt.
Over the past week, there’s been a storm brewing over the state of optimizations for The Witcher 3: Wild Hunt. Things kicked off with a statement from CD Projekt Red’s Marcin Momot, who told the game’s fans: “Many of you have asked us if AMD Radeon GPUs would be able to run NVIDIA’s HairWorks technology – the answer is yes! However, unsatisfactory performance may be experienced as the code of this feature cannot be optimized for AMD products. Radeon users are encouraged to disable NVIDIA HairWorks if the performance is below expectations.”
Subsequent reviews have confirmed that the feature takes a heavier toll on AMD cards than on Nvidia cards. The following graph was created from Digital Foundry’s benchmarks of the title, which used the most recent 1.03 patch and updated drivers from both companies.
Nvidia takes a 24% performance hit from having GameWorks enabled, compared with 47% for AMD. Clearly there’s a disproportionate hit on the AMD side of things. According to end-users, there are several ways to mitigate the problem. One way to clean up performance on AMDcards is to create a custom profile for the game and set a manual level of tessellation. The performance improvement from doing so doesn’t appear to have been precisely quantified.
Using manual levels of tessellation in games can occasionally introduce odd artifacts (the likelihood of this goes down the higher the tessellation level). Some of you will recall that this isn’t the first time we’ve seen Nvidia TWITMTBP / GameWorks titles use extremely high levels of tessellation. But when it comes to rendering fur and hair, it’s not clear exactly what level of tessellation is appropriate in the first place. It’s one thing to call out insane levels of geometric detail poured into static surfaces or those with minimal curve, but hair is dynamic (and The Witcher 3 has more than a few hirsute beasties).
As you might expect, AMD and Nvidiahave their own distinct takes on this problem and the reasons for it. AMD’s Richard Huddy told Ars Technicathe following: “We’ve been working with CD Projeckt Red from the beginning. We’ve been giving them detailed feedback all the way through. Around two months before release, or thereabouts, the GameWorks code arrived with HairWorks, and it completely sabotaged our performance as far as we’re concerned. We were running well before that… it’s wrecked our performance, almost as if it was put in to achieve that goal.”
Nvidia’s PR Manager, Brian Burke, had a very different take on the situation in a statement provided to PC Perspective. “We are not asking game developers do anything unethical,” said Nvidia’s GameWorks’ Brian Burke. “GameWorks improves the visual quality of games running on GeForce for our customers. It does not impair performance on competing hardware. GameWorkssource code is provided to developers that request it under license, but they can’t redistribute our source code to anyone who does not have a license. Most of the time we optimize games based on binary builds, not source code… I believe it is a resource issue. Nvidia spent a lot of artist and engineering resources to help make Witcher 3 better. I would assume that AMD could have done the same thing because our agreements with developers don’t prevent them from working with other IHVs [independent hardware vendors].”
The remarks from Burke and Huddy don’t just advance different arguments, they concern fundamentally different topics. Burke’s statement touches on a number of complicated issues related to source code access, game optimization procedures, and industry practices.
GameWorks Redux
First, let’s talk about what GameWorks is. The term refers to a collective set of Nvidia libraries for producing certain specific effects within a title. There are GameWorks libraries for handling ambient occlusion, water, air turbulence, hair, faces, and both physics and particle effects. Nvidia’s PhysX libraries and technology have been folded into the GameWorks program.
HairWorks in The Witcher 3
The GameWorks libraries are sometimes referred to as “middleware” because they act as a bridge between different aspects of the game engine. Instead of building a custom physics engine from scratch, a game developer can use a solution like PhysX or the Intel-owned Havok physics solution, thus saving both time and money compared with doing their own from-scratch implementation. There are dozens of middleware plugins and libraries; The Witcher 3, for example, uses the Umbra 3 and SpeedTree plugins as well as GameWorks.
What sets GameWorks apart is that its developed by Nvidia explicitly for Nvidia GPUs, as opposed to being a third-party program written by a software vendor. This has implications for how that source code can be used or shared, which we explore in detail in the next section.
Whether GameWorks impairs performance on competing hardware depends entirely on how you parse the meanings behind the statement. Nvidia would argue that incorporating a GameWorks library doesn’t intrinsically impair competing hardware because HairWorks is an optional, user-controlled setting. Integrating a GameWorks library doesn’t impact performance in the title as a whole — if HairWorks doesn’t run properly on an AMD chip, turning it off fixes the problem (from Nvidia’s perspective, at least).
AMD would argue that “impair” has a wider meaning than Nvidia has assigned it. As we discussed last year, one of the differences between the two firms is that AMD tends to rely more on source code optimization than Nvidia does, which means closed-source libraries tend to hurt Team Red more than Team Green. Claiming that AMD could write its own libraries to accomplish essentially the same tasks ignores the fact that game developers adopt libraries to simplify their lives, and relatively few of them are willing to adopt two different solutions for doing the same thing. Practically speaking, AMD doesn’t have the financial resources to attack Nvidia head-on in this fashion in any case. Thus, from AMD’s perspective, GameWorks absolutely impairs its own ability to optimize code.
The source code conundrum
Every time I’ve written about this topic, the question of source code access and importance has come up. One point we need to clarify is that AMD’s central position is that developers need access to source code in order to perform their own optimizations. Optimizing a game to run on specific GPUs is just one example of the kinds of work a developer might perform.
Nvidia tends to downplay its own need to access source code and AMD agrees that they only occasionally need to see it themselves — but AMD’s preferred method of optimization relies more heavily on the developer having source access, while Nvidia tends to tackle more work from within the driver. This difference in approach is, as we’ve said, at least partly rooted in the financial resources available to the two companies.
Do developers prioritize source code access? That depends. If you’re an indie developer working with off-the-shelf engines and libraries, no, source code access probably doesn’t matter to you. AAA developers we spoke to last year, on the other hand, told us they wouldn’t work with libraries if they didn’t have a license to see the underlying source code.
The battle over source code, as I’ve observed it, is largely waged by non-programmers who use the arguments pro or con as a proxy for what kinds of design philosophies they believe Nvidia or AMD should or shouldn’t pursue. It’s no accident that the larger, more financially successful, and deep-pocketed company champions an approach that leverages as much of its own IP as possible, while the minority firm with a smaller developer relations team declares the superiority of an ecosystem-based approach.
Where do game developers stand? Unsurprisingly, most of them just want their games to run as well as possible on as much hardware as possible. But the situations that lead to the adoption of a particularly library or engine are themselves complex. When AMD announced in 2013 that every Frostbite 3 game would have a Mantle version, that was a significant agreement between two corporations. In some cases, Mantle delivered unique and interesting capabilities, but in others (Dragon Age: Inquisition comes to mind) the feature was of very modest benefit. The deals that AMD and Nvidia strike through programs like Gaming Evolved or The Way It’s Meant To Be Played can’t be easily summarized as “good” or “bad” for gamers, though some, including myself, have argued that this balkanized approach is bad for the industry as a whole.
Game On
The purpose of this story isn’t to declare for one side or another, but to illustrate the complexities that wrap around the entire GameWorks question. AMD and Nvidia both have a financial dog in this fight, but that doesn’t mean AMD is lying when it claims to value developer freedoms and the importance of source access. It also doesn’t mean that Nvidia is lying when it talks about wanting to deliver added value for its users and to push the envelope in terms of what’s possible in gaming.
GameWorks has been used in a number of high-profile titles
To the best of my knowledge, no GameWorks title has been found to impair the general performance of any gamewhen run on an AMD Radeon card. (Arkham Origins definitely tilted towards Nvidia, but not for any reason that was linked to a GameWorks library.) It’s important to keep that in mind. It’s also fair to acknowledge that after the problems AMD had with Intel and its compiler shenanigans in the early 2000s, it has every reason to be wary of any effort that could be used to distort the developer ecosystem, particularly when it lacks the resources to pursue Nvidia’s driver-centric approach.
GameWorks isn’t going away — which means these issues likely aren’t, either. To be clear, they shouldn’t. The question of how game optimizations happen and which companies receive what considerations is critical to device support and overall game experience. This is an area where people are going to disagree — please keep comments polite and the conversation civil.
Comments
Post a Comment