diff options
author | Felix Kuehling <[email protected]> | 2005-02-03 21:40:21 +0000 |
---|---|---|
committer | Felix Kuehling <[email protected]> | 2005-02-03 21:40:21 +0000 |
commit | 64b85b456384c22834749a278d073eefd3056611 (patch) | |
tree | cbad5e6109be5dae090602c165663fa466b5e329 /src/mesa/drivers/dri/common/texmem.h | |
parent | 9ea600ff3ffcddbb1431e478ae24517672d32423 (diff) |
Use all texture heaps in a fair way when textures need to be kicked in
order to make room for new textures. In particular this fixes texture
trashing on the first heap when the second heap is occupied by
currently unused textures (observed with Torcs and the Savage driver).
Heaps are weighted by their sizes by default but drivers can override
these and apply their own weights based on relative texture upload
speeds to the respective heaps.
Diffstat (limited to 'src/mesa/drivers/dri/common/texmem.h')
-rw-r--r-- | src/mesa/drivers/dri/common/texmem.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/texmem.h b/src/mesa/drivers/dri/common/texmem.h index 266afd8bb66..705cd4d3445 100644 --- a/src/mesa/drivers/dri/common/texmem.h +++ b/src/mesa/drivers/dri/common/texmem.h @@ -216,6 +216,23 @@ struct dri_tex_heap { * framebuffer. */ unsigned timestamp; + + /** \brief Kick/upload weight + * + * When not enough free space is available this weight + * influences the choice of the heap from which textures are + * kicked. By default the weight is equal to the heap size. + */ + double weight; + + /** \brief Kick/upload duty + * + * The heap with the highest duty will be chosen for kicking + * textures if not enough free space is available. The duty is + * reduced by the amount of data kicked. Rebalancing of + * negative duties takes the weights into account. + */ + int duty; }; |