i965: Set up the constant buffer on gen6 when it's needed.
[mesa.git] / src / mesa / state_tracker / st_atom_framebuffer.c
index 1cd55463379b16d44610b43afb7c0b9cfce41bab..036bc60049abb044281d2a26e1a31d5b40b75fc5 100644 (file)
@@ -73,9 +73,7 @@ update_renderbuffer_surface(struct st_context *st,
                                                    strb->rtt_face,
                                                    level,
                                                    strb->rtt_slice,
-                                                   PIPE_BIND_RENDER_TARGET |
-                                                   PIPE_BIND_BLIT_SOURCE |
-                                                   PIPE_BIND_BLIT_DESTINATION );
+                                                   PIPE_BIND_RENDER_TARGET);
 #if 0
             printf("-- alloc new surface %d x %d into tex %p\n",
                    strb->surface->width, strb->surface->height,
@@ -153,6 +151,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);
 }