What makes using high-res textures slower?

Started by
6 comments, last by Shane C 10 years, 6 months ago

Hi there,

I'm trying to figure why high-resolution textures seem to cook GPUs more than low-res ones. Is it the fact that you need to do more memory reads per texture and therefore use more bandwidth? If that is the case, surely, when the triangle being rasterized is taking fewer pixels of the screen, performance should increase?

Thanks,
Daniel Kruyt

Advertisement

I'm not an expert, but "more memory reads" in form of a higher number of textels that needs to be read, is definately not the case. Yes, a triangle that is further away and smaller does indeed increase performance, since less pixels need to be rasterized. You'll notice once you start to apply more complicated effects like Parallax mapping and so on.

From my own experience, larger textures (from models) aren't a huge performance bottleneck, though I might have been simply limited otherwise. One of the reasons why larger textures can be slower AFAIK is because smaller ones fit better in the texture cache, and thus avoid cache trashing (though this is mostly quessing, take it with a grain of salt). More memory bandwidth is likely to be a reason too, since if the texture is larger, it takes up more memory and thus more data has to be transfered somehow...

One of the reasons why larger textures can be slower AFAIK is because smaller ones fit better in the texture cache, and thus avoid cache trashing


This is good advice. Understanding texture cache can probably gain you some performance.

I'm not an expert, but "more memory reads" in form of a higher number of textels that needs to be read, is definately not the case. Yes, a triangle that is further away and smaller does indeed increase performance, since less pixels need to be rasterized. You'll notice once you start to apply more complicated effects like Parallax mapping and so on.

From my own experience, larger textures (from models) aren't a huge performance bottleneck, though I might have been simply limited otherwise. One of the reasons why larger textures can be slower AFAIK is because smaller ones fit better in the texture cache, and thus avoid cache trashing (though this is mostly quessing, take it with a grain of salt). More memory bandwidth is likely to be a reason too, since if the texture is larger, it takes up more memory and thus more data has to be transfered somehow...

+1 but that would be cache thrashing, unless you are actually trashing your cache tongue.png

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

I'm not an expert, but "more memory reads" in form of a higher number of textels that needs to be read, is definately not the case.
One of the reasons why larger textures can be slower AFAIK is because smaller ones fit better in the texture cache

Those are actually both the same issue!
When you read a texel, it (and maybe it's neighbors) are cached. More unique texels read == more pressure on the cache == more cache misses == more memory bandwidth required.

When a triangle is distant AND mipmapping is enabled, then a lower mip level is used, which means the resolution is effectively lower, so there less unique texels, so the cache works better.
If mipmapping isn't used, then distant triangles are actually huge texture bandwidth hogs! Each screen pixel is fetching texels that are far apart in the texture (e.g. A 1000px texture shown across 10 screen px will skip 100 texels per screen pixel), so the cost of fetches isn't amortized by the cache at all, and every fetch is a cache miss.

With PC GPU, there can be a HUGE difference in memory bandwidth between the high-end and low-end hardware. One card might seem to run the same speed after doubling texture resolutions, while a different card might give a 10x reduction in frame rate!

Increasing texture resolution usually doesn't cause a significant increase in bandwidth. If you assume that all triangles sample from a fixed number of textures per pixel, then the total bandwidth required for sampling is actually bounded by your screen resolution as long as you don't have any overdraw. In most cases the pixel shader will be magnifying texels because the texture resolution is already higher than the screen resolution for that pixel, which means that increasing the resolution of the texture will have 0 effect on the bandwidth used for that particular pixel. The only places where it will cause an increase in bandwidth will be where the pixel shader is magnifying a texture, in which case more bandwidth will be used when fetching a higher resolution mip level.On the other hand, increasing the number of textures sampled per pixel will always result in more bandwidth being used for all pixels. However static textures are almost always compressed, which generally makes standard texture mapping pretty forgiving.

Hi, thanks for all the answers!

Is there anywhere that I can go to learn more about modern GPU architectures? I'm very into optimizing any and all code that I write, so I like to know as much detail about the systems I develop for as possible. Thanks for your time. smile.png

Hi, thanks for all the answers!
Is there anywhere that I can go to learn more about modern GPU architectures? I'm very into optimizing any and all code that I write, so I like to know as much detail about the systems I develop for as possible. Thanks for your time. :)


Beyond3D (http://www.beyond3d.com/) tends to be a great starter.

This topic is closed to new replies.

Advertisement