Archived

This topic is now archived and is closed to further replies.

SetTexture() Cache Performance Question

This topic is 4969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, At what point in the pipeline does a texture actually get loaded into GPU cache/memory? For example, I have a large set of SetTexture()''s paired with simple quads. (These are large textures for quads that cannot be combined into a single, common texture area... i.e. hi-res earth satellite imagery mapped onto a spheroid.) Most of the quads end up being culled (based on distance to earth horizon), but I''m still seeing a noticable impact to performance. Even though a quad may be trivially culled, have I incurred a memory/cache copy performance hit just because I invoked SetTexture()? Thanks, Brad

Share this post


Link to post
Share on other sites
It depends on where it resides.

If the texture was created in video memory, it''s always there.

If the texture is in system memory, it''s usually moved to video memory during the Present() call, whenever Present() processes your SetTexture() call.

In short: it''s pretty much up to the driver.

If you have enough video RAM, try creating the textures there instead of in local memory.

Share this post


Link to post
Share on other sites
Thanks for the response.

All these textures were created with the D3DPOOL_MANAGED flag, but there is certainly a high probability tht the sum of my textures, VBs, etc. exceed the video card memory capacity, s.t. periodic copying from sys to graphics mem may be required.

If I interpret your response correctly, there is a (driver dependent) likelihood that the memory manager could be copying textures from sys to graphics memory, even though the triangles that use those textures may ultimately be culled.

True?

Thanks again for your help.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Increase you AGP aperture size (in bios) and se if that have some effect. Thats the memory range that your agp bus can address. ie agp memory size.

Share this post


Link to post
Share on other sites