[Mesa-dev] [PATCH 2/2] softpipe: fix using optimized filter function

Roland Scheidegger sroland at vmware.com
Fri Feb 8 07:02:01 PST 2013


Am 08.02.2013 15:32, schrieb Jose Fonseca:
> Looks good.
> 
> Should PIPE_TEXTURE_RECT be allowed too?
Texture rectangles don't support repeat wrap, so testing for them
wouldn't really help much.

> 
> Jose
> 
> ----- Original Message -----
>> From: Roland Scheidegger <sroland at vmware.com>
>>
>> This optimized filter (when using repeat wrap modes,
>> linear min/mag/mip filters, pot textures) only applies to 2d textures,
>> but nothing prevented it from being used for other textures (likely
>> leading to very bogus sample results).
>>
>> Note: This is a candidate for the 9.0 branch.
>> ---
>>  src/gallium/drivers/softpipe/sp_tex_sample.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c
>> b/src/gallium/drivers/softpipe/sp_tex_sample.c
>> index 60c1f92..bbc011e 100644
>> --- a/src/gallium/drivers/softpipe/sp_tex_sample.c
>> +++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
>> @@ -2976,6 +2976,7 @@ sp_create_sampler_variant( const struct
>> pipe_sampler_state *sampler,
>>  
>>     case PIPE_TEX_MIPFILTER_LINEAR:
>>        if (key.bits.is_pot &&
>> +          key.bits.target == PIPE_TEXTURE_2D &&
>>            sampler->min_img_filter == sampler->mag_img_filter &&
>>            sampler->normalized_coords &&
>>            sampler->wrap_s == PIPE_TEX_WRAP_REPEAT &&
>> --
>> 1.7.9.5
>>


More information about the mesa-dev mailing list