summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-10 12:13:48 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-10 12:14:25 -0600
commit9ac1a8d416c2bd50ca10186ca09f5e86f6fa4ce6 (patch)
tree39ac2f23794da71ec1aaf4e1629bdd889baf1b91 /src/mesa/state_tracker/st_cb_drawpixels.c
parent519aacef031e3271e16693308ca462346a8a160c (diff)
pipe->region_alloc() now takes width instead of pitch, plus a flags param
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index f0c7a2bfc5..6981097ef4 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -101,20 +101,19 @@ make_mipmap_tree(struct st_context *st,
const GLvoid *pixels)
{
GLuint pipeFormat = st_choose_pipe_format(st->pipe, GL_RGBA, format, type);
- int cpp = 4, pitch;
+ int cpp = 4;
struct pipe_mipmap_tree *mt = CALLOC_STRUCT(pipe_mipmap_tree);
+ GLbitfield flags = PIPE_SURFACE_FLAG_TEXTURE;
assert(pipeFormat);
- pitch = width; /* XXX pad */
-
if (unpack->BufferObj) {
/*
mt->region = buffer_object_region(unpack->BufferObj);
*/
}
else {
- mt->region = st->pipe->region_alloc(st->pipe, cpp, pitch, height);
+ mt->region = st->pipe->region_alloc(st->pipe, cpp, width, height, flags);
/* XXX do texstore() here */
}
@@ -128,7 +127,7 @@ make_mipmap_tree(struct st_context *st,
mt->depth0 = 1;
mt->cpp = cpp;
mt->compressed = 0;
- mt->pitch = pitch;
+ mt->pitch = mt->region->pitch;
mt->depth_pitch = 0;
mt->total_height = height;
mt->level[0].level_offset = 0;