From 9ac1a8d416c2bd50ca10186ca09f5e86f6fa4ce6 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 10 Aug 2007 12:13:48 -0600 Subject: pipe->region_alloc() now takes width instead of pitch, plus a flags param --- src/mesa/state_tracker/st_cb_drawpixels.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c') 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; -- cgit v1.2.3