SetTexture() Cache Performance Question
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
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.
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.
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement