Original Post
🔒 Locked
glTexImage3D memory allocation
Advertisement
Internal memory management is a detail OpenGL is not concerned about. It's up to the driver to choose how to do it, as long as it's behaviour is allowed by the specification.
From my knowledge though, dated a few years ago, I believe a copy is kept in system memory so the texture don't have to be transported back from the video memory when it needs to be removed (as in the working set being replaced by other textures).
There are no ways of controling memory allocation.
From my knowledge though, dated a few years ago, I believe a copy is kept in system memory so the texture don't have to be transported back from the video memory when it needs to be removed (as in the working set being replaced by other textures).
There are no ways of controling memory allocation.
You may set texture priorities
(excerpt from OpenGL SuperBible):
void glPrioritizeTextures(GLsizei n, const GLuint *textures,
const GLclampf *priorities);
This function takes an array of texture object names and a corresponding array of texture object priorities that are clamped between 0 and 1.0. A low priority tells the implementation that this texture object should be left out of resident memory whenever space becomes tight. A higher priority (such as 1.0) tells the implementation that you want that texture object to remain resident if possible, even if the texture seems to be used infrequently.
(excerpt from OpenGL SuperBible):
void glPrioritizeTextures(GLsizei n, const GLuint *textures,
const GLclampf *priorities);
This function takes an array of texture object names and a corresponding array of texture object priorities that are clamped between 0 and 1.0. A low priority tells the implementation that this texture object should be left out of resident memory whenever space becomes tight. A higher priority (such as 1.0) tells the implementation that you want that texture object to remain resident if possible, even if the texture seems to be used infrequently.
Texture prioroties doesn't affect memory management in the driver, but the working set in the on board video memory. A texture with high priority is less likely to be replaced by other textures that needs some space. It doesn't control whether there are other copies, or where these copes are stored.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement