summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-22 14:35:21 -0600
committerBrian Paul <[email protected]>2010-04-22 14:37:50 -0600
commit17249ae8e0e459dea250733a0b3e45036cdb67bd (patch)
tree548f976aa4428e11006ccc097f1583645f39f559 /src
parente9bcad4c33c8c39356ee37445768c0e4a6b3f9a2 (diff)
st/mesa: assert that binding flags are properly set for drawing surfaces
Diffstat (limited to 'src')
-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 1cd55463379..52c507da3b3 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);
}