gallium: adapt drivers to pipe_constant_buffer removal
[mesa.git] / src / gallium / drivers / cell / ppu / cell_state_shader.c
index cda39f8d59262aac99334a390624399c5f27519c..cf5d681499ec08b0b0e51bd9b1b16dd87717caf9 100644 (file)
@@ -28,7 +28,7 @@
 #include "pipe/p_defines.h"
 #include "util/u_memory.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "draw/draw_context.h"
 #include "tgsi/tgsi_parse.h"
 
@@ -183,10 +183,9 @@ cell_delete_vs_state(struct pipe_context *pipe, void *vs)
 static void
 cell_set_constant_buffer(struct pipe_context *pipe,
                          uint shader, uint index,
-                         const struct pipe_constant_buffer *buf)
+                         const struct pipe_buffer *buf)
 {
    struct cell_context *cell = cell_context(pipe);
-   struct pipe_winsys *ws = pipe->winsys;
 
    assert(shader < PIPE_SHADER_TYPES);
    assert(index == 0);
@@ -194,10 +193,7 @@ cell_set_constant_buffer(struct pipe_context *pipe,
    draw_flush(cell->draw);
 
    /* note: reference counting */
-   winsys_buffer_reference(ws,
-                        &cell->constants[shader].buffer,
-                        buf->buffer);
-   cell->constants[shader].size = buf->size;
+   pipe_buffer_reference(&cell->constants[shader], buf);
 
    if (shader == PIPE_SHADER_VERTEX)
       cell->dirty |= CELL_NEW_VS_CONSTANTS;