i915g: Don't use winsys directly in the driver
authorJakob Bornecrantz <wallbraker@gmail.com>
Sun, 30 Aug 2009 16:45:47 +0000 (17:45 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Mon, 31 Aug 2009 15:29:58 +0000 (16:29 +0100)
src/gallium/drivers/i915simple/i915_batch.h
src/gallium/drivers/i915simple/i915_state.c

index c6e68ea38a27a14882b044001f7fcc0fb35b54cd..1e58c5b2a8c15dc1fcb49cdcd5334765822e3526 100644 (file)
@@ -109,7 +109,7 @@ i915_batchbuffer_flush( struct i915_batchbuffer *batch,
    i915_batchbuffer_reloc( i915->batch, buf, flags, delta )
 
 #define FLUSH_BATCH(fence) do {                                \
-   i915->winsys->batch_flush( i915->winsys, fence );   \
+   i915_batchbuffer_flush( i915->batch, fence );       \
    i915->hardware_dirty = ~0;                          \
 } while (0)
 
index 272c1b13380dd8817d3f2b174c15a7c0c148fb08..0087dfa410f881a7fa6ce3b86a664afd26f04e8e 100644 (file)
@@ -518,7 +518,7 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
                                      const struct pipe_constant_buffer *buf)
 {
    struct i915_context *i915 = i915_context(pipe);
-   struct pipe_winsys *ws = pipe->winsys;
+   struct pipe_screen *screen = pipe->screen;
    draw_flush(i915->draw);
 
    assert(shader < PIPE_SHADER_TYPES);
@@ -536,10 +536,10 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
    if (buf) {
       void *mapped;
       if (buf->buffer && buf->buffer->size &&
-          (mapped = ws->buffer_map(ws, buf->buffer,
+          (mapped = pipe_buffer_map(screen, buf->buffer,
                                     PIPE_BUFFER_USAGE_CPU_READ))) {
          memcpy(i915->current.constants[shader], mapped, buf->buffer->size);
-         ws->buffer_unmap(ws, buf->buffer);
+         pipe_buffer_unmap(screen, buf->buffer);
          i915->current.num_user_constants[shader]
             = buf->buffer->size / (4 * sizeof(float));
       }