diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-11-28 19:04:54 +0100 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-11-29 16:41:39 +0100 |
commit | 11a80160fd60d1eb1541b49128c659526a5d8ac8 (patch) | |
tree | 410bbe6407d37e9ca3af884f89e03104926624ad /src/mesa/state_tracker/st_cb_fbo.c | |
parent | 7043db677f457ae9a46f2585a5ef52bf69a4e8ea (diff) |
Move dimensions from struct pipe_region to struct pipe_surface.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index f58d532b2a..80c92e8b7a 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -104,6 +104,9 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, assert(strb->surface); if (!strb->surface) return GL_FALSE; + strb->surface->cpp = cpp; + strb->surface->pitch = pipe->winsys->surface_pitch(pipe->winsys, cpp, + width, flags); } /* free old region */ @@ -115,8 +118,9 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, pipe->winsys->region_release(pipe->winsys, &strb->surface->region); } - strb->surface->region = pipe->winsys->region_alloc(pipe->winsys, cpp, - width, height, flags); + strb->surface->region = pipe->winsys->region_alloc(pipe->winsys, + strb->surface->pitch * + cpp * height, flags); if (!strb->surface->region) return GL_FALSE; /* out of memory, try s/w buffer? */ |