gallium: add flags parameter to pipe_screen::context_create
[mesa.git] / src / gallium / drivers / svga / svga_context.c
index de769cac95f4256ac72d67e929ba150a15081b31..673d17ad4a7f177297ccaf32a9fdc9dfb60f2c36 100644 (file)
@@ -81,8 +81,8 @@ static void svga_destroy( struct pipe_context *pipe )
 
 
 
-struct pipe_context *svga_context_create( struct pipe_screen *screen,
-                                         void *priv )
+struct pipe_context *svga_context_create(struct pipe_screen *screen,
+                                        void *priv, unsigned flags)
 {
    struct svga_screen *svgascreen = svga_screen(screen);
    struct svga_context *svga = NULL;
@@ -92,6 +92,8 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
    if (svga == NULL)
       goto no_svga;
 
+   LIST_INITHEAD(&svga->dirty_buffers);
+
    svga->pipe.screen = screen;
    svga->pipe.priv = priv;
    svga->pipe.destroy = svga_destroy;
@@ -154,8 +156,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
 
    svga->dirty = ~0;
 
-   LIST_INITHEAD(&svga->dirty_buffers);
-
    return &svga->pipe;
 
 no_state:
@@ -197,6 +197,10 @@ void svga_context_flush( struct svga_context *svga,
     */
    svga->rebind.rendertargets = TRUE;
    svga->rebind.texture_samplers = TRUE;
+   if (svga_have_gb_objects(svga)) {
+      svga->rebind.vs = TRUE;
+      svga->rebind.fs = TRUE;
+   }
 
    if (SVGA_DEBUG & DEBUG_SYNC) {
       if (fence)