glAreTexturesResident always reports true

Hello,

I am trying to figure out a way to check weather or not all my textures are loaded into texture memory on the gfx card or not and as far as I can tell the function glAreTexturesResident is aimed for this. The problem is that I always get the result that all my textures are loaded even though all of them can not be. I create 54 textures with the resolution 1024x1024x32 bits…

Does anyone have a suggestion or idea on what could be wrong or how to solve this ?
Thanks in advance!
/Marcus

Well here’s the usual, what GPU, driver, OS, etc… are you using?

Though I think the simplest answer is that I do believe most of the texture resident stuff has been abstracted and every texture more or less always reports as being resident regardless of whether it lives on the board or PCIE/AGP memory.

Also after crunching the numbers there’s no reason you can’t have that many textures of that size in memory, that is if your board has 256MB of ram or more, and there’d still be plenty of room for drawing buffers.

at what moment do you call the function? if you call it recently after a glBind(), then the texture will most probably be resident.

Odds are the texture isn’t made resident until an actual draw call is made. A call to glBind() will just make certain that the texture is consistent and throw any errors. My bad it wouldn’t actually throw any errors, and it makes sense to defer the consistency check until the draw call as well.

Im running on windows xp and this is what opengl reports from glgetstring:
Vendor: ATI Technologies Inc.
Version: 2.0.5885 WinXP Release
Renderer: RADEON X300/X550 Series x86/SSE2

I have tried calling it at different places, right after I have created the textures in my init func. and right after I have drawn them too, with same result. Is there any other way to get this info ? I whant to make sure a certain number of textures are being loaded into the gfx mem or you could say ensure a certain minimum level of texture spce…

[quote]Is there any other way to get this info ?
[/quote]
To the best of my knowledge no there is no reliable way of getting this information in OpenGL. Those methods were designed to do what you want, but since they’ve been implemented a lot has changed and the drivers do a whole heck of a lot of work behind the application’s back. Then to prevent an application from second guessing the driver and causing all sorts of weird performance problems you have the driver report that the texture is always resident.

[quote]I whant to make sure a certain number of textures are being loaded into the gfx mem or you could say ensure a certain minimum level of texture spce…
[/quote]
Is there a particular reason you need this behavior or is simply desired?

Maybe you could use proxy textures for this? I thought that was the point of having proxies, or at least to test whether or not a given texture can be created.