mesa: Assume depth textures have a single level unless told otherwise.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 2 Jul 2009 16:24:25 +0000 (17:24 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 2 Jul 2009 16:24:50 +0000 (17:24 +0100)
src/mesa/state_tracker/st_cb_texture.c

index a2211ce302e32f4c94b19f9be9abd31e19b1f96c..0a72784ce0626f4510d8632005741c75676f61b5 100644 (file)
@@ -335,7 +335,9 @@ guess_and_alloc_texture(struct st_context *st,
     * pagetable arrangements.
     */
    if ((stObj->base.MinFilter == GL_NEAREST ||
-        stObj->base.MinFilter == GL_LINEAR) &&
+        stObj->base.MinFilter == GL_LINEAR ||
+        stImage->base._BaseFormat == GL_DEPTH_COMPONENT ||
+        stImage->base._BaseFormat == GL_DEPTH_STENCIL_EXT) &&
        stImage->level == firstLevel) {
       lastLevel = firstLevel;
    }