diff options
author | Roland Scheidegger <[email protected]> | 2010-06-03 17:46:14 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-06-03 17:46:14 +0200 |
commit | 992382762a74fd834926fd2c3cd9e14a186e2dd5 (patch) | |
tree | c4572bb01331b71931b3570b36a7acfc38f79a68 /src/gallium/drivers/rbug/rbug_context.c | |
parent | 05863c487756c1c9dc823cf639f77cad4111bd23 (diff) | |
parent | a6e5c6c000df8655de3b41d5809547bb41c88c23 (diff) |
Merge branch 'gallium-newclear'
Conflicts:
src/gallium/state_trackers/python/p_context.i
Diffstat (limited to 'src/gallium/drivers/rbug/rbug_context.c')
-rw-r--r-- | src/gallium/drivers/rbug/rbug_context.c | 76 |
1 files changed, 48 insertions, 28 deletions
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c index bb7d13bfcd2..164d811ab48 100644 --- a/src/gallium/drivers/rbug/rbug_context.c +++ b/src/gallium/drivers/rbug/rbug_context.c @@ -800,33 +800,6 @@ rbug_resource_copy_region(struct pipe_context *_pipe, } static void -rbug_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 rbug_context *rb_pipe = rbug_context(_pipe); - struct rbug_resource *rb_resource_dst = rbug_resource(_dst); - struct pipe_context *pipe = rb_pipe->pipe; - struct pipe_resource *dst = rb_resource_dst->resource; - - pipe->resource_fill_region(pipe, - dst, - subdst, - dstx, - dsty, - dstz, - width, - height, - value); -} - -static void rbug_clear(struct pipe_context *_pipe, unsigned buffers, const float *rgba, @@ -844,6 +817,52 @@ rbug_clear(struct pipe_context *_pipe, } static void +rbug_clear_render_target(struct pipe_context *_pipe, + struct pipe_surface *_dst, + const float *rgba, + unsigned dstx, unsigned dsty, + unsigned width, unsigned height) +{ + struct rbug_context *rb_pipe = rbug_context(_pipe); + struct rbug_surface *rb_surface_dst = rbug_surface(_dst); + struct pipe_context *pipe = rb_pipe->pipe; + struct pipe_surface *dst = rb_surface_dst->surface; + + pipe->clear_render_target(pipe, + dst, + rgba, + dstx, + dsty, + width, + height); +} + +static void +rbug_clear_depth_stencil(struct pipe_context *_pipe, + struct pipe_surface *_dst, + unsigned clear_flags, + double depth, + unsigned stencil, + unsigned dstx, unsigned dsty, + unsigned width, unsigned height) +{ + struct rbug_context *rb_pipe = rbug_context(_pipe); + struct rbug_surface *rb_surface_dst = rbug_surface(_dst); + struct pipe_context *pipe = rb_pipe->pipe; + struct pipe_surface *dst = rb_surface_dst->surface; + + pipe->clear_depth_stencil(pipe, + dst, + clear_flags, + depth, + stencil, + dstx, + dsty, + width, + height); +} + +static void rbug_flush(struct pipe_context *_pipe, unsigned flags, struct pipe_fence_handle **fence) @@ -1075,8 +1094,9 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) rb_pipe->base.set_vertex_buffers = rbug_set_vertex_buffers; rb_pipe->base.set_sample_mask = rbug_set_sample_mask; rb_pipe->base.resource_copy_region = rbug_resource_copy_region; - rb_pipe->base.resource_fill_region = rbug_resource_fill_region; rb_pipe->base.clear = rbug_clear; + rb_pipe->base.clear_render_target = rbug_clear_render_target; + rb_pipe->base.clear_depth_stencil = rbug_clear_depth_stencil; rb_pipe->base.flush = rbug_flush; rb_pipe->base.is_resource_referenced = rbug_is_resource_referenced; rb_pipe->base.create_sampler_view = rbug_context_create_sampler_view; |