[Mesa-dev] [PATCH] softpipe: Support non-depth-stencil formats in sp_tile_cache_flush_clear().

Brian Paul brianp at vmware.com
Fri Jul 16 14:55:19 PDT 2010


On 07/16/2010 03:42 PM, Michal Krol wrote:
>  From d69307c0f25b753ce8abebc940812a5fd352cb59 Mon Sep 17 00:00:00 2001
> From: Michal Krol<michal at vmware.com>
> Date: Fri, 16 Jul 2010 23:38:51 +0200
> Subject: [PATCH] softpipe: Support non-depth-stencil formats in sp_tile_cache_flush_clear().
>
> ---
>   src/gallium/drivers/softpipe/sp_tile_cache.c |    6 +++++-
>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
> index f4db6f6..b1464c1 100644
> --- a/src/gallium/drivers/softpipe/sp_tile_cache.c
> +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
> @@ -284,7 +284,11 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc)
>
>      assert(pt->resource);
>      /* clear the scratch tile to the clear value */
> -   clear_tile(&tc->tile, pt->resource->format, tc->clear_val);
> +   if (tc->depth_stencil) {
> +      clear_tile(&tc->tile, pt->resource->format, tc->clear_val);
> +   } else {
> +      clear_tile_rgba(&tc->tile, pt->resource->format, tc->clear_color);
> +   }
>
>      /* push the tile to all positions marked as clear */
>      for (y = 0; y<  h; y += TILE_SIZE) {


Looks OK.  Is there a specific test failure that this fixes?

I'd also suggest tacking on the attached patch to clarify what the 
code is doing.

-Brian

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sp_tile_cache.c.patch
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100716/f9d7c396/attachment.txt>


More information about the mesa-dev mailing list