st/mesa: pass layers param to st_texture_create()
authorBrian Paul <brianp@vmware.com>
Sat, 29 Jan 2011 03:25:26 +0000 (20:25 -0700)
committerBrian Paul <brianp@vmware.com>
Sat, 29 Jan 2011 03:25:26 +0000 (20:25 -0700)
src/mesa/state_tracker/st_atom_pixeltransfer.c
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_texture.c
src/mesa/state_tracker/st_texture.h

index 378b30e57ccf406fd9f2f1037302063c8a332053..739a2eaab7e0fde72701c344e626e65cbd3ff563 100644 (file)
@@ -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;
 }
 
index e23fe86daebc3a88a07ca9b8a3adbd87a7a31ff9..3b7b38cbc5bd96f28e668a340a7d3c595a395aeb 100644 (file)
@@ -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);
 }
 
index ee610fe6152506adf4c4e7240506e05c0cc97618..3be411ac6ce1f43516239dcd8d86fe4a4633ca5c 100644 (file)
@@ -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;
 }
index 9653dcd655d12793754c8ec9c7c9e08bd5a383c7..acddef6c749664df4cdc936b8908caa29f825e5a 100644 (file)
@@ -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) {
index c5f6008a22224870e814db924ff9d9da262d1881..77b6c46b30c30f7b9648168ef7cd60b7a04128fa 100644 (file)
@@ -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
index 155ea39f18c07d9537b0c45355c69329f974b81f..c5d541007be1127fd24e89d3b215cb1d4fb820b9 100644 (file)
@@ -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;
index bca856d71428a7b243b3c6f02875c35dde393ff1..5eae7ab72987621e7369ea348e5f973b8dc519ef 100644 (file)
@@ -168,6 +168,7 @@ st_texture_create(struct st_context *st,
                   GLuint width0,
                   GLuint height0,
                   GLuint depth0,
+                  GLuint layers,
                   GLuint tex_usage );