Mesa (master): i915g: Don't use winsys directly in the driver

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Mon Aug 31 15:52:47 UTC 2009


Module: Mesa
Branch: master
Commit: f26065215317b1d320d11f636c65d4903788b431
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f26065215317b1d320d11f636c65d4903788b431

Author: Jakob Bornecrantz <wallbraker at gmail.com>
Date:   Sun Aug 30 17:45:47 2009 +0100

i915g: Don't use winsys directly in the driver

---

 src/gallium/drivers/i915simple/i915_batch.h |    2 +-
 src/gallium/drivers/i915simple/i915_state.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/i915simple/i915_batch.h b/src/gallium/drivers/i915simple/i915_batch.h
index c6e68ea..1e58c5b 100644
--- a/src/gallium/drivers/i915simple/i915_batch.h
+++ b/src/gallium/drivers/i915simple/i915_batch.h
@@ -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)
 
diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c
index 272c1b1..0087dfa 100644
--- a/src/gallium/drivers/i915simple/i915_state.c
+++ b/src/gallium/drivers/i915simple/i915_state.c
@@ -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));
       }




More information about the mesa-commit mailing list