From f26065215317b1d320d11f636c65d4903788b431 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sun, 30 Aug 2009 17:45:47 +0100 Subject: 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(-) (limited to 'src/gallium/drivers/i915simple') diff --git a/src/gallium/drivers/i915simple/i915_batch.h b/src/gallium/drivers/i915simple/i915_batch.h index c6e68ea38a2..1e58c5b2a8c 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 272c1b13380..0087dfa410f 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)); } -- cgit v1.2.3