OSDN Git Service

nv30: Move edgeflag stuff
authorPatrice Mandin <pmandin@caramail.com>
Sat, 12 Jul 2008 10:24:37 +0000 (12:24 +0200)
committerPatrice Mandin <pmandin@caramail.com>
Sat, 12 Jul 2008 10:24:37 +0000 (12:24 +0200)
src/gallium/drivers/nv30/nv30_context.c
src/gallium/drivers/nv30/nv30_context.h
src/gallium/drivers/nv30/nv30_state.c

index b2d9d3f..eefc614 100644 (file)
@@ -32,12 +32,6 @@ nv30_destroy(struct pipe_context *pipe)
        FREE(nv30);
 }
 
-
-static void
-nv30_set_edgeflags(struct pipe_context *pipe, const unsigned *bitfield)
-{
-}
-
 struct pipe_context *
 nv30_create(struct pipe_screen *pscreen, unsigned pctx_id)
 {
@@ -57,7 +51,6 @@ nv30_create(struct pipe_screen *pscreen, unsigned pctx_id)
        nv30->pipe.winsys = ws;
        nv30->pipe.screen = pscreen;
        nv30->pipe.destroy = nv30_destroy;
-       nv30->pipe.set_edgeflags = nv30_set_edgeflags;
        nv30->pipe.draw_arrays = nv30_draw_arrays;
        nv30->pipe.draw_elements = nv30_draw_elements;
        nv30->pipe.clear = nv30_clear;
index ef8c16b..2e7b62a 100644 (file)
@@ -142,6 +142,7 @@ struct nv30_context {
 
        struct pipe_vertex_buffer  vtxbuf[PIPE_MAX_ATTRIBS];
        struct pipe_vertex_element vtxelt[PIPE_MAX_ATTRIBS];
+       const unsigned *edgeflags;
 };
 
 static INLINE struct nv30_context *
index 8dc16d3..4fe1def 100644 (file)
@@ -657,6 +657,16 @@ nv30_set_vertex_elements(struct pipe_context *pipe, unsigned count,
        nv30->dirty |= NV30_NEW_ARRAYS;
 }
 
+static void
+nv30_set_edgeflags(struct pipe_context *pipe, const unsigned *bitfield)
+{
+       struct nv30_context *nv30 = nv30_context(pipe);
+
+       nv30->edgeflags = bitfield;
+       nv30->dirty |= NV30_NEW_ARRAYS;
+       /*nv30->draw_dirty |= NV30_NEW_ARRAYS;*/
+}
+
 void
 nv30_init_state_functions(struct nv30_context *nv30)
 {
@@ -696,6 +706,7 @@ nv30_init_state_functions(struct nv30_context *nv30)
        nv30->pipe.set_scissor_state = nv30_set_scissor_state;
        nv30->pipe.set_viewport_state = nv30_set_viewport_state;
 
+       nv30->pipe.set_edgeflags = nv30_set_edgeflags;
        nv30->pipe.set_vertex_buffers = nv30_set_vertex_buffers;
        nv30->pipe.set_vertex_elements = nv30_set_vertex_elements;
 }