Mesa (master): st/mesa: pass layers param to st_texture_create()
Brian Paul
brianp at kemper.freedesktop.org
Sat Jan 29 03:26:19 UTC 2011
Module: Mesa
Branch: master
Commit: db3a8af7f900e4970ea18659e86a824b4ebdefc7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db3a8af7f900e4970ea18659e86a824b4ebdefc7
Author: Brian Paul <brianp at vmware.com>
Date: Fri Jan 28 20:25:26 2011 -0700
st/mesa: pass layers param to st_texture_create()
---
src/mesa/state_tracker/st_atom_pixeltransfer.c | 2 +-
src/mesa/state_tracker/st_cb_bitmap.c | 4 ++--
src/mesa/state_tracker/st_cb_drawpixels.c | 2 +-
src/mesa/state_tracker/st_cb_texture.c | 2 ++
src/mesa/state_tracker/st_gen_mipmap.c | 1 +
src/mesa/state_tracker/st_texture.c | 1 +
src/mesa/state_tracker/st_texture.h | 1 +
7 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index 378b30e..739a2ea 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -99,7 +99,7 @@ create_color_map_texture(struct gl_context *ctx)
/* create texture for color map/table */
pt = st_texture_create(st, PIPE_TEXTURE_2D, format, 0,
- texSize, texSize, 1, PIPE_BIND_SAMPLER_VIEW);
+ texSize, texSize, 1, 1, PIPE_BIND_SAMPLER_VIEW);
return pt;
}
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index e23fe86..3b7b38c 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -276,7 +276,7 @@ make_bitmap_texture(struct gl_context *ctx, GLsizei width, GLsizei height,
* Create texture to hold bitmap pattern.
*/
pt = st_texture_create(st, st->internal_target, st->bitmap.tex_format,
- 0, width, height, 1,
+ 0, width, height, 1, 1,
PIPE_BIND_SAMPLER_VIEW);
if (!pt) {
_mesa_unmap_pbo_source(ctx, unpack);
@@ -559,7 +559,7 @@ reset_cache(struct st_context *st)
cache->texture = st_texture_create(st, PIPE_TEXTURE_2D,
st->bitmap.tex_format, 0,
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
- 1,
+ 1, 1,
PIPE_BIND_SAMPLER_VIEW);
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index ee610fe..3be411a 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -343,7 +343,7 @@ alloc_texture(struct st_context *st, GLsizei width, GLsizei height,
struct pipe_resource *pt;
pt = st_texture_create(st, st->internal_target, texFormat, 0,
- width, height, 1, PIPE_BIND_SAMPLER_VIEW);
+ width, height, 1, 1, PIPE_BIND_SAMPLER_VIEW);
return pt;
}
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 9653dcd..acddef6 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -359,6 +359,7 @@ guess_and_alloc_texture(struct st_context *st,
width,
height,
depth,
+ 1,
bindings);
DBG("%s returning %d\n", __FUNCTION__, (stObj->pt != NULL));
@@ -1902,6 +1903,7 @@ st_finalize_texture(struct gl_context *ctx,
stObj->width0,
stObj->height0,
stObj->depth0,
+ 1,
bindings);
if (!stObj->pt) {
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index c5f6008..77b6c46 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -352,6 +352,7 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
oldTex->width0,
oldTex->height0,
oldTex->depth0,
+ oldTex->array_size,
oldTex->bind);
/* The texture isn't in a "complete" state yet so set the expected
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 155ea39..c5d5410 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -59,6 +59,7 @@ st_texture_create(struct st_context *st,
GLuint width0,
GLuint height0,
GLuint depth0,
+ GLuint layers,
GLuint bind )
{
struct pipe_resource pt, *newtex;
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index bca856d..5eae7ab 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -168,6 +168,7 @@ st_texture_create(struct st_context *st,
GLuint width0,
GLuint height0,
GLuint depth0,
+ GLuint layers,
GLuint tex_usage );
More information about the mesa-commit
mailing list