[Mesa-dev] [PATCH 02/10] swrast: rename texture fetch functions (pt. 1)

Brian Paul brianp at vmware.com
Mon Apr 7 08:20:54 PDT 2014


On 04/07/2014 09:17 AM, Ian Romanick wrote:
> On 04/05/2014 03:50 PM, Brian Paul wrote:
>> Rename functions to match format names.
>>
>> sed commands:
>> s/signed_rgba8888_rev/R8G8B8A8_SNORM/g
>> s/signed_rgba8888/A8B8G8R8_SNORM/g
>> s/f_rgba8888_rev/R8G8B8A_UNORM/g
>> s/f_rgba8888/A8B8G8R8_UNORM/g
>> s/f_rgbx8888_rev/R8G8B8X8_UNORM/g
>> s/f_rgbx8888/X8B8G8R8_UNORM/g
>> s/f_argb8888_rev/A8R8G8B8_UNORM/g
>> s/f_argb8888/B8G8R8A8_UNORM/g
>> s/f_xrgb8888_rev/X8R8G8B8_UNORM/g
>> s/f_xrgb8888/B8G8R8X8_UNORM/g
>> s/signed_rgbx8888/X8B8G8R8_SNORM/g
>> ---
>>   src/mesa/swrast/s_texfetch.c     |   66 +++++++++++++++++++-------------------
>>   src/mesa/swrast/s_texfetch_tmp.h |   22 ++++++-------
>>   2 files changed, 44 insertions(+), 44 deletions(-)
>>
>> diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
>> index cd09827..e041dd5 100644
>> --- a/src/mesa/swrast/s_texfetch.c
>> +++ b/src/mesa/swrast/s_texfetch.c
>> @@ -151,51 +151,51 @@ texfetch_funcs[] =
>>      /* Packed unorm formats */
>>      {
>>         MESA_FORMAT_A8B8G8R8_UNORM,
>> -      fetch_texel_1d_f_rgba8888,
>> -      fetch_texel_2d_f_rgba8888,
>> -      fetch_texel_3d_f_rgba8888
>> +      fetch_texel_1d_A8B8G8R8_UNORM,
>> +      fetch_texel_2d_A8B8G8R8_UNORM,
>> +      fetch_texel_3d_A8B8G8R8_UNORM
>>      },
>
> At the end, is it also worth wrapping this in a macro?
>
> #define FETCH_FUNCS(name) {        \
>        MESA_FORMAT_ ## name,        \
>        fetch_texel_1d_ ## name,     \
>        fetch_texel_2d_ ## name,     \
>        fetch_texel_3d_ ## name,     \
>     }

Yeah, I was thinking of doing that.

-Brian




More information about the mesa-dev mailing list