Squashed commit of the following:
[mesa.git] / src / gallium / drivers / i965 / brw_context.c
index e67551882dcb279afecde2a88ef6fbc2a67b50a1..227bc790debbc6166c35ac175161e7d5611464a8 100644 (file)
 
 
 #include "pipe/p_context.h"
+#include "util/u_inlines.h"
 #include "util/u_simple_list.h"
 
 #include "brw_context.h"
-#include "brw_defines.h"
 #include "brw_draw.h"
 #include "brw_state.h"
 #include "brw_batchbuffer.h"
 #include "brw_winsys.h"
+#include "brw_resource.h"
 #include "brw_screen.h"
 
 
@@ -102,7 +103,8 @@ static void brw_destroy_context( struct pipe_context *pipe )
 }
 
 
-struct pipe_context *brw_create_context(struct pipe_screen *screen)
+struct pipe_context *brw_create_context(struct pipe_screen *screen,
+                                       void *priv)
 {
    struct brw_context *brw = (struct brw_context *) CALLOC_STRUCT(brw_context);
 
@@ -112,10 +114,12 @@ struct pipe_context *brw_create_context(struct pipe_screen *screen)
    }
 
    brw->base.screen = screen;
+   brw->base.priv = priv;
    brw->base.destroy = brw_destroy_context;
    brw->sws = brw_screen(screen)->sws;
    brw->chipset = brw_screen(screen)->chipset;
 
+   brw_init_resource_functions( brw );
    brw_pipe_blend_init( brw );
    brw_pipe_depth_stencil_init( brw );
    brw_pipe_framebuffer_init( brw );