summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-04-22 14:35:21 -0600
committerBrian Paul <brianp@vmware.com>2010-04-22 14:37:50 -0600
commit17249ae8e0e459dea250733a0b3e45036cdb67bd (patch)
tree548f976aa4428e11006ccc097f1583645f39f559 /src/mesa/state_tracker
parente9bcad4c33c8c39356ee37445768c0e4a6b3f9a2 (diff)
st/mesa: assert that binding flags are properly set for drawing surfaces
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index 1cd5546337..52c507da3b 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -153,6 +153,16 @@ update_framebuffer_state( struct st_context *st )
pipe_surface_reference(&framebuffer->zsbuf, NULL);
}
+#ifdef DEBUG
+ /* Make sure the resource binding flags were set properly */
+ for (i = 0; i < framebuffer->nr_cbufs; i++) {
+ assert(framebuffer->cbufs[i]->texture->bind & PIPE_BIND_RENDER_TARGET);
+ }
+ if (framebuffer->zsbuf) {
+ assert(framebuffer->zsbuf->texture->bind & PIPE_BIND_DEPTH_STENCIL);
+ }
+#endif
+
cso_set_framebuffer(st->cso_context, framebuffer);
}