From fd3876e9e3fb17df61dbf45d400796d682a8fbe0 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 20 Oct 2007 15:20:17 -0600 Subject: renderbuffer tweaks in update_framebuffer_state() --- src/mesa/state_tracker/st_atom_framebuffer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index a6caf3f5ff9..e776c9112d1 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -45,6 +45,7 @@ static void update_framebuffer_state( struct st_context *st ) { struct pipe_framebuffer_state framebuffer; + struct gl_framebuffer *fb = st->ctx->DrawBuffer; struct st_renderbuffer *strb; GLuint i; @@ -53,21 +54,21 @@ update_framebuffer_state( struct st_context *st ) /* Examine Mesa's ctx->DrawBuffer->_ColorDrawBuffers state * to determine which surfaces to draw to */ - framebuffer.num_cbufs = st->ctx->DrawBuffer->_NumColorDrawBuffers[0]; + framebuffer.num_cbufs = fb->_NumColorDrawBuffers[0]; for (i = 0; i < framebuffer.num_cbufs; i++) { - strb = st_renderbuffer(st->ctx->DrawBuffer->_ColorDrawBuffers[0][i]); + strb = st_renderbuffer(fb->_ColorDrawBuffers[0][i]); assert(strb->surface); framebuffer.cbufs[i] = strb->surface; } - strb = st_renderbuffer(st->ctx->DrawBuffer->_DepthBuffer); + strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer); if (strb) { strb = st_renderbuffer(strb->Base.Wrapped); assert(strb->surface); framebuffer.zbuf = strb->surface; } - strb = st_renderbuffer(st->ctx->DrawBuffer->_StencilBuffer); + strb = st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer); if (strb) { strb = st_renderbuffer(strb->Base.Wrapped); assert(strb->surface); -- cgit v1.2.3