Mesa (master): st/mesa: updated comment

Brian Paul brianp at kemper.freedesktop.org
Mon May 3 23:14:26 UTC 2010


Module: Mesa
Branch: master
Commit: 4b7812919a5db2f72bd3b9f6d760ffeb469ee3e4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4b7812919a5db2f72bd3b9f6d760ffeb469ee3e4

Author: Brian Paul <brianp at vmware.com>
Date:   Mon May  3 15:17:38 2010 -0600

st/mesa: updated comment

---

 src/mesa/state_tracker/st_cb_texture.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index fd801a3..96daf27 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -312,10 +312,11 @@ guess_and_alloc_texture(struct st_context *st,
     * the level=0 mipmap image.
     */
 
-   /* Guess a reasonable value for lastLevel.  This is probably going
-    * to be wrong fairly often and might mean that we have to look at
-    * resizable buffers, or require that buffers implement lazy
-    * pagetable arrangements.
+   /* Guess a reasonable value for lastLevel.  With OpenGL we have no
+    * idea how many mipmap levels will be in a texture until we start
+    * to render with it.  Make an educated guess here but be prepared
+    * to re-allocating a texture buffer with space for more (or fewer)
+    * mipmap levels later.
     */
    if ((stObj->base.MinFilter == GL_NEAREST ||
         stObj->base.MinFilter == GL_LINEAR ||




More information about the mesa-commit mailing list