gallium: remove const qualifier from pipe_buffer argument in set_constant_buffer
[mesa.git] / src / gallium / drivers / nv10 / nv10_state.c
index d2375aa2f64d10000588e3de0d6ce2c09cfbbc35..ad7def53b12c3b99421ce46406e5f58ce6f7bb08 100644 (file)
@@ -2,6 +2,7 @@
 #include "pipe/p_state.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_shader_tokens.h"
+#include "pipe/p_inlines.h"
 
 #include "tgsi/tgsi_parse.h"
 
@@ -342,17 +343,17 @@ nv10_depth_stencil_alpha_state_create(struct pipe_context *pipe,
        hw->depth.test_enable   = cso->depth.enabled ? 1 : 0;
 
        hw->stencil.enable = cso->stencil[0].enabled ? 1 : 0;
-       hw->stencil.wmask = cso->stencil[0].write_mask;
+       hw->stencil.wmask = cso->stencil[0].writemask;
        hw->stencil.func = nvgl_comparison_op(cso->stencil[0].func);
        hw->stencil.ref = cso->stencil[0].ref_value;
-       hw->stencil.vmask = cso->stencil[0].value_mask;
+       hw->stencil.vmask = cso->stencil[0].valuemask;
        hw->stencil.fail = nvgl_stencil_op(cso->stencil[0].fail_op);
        hw->stencil.zfail = nvgl_stencil_op(cso->stencil[0].zfail_op);
        hw->stencil.zpass = nvgl_stencil_op(cso->stencil[0].zpass_op);
 
        hw->alpha.enabled = cso->alpha.enabled ? 1 : 0;
        hw->alpha.func = nvgl_comparison_op(cso->alpha.func);
-       hw->alpha.ref  = float_to_ubyte(cso->alpha.ref);
+       hw->alpha.ref  = float_to_ubyte(cso->alpha.ref_value);
 
        return (void *)hw;
 }
@@ -457,22 +458,23 @@ nv10_set_clip_state(struct pipe_context *pipe,
 
 static void
 nv10_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
-                        const struct pipe_constant_buffer *buf )
+                        struct pipe_buffer *buf )
 {
        struct nv10_context *nv10 = nv10_context(pipe);
-       struct pipe_winsys *ws = pipe->winsys;
+       struct pipe_screen *pscreen = pipe->screen;
 
        assert(shader < PIPE_SHADER_TYPES);
        assert(index == 0);
 
        if (buf) {
                void *mapped;
-               if (buf->size && (mapped = ws->buffer_map(ws, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ)))
+               if (buf->size &&
+                    (mapped = pipe_buffer_map(pscreen, buf, PIPE_BUFFER_USAGE_CPU_READ)))
                {
                        memcpy(nv10->constbuf[shader], mapped, buf->size);
                        nv10->constbuf_nr[shader] =
                                buf->size / (4 * sizeof(float));
-                       ws->buffer_unmap(ws, buf->buffer);
+                       pipe_buffer_unmap(pscreen, buf);
                }
        }
 }
@@ -551,9 +553,9 @@ nv10_init_state_functions(struct nv10_context *nv10)
        nv10->pipe.delete_blend_state = nv10_blend_state_delete;
 
        nv10->pipe.create_sampler_state = nv10_sampler_state_create;
-       nv10->pipe.bind_sampler_states = nv10_sampler_state_bind;
+       nv10->pipe.bind_fragment_sampler_states = nv10_sampler_state_bind;
        nv10->pipe.delete_sampler_state = nv10_sampler_state_delete;
-       nv10->pipe.set_sampler_textures = nv10_set_sampler_texture;
+       nv10->pipe.set_fragment_sampler_textures = nv10_set_sampler_texture;
 
        nv10->pipe.create_rasterizer_state = nv10_rasterizer_state_create;
        nv10->pipe.bind_rasterizer_state = nv10_rasterizer_state_bind;