diff options
author | Marek Olšák <[email protected]> | 2010-05-25 21:28:19 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-05-25 23:32:25 +0200 |
commit | 59e51d9640c242a7c919472d935a91889c7840c9 (patch) | |
tree | e8ab438193f79143a2d3b597f6f6c5000d72574a /src/gallium/drivers/r300 | |
parent | 85c55f2cf485644d99adcdc1d256b857f9456d81 (diff) |
r300g,util: remove pipe_surface from the util_blitter_fill interface and clean up
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_blit.c | 34 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_blit.h | 12 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 2 |
3 files changed, 16 insertions, 32 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index 2bf9317803e..5489d880b18 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -205,34 +205,18 @@ void r300_surface_copy(struct pipe_context* pipe, } /* Fill a region of a surface with a constant value. */ -void r300_surface_fill(struct pipe_context* pipe, - struct pipe_resource* dst, - struct pipe_subresource subdst, - unsigned dstx, unsigned dsty, unsigned dstz, - unsigned width, unsigned height, - unsigned value) +void r300_resource_fill_region(struct pipe_context *pipe, + struct pipe_resource *dst, + struct pipe_subresource subdst, + unsigned dstx, unsigned dsty, unsigned dstz, + unsigned width, unsigned height, + unsigned value) { - struct pipe_screen *screen = pipe->screen; - struct r300_context* r300 = r300_context(pipe); - struct pipe_surface *dstsurf; - unsigned bind; - - if (util_format_is_depth_or_stencil(dst->format)) - bind = PIPE_BIND_DEPTH_STENCIL; - else - bind = PIPE_BIND_RENDER_TARGET; - - dstsurf = screen->get_tex_surface(screen, dst, - subdst.face, - subdst.level, - dstz, - bind); + struct r300_context *r300 = r300_context(pipe); r300_blitter_save_states(r300); util_blitter_save_framebuffer(r300->blitter, r300->fb_state.state); - util_blitter_fill(r300->blitter, - dstsurf, dstx, dsty, width, height, value); - - pipe_surface_reference(&dstsurf, NULL); + util_blitter_fill_region(r300->blitter, dst, subdst, + dstx, dsty, dstz, width, height, value); } diff --git a/src/gallium/drivers/r300/r300_blit.h b/src/gallium/drivers/r300/r300_blit.h index c97872662aa..6dfb4534282 100644 --- a/src/gallium/drivers/r300/r300_blit.h +++ b/src/gallium/drivers/r300/r300_blit.h @@ -42,11 +42,11 @@ void r300_surface_copy(struct pipe_context* pipe, unsigned srcx, unsigned srcy, unsigned srcz, unsigned width, unsigned height); -void r300_surface_fill(struct pipe_context* pipe, - struct pipe_resource* dst, - struct pipe_subresource subdst, - unsigned dstx, unsigned dsty, unsigned dstz, - unsigned width, unsigned height, - unsigned value); +void r300_resource_fill_region(struct pipe_context* pipe, + struct pipe_resource* dst, + struct pipe_subresource subdst, + unsigned dstx, unsigned dsty, unsigned dstz, + unsigned width, unsigned height, + unsigned value); #endif /* R300_BLIT_H */ diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index f771e10c64e..406b812f6ae 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -187,7 +187,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300->context.clear = r300_clear; r300->context.resource_copy_region = r300_surface_copy; - r300->context.resource_fill_region = r300_surface_fill; + r300->context.resource_fill_region = r300_resource_fill_region; if (r300screen->caps.has_tcl) { r300->context.draw_arrays = r300_draw_arrays; |