summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-03-19 17:04:49 -0600
committerBrian Paul <[email protected]>2008-03-19 17:15:14 -0600
commit11c34dc644fe58b8178ab9142929a6685e3c0848 (patch)
tree5de4190e1c5f5b59cafa56735f10d4645ecb158a /src/mesa/state_tracker
parentb45669283fe4b9af9f2e78ac3c0c84207cf63775 (diff)
gallium: need to set/save framebuffer state in st_context since we use it elsewhere
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index c8fa0cbdfb6..43259c3ecb1 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -45,39 +45,39 @@
static void
update_framebuffer_state( struct st_context *st )
{
- struct pipe_framebuffer_state framebuffer;
+ struct pipe_framebuffer_state *framebuffer = &st->state.framebuffer;
struct gl_framebuffer *fb = st->ctx->DrawBuffer;
struct st_renderbuffer *strb;
GLuint i;
- memset(&framebuffer, 0, sizeof(framebuffer));
+ memset(framebuffer, 0, sizeof(*framebuffer));
/* Examine Mesa's ctx->DrawBuffer->_ColorDrawBuffers state
* to determine which surfaces to draw to
*/
- framebuffer.num_cbufs = fb->_NumColorDrawBuffers[0];
- for (i = 0; i < framebuffer.num_cbufs; i++) {
+ framebuffer->num_cbufs = fb->_NumColorDrawBuffers[0];
+ for (i = 0; i < framebuffer->num_cbufs; i++) {
strb = st_renderbuffer(fb->_ColorDrawBuffers[0][i]);
assert(strb->surface);
- framebuffer.cbufs[i] = strb->surface;
+ framebuffer->cbufs[i] = strb->surface;
}
strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer);
if (strb) {
strb = st_renderbuffer(strb->Base.Wrapped);
assert(strb->surface);
- framebuffer.zsbuf = strb->surface;
+ framebuffer->zsbuf = strb->surface;
}
else {
strb = st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer);
if (strb) {
strb = st_renderbuffer(strb->Base.Wrapped);
assert(strb->surface);
- framebuffer.zsbuf = strb->surface;
+ framebuffer->zsbuf = strb->surface;
}
}
- cso_set_framebuffer(st->cso_context, &framebuffer);
+ cso_set_framebuffer(st->cso_context, framebuffer);
}