From: Roland Scheidegger Date: Fri, 28 May 2010 23:19:48 +0000 (+0200) Subject: identity: adapt to clear interface changes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25296a3ed380f2a2179a9f435645a7ccaf10c04c;p=mesa.git identity: adapt to clear interface changes --- diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c index 9813170fb18..0c3704ceae5 100644 --- a/src/gallium/drivers/identity/id_context.c +++ b/src/gallium/drivers/identity/id_context.c @@ -648,33 +648,6 @@ identity_resource_copy_region(struct pipe_context *_pipe, height); } -static void -identity_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 identity_context *id_pipe = identity_context(_pipe); - struct identity_resource *id_resource_dst = identity_resource(_dst); - struct pipe_context *pipe = id_pipe->pipe; - struct pipe_resource *dst = id_resource_dst->resource; - - pipe->resource_fill_region(pipe, - dst, - subdst, - dstx, - dsty, - dstz, - width, - height, - value); -} - static void identity_clear(struct pipe_context *_pipe, unsigned buffers, @@ -692,6 +665,52 @@ identity_clear(struct pipe_context *_pipe, stencil); } +static void +identity_clearRT(struct pipe_context *_pipe, + struct pipe_surface *_dst, + const float *rgba, + unsigned dstx, unsigned dsty, + unsigned width, unsigned height) +{ + struct identity_context *id_pipe = identity_context(_pipe); + struct identity_surface *id_surface_dst = identity_surface(_dst); + struct pipe_context *pipe = id_pipe->pipe; + struct pipe_surface *dst = id_surface_dst->surface; + + pipe->clearRT(pipe, + dst, + rgba, + dstx, + dsty, + width, + height); +} +static void +identity_clearDS(struct pipe_context *_pipe, + struct pipe_surface *_dst, + unsigned clear_flags, + double depth, + unsigned stencil, + unsigned dstx, unsigned dsty, + unsigned width, unsigned height) +{ + struct identity_context *id_pipe = identity_context(_pipe); + struct identity_surface *id_surface_dst = identity_surface(_dst); + struct pipe_context *pipe = id_pipe->pipe; + struct pipe_surface *dst = id_surface_dst->surface; + + pipe->clearDS(pipe, + dst, + clear_flags, + depth, + stencil, + dstx, + dsty, + width, + height); + +} + static void identity_flush(struct pipe_context *_pipe, unsigned flags, @@ -913,8 +932,9 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) id_pipe->base.set_vertex_sampler_views = identity_set_vertex_sampler_views; id_pipe->base.set_vertex_buffers = identity_set_vertex_buffers; id_pipe->base.resource_copy_region = identity_resource_copy_region; - id_pipe->base.resource_fill_region = identity_resource_fill_region; id_pipe->base.clear = identity_clear; + id_pipe->base.clearRT = identity_clearRT; + id_pipe->base.clearDS = identity_clearDS; id_pipe->base.flush = identity_flush; id_pipe->base.is_resource_referenced = identity_is_resource_referenced; id_pipe->base.create_sampler_view = identity_context_create_sampler_view;