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

Michal Krol michal at vmware.com
Fri Jul 16 15:12:24 PDT 2010


W dniu 2010-07-16 23:55, Brian Paul pisze:
> 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 guess anything that has float or half-float rendertargets (anything 
bigger than 32 bits).

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

OK.


More information about the mesa-dev mailing list