From: Brian Paul Date: Wed, 24 Feb 2010 17:56:10 +0000 (-0700) Subject: st/mesa: code clean-ups in st_renderbuffer_alloc_storage() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5bc62895e294ea461e8487bac1aa84c6cc4f6809;p=mesa.git st/mesa: code clean-ups in st_renderbuffer_alloc_storage() --- diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index bfa8e21095c..906eccdc09f 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -83,14 +83,14 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_screen *screen = ctx->st->pipe->screen; struct st_renderbuffer *strb = st_renderbuffer(rb); enum pipe_format format; if (strb->format != PIPE_FORMAT_NONE) format = strb->format; else - format = st_choose_renderbuffer_format(pipe->screen, internalFormat); + format = st_choose_renderbuffer_format(screen, internalFormat); /* init renderbuffer fields */ strb->Base.Width = width; @@ -149,16 +149,15 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, PIPE_BUFFER_USAGE_CPU_WRITE); #endif - strb->texture = pipe->screen->texture_create( pipe->screen, - &template ); + strb->texture = screen->texture_create(screen, &template); if (!strb->texture) return FALSE; - strb->surface = pipe->screen->get_tex_surface( pipe->screen, - strb->texture, - 0, 0, 0, - surface_usage ); + strb->surface = screen->get_tex_surface(screen, + strb->texture, + 0, 0, 0, + surface_usage); if (strb->surface) { assert(strb->surface->texture); assert(strb->surface->format);