gallium: remove const qualifier from pipe_buffer argument in set_constant_buffer
[mesa.git] / src / gallium / drivers / nv30 / nv30_state.c
index 26147565a5317dd6b266c31b1e45dc5b43abf5fa..268d3a8ab85a9b45bc6098474ddd4dbcbf963547 100644 (file)
@@ -51,6 +51,7 @@ nv30_blend_state_create(struct pipe_context *pipe,
        so_data  (so, cso->dither ? 1 : 0);
 
        so_ref(so, &bso->so);
+       so_ref(NULL, &so);
        bso->pipe = *cso;
        return (void *)bso;
 }
@@ -404,6 +405,7 @@ nv30_rasterizer_state_create(struct pipe_context *pipe,
        }
 
        so_ref(so, &rsso->so);
+       so_ref(NULL, &so);
        rsso->pipe = *cso;
        return (void *)rsso;
 }
@@ -477,6 +479,7 @@ nv30_depth_stencil_alpha_state_create(struct pipe_context *pipe,
        }
 
        so_ref(so, &zsaso->so);
+       so_ref(NULL, &so);
        zsaso->pipe = *cso;
        return (void *)zsaso;
 }
@@ -587,12 +590,12 @@ nv30_set_clip_state(struct pipe_context *pipe,
 
 static void
 nv30_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
-                        const struct pipe_constant_buffer *buf )
+                        struct pipe_buffer *buf )
 {
        struct nv30_context *nv30 = nv30_context(pipe);
 
-       nv30->constbuf[shader] = buf->buffer;
-       nv30->constbuf_nr[shader] = buf->buffer->size / (4 * sizeof(float));
+       nv30->constbuf[shader] = buf;
+       nv30->constbuf_nr[shader] = buf->size / (4 * sizeof(float));
 
        if (shader == PIPE_SHADER_VERTEX) {
                nv30->dirty |= NV30_NEW_VERTPROG;
@@ -669,16 +672,6 @@ nv30_set_vertex_elements(struct pipe_context *pipe, unsigned count,
        /*nv30->draw_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)
 {
@@ -687,9 +680,9 @@ nv30_init_state_functions(struct nv30_context *nv30)
        nv30->pipe.delete_blend_state = nv30_blend_state_delete;
 
        nv30->pipe.create_sampler_state = nv30_sampler_state_create;
-       nv30->pipe.bind_sampler_states = nv30_sampler_state_bind;
+       nv30->pipe.bind_fragment_sampler_states = nv30_sampler_state_bind;
        nv30->pipe.delete_sampler_state = nv30_sampler_state_delete;
-       nv30->pipe.set_sampler_textures = nv30_set_sampler_texture;
+       nv30->pipe.set_fragment_sampler_textures = nv30_set_sampler_texture;
 
        nv30->pipe.create_rasterizer_state = nv30_rasterizer_state_create;
        nv30->pipe.bind_rasterizer_state = nv30_rasterizer_state_bind;
@@ -718,7 +711,6 @@ 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;
 }