[Mesa-dev] [PATCH] st/mesa: fix levels in initial texture creation
Dave Airlie
airlied at gmail.com
Sat Apr 6 21:31:18 PDT 2013
From: Dave Airlie <airlied at redhat.com>
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.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/mesa/state_tracker/st_cb_texture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 25ee352..85b5609 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1691,7 +1691,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,
--
1.8.1.2
More information about the mesa-dev
mailing list