Expense of texture parameter state change

Started by
3 comments, last by Nanoprobe 17 years, 11 months ago
I'm curious - does anyone know how expensive the state change is to change the parameters of a texture? For instance, changing the addressing mode from repeat to clamp, or changing filtering from nearest to linear? Are they essentially free operations, or is there much time involved? - Nanoprobe
- Nanoprobe
Advertisement
They're not free operations. But they don't impact things TOO much.

Just what are you trying to do? If it's just a few dozen calls you're worried about, it's all good. But if you do this per poly, you might be killing your performance.
I wouldn't be doing anything like per-poly texture state changes; I was wondering whether or not it's worth the effort of sorting states by texture parameters as well - though if in general usage it's not going to make much of an impact I doubt it's worth doing.
- Nanoprobe
Texture parameter settings are stored per texture object - so sorting with respect to them doesn't make sense anyway - you just need to sort by texture object.

Hope that helped [smile]
Actually, it does make sense if you want to use the same texture data, but with different parameters.

You could use two texture objects with two sets of parameters and two sets of data, but that would be wasteful. Changing the texture state should be cheap, I just don't know how much so.
- Nanoprobe

This topic is closed to new replies.

Advertisement