summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-20 15:20:17 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-20 15:20:17 -0600
commitfd3876e9e3fb17df61dbf45d400796d682a8fbe0 (patch)
tree59882ad914dbbbee24603d84a18310a68293a674 /src
parent46e2d2bb0a7423122412e3f119fdd89fedd9aef6 (diff)
renderbuffer tweaks in update_framebuffer_state()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c9
1 files 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 a6caf3f5ff..e776c9112d 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);