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

Author: Dave Airlie <[email protected]>
Date:   Sun Apr  7 14:29:59 2013 +1000

st/mesa: fix levels in initial texture creation

calim pointed out we were getting mipmap levels for array multisamples,
this didn't make sense. So then I noticed this function takes last_level
so we are passing in a too high value here.

I think this should fix the case he was seeing.

Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>

---

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

diff --git a/src/mesa/state_tracker/st_cb_texture.c 
b/src/mesa/state_tracker/st_cb_texture.c
index 0cd0d77..2d16920 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1662,7 +1662,7 @@ st_AllocTextureStorage(struct gl_context *ctx,
    stObj->pt = st_texture_create(st,
                                  gl_target_to_pipe(texObj->Target),
                                  fmt,
-                                 levels,
+                                 levels - 1,
                                  ptWidth,
                                  ptHeight,
                                  ptDepth,

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to