diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-08-10 12:13:48 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-08-10 12:14:25 -0600 |
commit | 9ac1a8d416c2bd50ca10186ca09f5e86f6fa4ce6 (patch) | |
tree | 39ac2f23794da71ec1aaf4e1629bdd889baf1b91 /src/mesa/state_tracker/st_cb_fbo.c | |
parent | 519aacef031e3271e16693308ca462346a8a160c (diff) |
pipe->region_alloc() now takes width instead of pitch, plus a flags param
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 64ec802216..bb588d10ea 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -62,7 +62,8 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, const GLuint pipeFormat = st_choose_pipe_format(pipe, internalFormat, GL_NONE, GL_NONE); const struct pipe_format_info *info = st_get_format_info(pipeFormat); - GLuint cpp, pitch; + GLuint cpp; + GLbitfield flags = PIPE_SURFACE_FLAG_RENDER; /* want to render to surface */ assert(info); if (!info) @@ -98,11 +99,7 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, pipe->region_release(pipe, &strb->surface->region); } - /* Choose a pitch to match hardware requirements: - */ - pitch = ((cpp * width + 63) & ~63) / cpp; /* XXX fix: device-specific */ - - strb->surface->region = pipe->region_alloc(pipe, cpp, pitch, height); + strb->surface->region = pipe->region_alloc(pipe, cpp, width, height, flags); if (!strb->surface->region) return GL_FALSE; /* out of memory, try s/w buffer? */ |