logoalt Hacker News

Cthulhu_yesterday at 7:26 AM3 repliesview on HN

It feels like graphics drivers do / did this a lot too. At the very least they make specific optimizations for specific games, probably by tweaking settings and features that the game developers didn't optimize properly themselves.


Replies

kallebooyesterday at 8:06 AM

Famously if you renamed Quake 3 to "Quack" 3, it would slow down on the ATI Radeon 8500 https://web.archive.org/web/20091016055550/https://hardocp.c...

show 1 reply
SyzygyRhythmyesterday at 8:47 AM

There are many, many, cases like this, including correctness fixes. One recent example I remember had a shader that computed: x = a / b * b

The optimizer was allowed, but not obligated, to transform that into: x = a

However, in this case, b was sometimes 0. And if so, the unoptimized version computed: x = a / 0 * 0 = Inf * 0 = NaN

So badness ensued if the that particular path didn't get optimized, which could happen under various circumstances. We had to add some code to ensure that transformation always happened on that game.

show 1 reply
rbitsyesterday at 4:13 PM

Yep. I know the Minecraft optimisation mod Sodium has encountered some issues because Nvidia drivers try to optimise the game in ways that can cause issues for them