diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-01-16 13:14:19 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-01-16 13:14:19 +1100 |
commit | 3119e9a14b66fcfb08fcc3563602273dd2e1893c (patch) | |
tree | 74ff685faec3430b66d70522b6ed717f57e54f00 /src/mesa/pipe/i915simple | |
parent | 9de335f5807553bc9251931ba3e80c4b454b5818 (diff) | |
parent | 587e2becc237bc1c900a1c0ba114a1a0192690ff (diff) |
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Conflicts:
src/mesa/pipe/Makefile
Diffstat (limited to 'src/mesa/pipe/i915simple')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_prim_vbuf.c | 6 | ||||
-rw-r--r-- | src/mesa/pipe/i915simple/i915_state.c | 6 | ||||
-rw-r--r-- | src/mesa/pipe/i915simple/i915_surface.c | 19 |
3 files changed, 17 insertions, 14 deletions
diff --git a/src/mesa/pipe/i915simple/i915_prim_vbuf.c b/src/mesa/pipe/i915simple/i915_prim_vbuf.c index 571ad40595..bdcc027ed7 100644 --- a/src/mesa/pipe/i915simple/i915_prim_vbuf.c +++ b/src/mesa/pipe/i915simple/i915_prim_vbuf.c @@ -136,8 +136,12 @@ i915_vbuf_render_set_primitive( struct vbuf_render *render, static void i915_vbuf_render_draw( struct vbuf_render *render, + uint prim, const ushort *indices, - unsigned nr_indices ) + uint nr_indices, + const void *vertices, + uint nr_vertices, + uint vertex_bytes) { struct i915_vbuf_render *i915_render = i915_vbuf_render(render); struct i915_context *i915 = i915_render->i915; diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c index f8332aab37..1190e05699 100644 --- a/src/mesa/pipe/i915simple/i915_state.c +++ b/src/mesa/pipe/i915simple/i915_state.c @@ -438,12 +438,12 @@ i915_create_vs_state(struct pipe_context *pipe, return draw_create_vertex_shader(i915->draw, templ); } -static void i915_bind_vs_state(struct pipe_context *pipe, void *vs) +static void i915_bind_vs_state(struct pipe_context *pipe, void *shader) { struct i915_context *i915 = i915_context(pipe); /* just pass-through to draw module */ - draw_bind_vertex_shader(i915->draw, vs); + draw_bind_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader); } static void i915_delete_vs_state(struct pipe_context *pipe, void *shader) @@ -451,7 +451,7 @@ static void i915_delete_vs_state(struct pipe_context *pipe, void *shader) struct i915_context *i915 = i915_context(pipe); /* just pass-through to draw module */ - draw_delete_vertex_shader(i915->draw, shader); + draw_delete_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader); } static void i915_set_constant_buffer(struct pipe_context *pipe, diff --git a/src/mesa/pipe/i915simple/i915_surface.c b/src/mesa/pipe/i915simple/i915_surface.c index 79e74e1143..e3c3cdd2e4 100644 --- a/src/mesa/pipe/i915simple/i915_surface.c +++ b/src/mesa/pipe/i915simple/i915_surface.c @@ -171,10 +171,10 @@ i915_surface_copy(struct pipe_context *pipe, /* Fill a rectangular sub-region. Need better logic about when to * push buffers into AGP - will currently do so whenever possible. */ -static ubyte * -get_pointer(struct pipe_surface *dst, unsigned x, unsigned y) +static void * +get_pointer(struct pipe_surface *dst, void *dst_map, unsigned x, unsigned y) { - return dst->map + (y * dst->pitch + x) * dst->cpp; + return (char *)dst_map + (y * dst->pitch + x) * dst->cpp; } @@ -186,12 +186,11 @@ i915_surface_fill(struct pipe_context *pipe, { if (0) { unsigned i, j; - - (void)pipe_surface_map(dst); + void *dst_map = pipe_surface_map(dst); switch (dst->cpp) { case 1: { - ubyte *row = get_pointer(dst, dstx, dsty); + ubyte *row = get_pointer(dst, dst_map, dstx, dsty); for (i = 0; i < height; i++) { memset(row, value, width); row += dst->pitch; @@ -199,7 +198,7 @@ i915_surface_fill(struct pipe_context *pipe, } break; case 2: { - ushort *row = (ushort *) get_pointer(dst, dstx, dsty); + ushort *row = get_pointer(dst, dst_map, dstx, dsty); for (i = 0; i < height; i++) { for (j = 0; j < width; j++) row[j] = (ushort) value; @@ -208,7 +207,7 @@ i915_surface_fill(struct pipe_context *pipe, } break; case 4: { - unsigned *row = (unsigned *) get_pointer(dst, dstx, dsty); + unsigned *row = get_pointer(dst, dst_map, dstx, dsty); for (i = 0; i < height; i++) { for (j = 0; j < width; j++) row[j] = value; @@ -220,6 +219,8 @@ i915_surface_fill(struct pipe_context *pipe, assert(0); break; } + + pipe_surface_unmap( dst ); } else { i915_fill_blit( i915_context(pipe), @@ -239,8 +240,6 @@ i915_init_surface_functions(struct i915_context *i915) i915->pipe.get_tex_surface = i915_get_tex_surface; i915->pipe.get_tile = pipe_get_tile_raw; i915->pipe.put_tile = pipe_put_tile_raw; - i915->pipe.get_tile_rgba = pipe_get_tile_rgba; - i915->pipe.put_tile_rgba = pipe_put_tile_rgba; i915->pipe.surface_data = i915_surface_data; i915->pipe.surface_copy = i915_surface_copy; |