NPOT: difference between non_power_of_two_ARB vs texture_rectangle_ARB ?

Originally posted by davej:
Texture rectange seems particularly suited for compositing window systems.
Precisely.

Originally posted by Overmind:
When a new extension appears that can do everything the old one does with the same performance, and more, then there is no reason to keep the old one around except backwards compatibility…
Perhaps you should try benchmarking texture upload speed, between for example 1024x1024 2D and RECT.

In other words, you don’t know what the driver is twiddling the internal layout of the texture into in VRAM. The performance could be very different.

And, some people might actually depend on that performance difference. For example in a composited windowing system, it might be nice to allow the GPU direct DMA access from a CPU-side allocation, with no intermediate copies or twiddles.

The performance could be very different.
What do you mean with could be different? Have you tested this?

If yes, have you tested this on a nVidia card only, or on an ATI card, too? I’m fairly certain that ATI implements RECT textures with regular NPOT textures, patching the shader to include a texcoord division.

I don’t know how nVidia implements it, they always tend to favour special hardware over reusing programmable hardware. Still it would surprise me if there were any difference in upload speed between NPOT and RECT, at least on modern cards (I know RECT is a lot faster on GFFX cards, that’s what I meant with backwards compatibility).

Btw.: Why would I want 1024 RECT? That’s a POT format :wink:

About the perfomance diff between RECT and 2D.

In our application for post-effects and some screen-effects and smooth depth-test we had to deal with uplarged 2D-screen and depth textures (for example, for 1280x1024 it was 2048x1024), and we had to do weird etxture coords remapping, also we had to deal with sub-pixel precision to get exact quad-to-screen textel mapping, all these half-texel offsets an so on. Also we had to clamp texture coordinates in the shader to not to get into black unfilled texture area.

When we migrated to texture rectangle, everything became much more easier and clearer. Clamping, exact texture mapping (using WPOS.xy semantics, for exmaple).

Also we did a perfomance test (nVidia cards only). We didn’t find any resolution, where perfomance difference was noticeable. So, for our needs, the speed is quite the same.