View Full Version : Why sample speed is low if dimension is NTOP ??
03-19-2007, 02:27 AM
In my fragment shader ,I use sampler3D to sample 3D texture. I don't know the reason which the speed will turn down if one of dimension of 3D Texture is not two of power!
who can give me a explain or a link to find reason!
03-19-2007, 03:26 AM
It's simply more difficult for the GPU to be efficient with NPOT, as it defeats texture-cache optimizations such as swizzling.
For 3D, it's even more important, I'd guess.
03-19-2007, 08:15 AM
What hardware? Current ATI hardware don't support NPOT on 3D textures.
03-19-2007, 12:34 PM
What hardware? Current ATI hardware don't support NPOT on 3D textures.Um, there's other hardware out there than ATi hardware.
03-19-2007, 01:01 PM
If you want to figure out what's the hardware restriction behind this you should simply figure out how it's done in software for example.. if you have power of two sized textures you can use bit shifts and mask technics to get the final texel position in your texture mapping, if one of the size differs from a power of two, you're forced to do one extra multiplication before you're able to read your texel: i.e. y*resolution_x+x instead of (y<<shift_x)|x, where shift_x is the power of 2 of the x resolution of your texture. The second one is in general much faster.
I dont think it kills cache optimisations such as swizzzling in some way like it's been said, but on the other side maybe the multiplication has to be took on an ALU stage and it delays the texture pipeline latency... or something like this.
03-19-2007, 02:12 PM
The integer divide for NPOT REPEAT is much more costly than the address calculation multiply.
03-19-2007, 08:00 PM
Originally posted by Korval:
What hardware? Current ATI hardware don't support NPOT on 3D textures.Um, there's other hardware out there than ATi hardware. Yeah. Hence the question "what hardware?". I'm not sure I understand what your point is.
03-20-2007, 05:45 AM
Thanks your replies.
My card is GF6800GT!
03-22-2007, 10:37 PM
How much of a performance drop are you seeing?
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.