Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / gallium / drivers / nv50 / nv50_context.c
index e822d863945ad0db2d0248fd98be5cf66389d01c..b02c53f2095dd6a374d5bac415a4f76ef9c956d3 100644 (file)
@@ -1,7 +1,28 @@
+/*
+ * Copyright 2008 Ben Skeggs
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_winsys.h"
-#include "pipe/p_util.h"
 
 #include "nv50_context.h"
 #include "nv50_screen.h"
@@ -21,7 +42,13 @@ nv50_destroy(struct pipe_context *pipe)
        struct nv50_context *nv50 = (struct nv50_context *)pipe;
 
        draw_destroy(nv50->draw);
-       free(nv50);
+       FREE(nv50);
+}
+
+
+static void
+nv50_set_edgeflags(struct pipe_context *pipe, const unsigned *bitfield)
+{
 }
 
 struct pipe_context *
@@ -42,13 +69,13 @@ nv50_create(struct pipe_screen *pscreen, unsigned pctx_id)
 
        nv50->pipe.destroy = nv50_destroy;
 
+       nv50->pipe.set_edgeflags = nv50_set_edgeflags;
        nv50->pipe.draw_arrays = nv50_draw_arrays;
        nv50->pipe.draw_elements = nv50_draw_elements;
        nv50->pipe.clear = nv50_clear;
 
        nv50->pipe.flush = nv50_flush;
 
-       nv50_init_miptree_functions(nv50);
        nv50_init_surface_functions(nv50);
        nv50_init_state_functions(nv50);
        nv50_init_query_functions(nv50);