[Mesa-dev] [PATCH] mesa: Make ffs/ffsl conditions match popcount ones.

Brian Paul brianp at vmware.com
Wed Jan 11 12:43:02 PST 2012


On 01/11/2012 01:13 PM, Kenneth Graunke wrote:
> On 01/11/2012 12:02 PM, Eric Anholt wrote:
>> On Tue, 10 Jan 2012 23:08:51 -0600, Alexander von
>> Gluck<kallisti5 at unixzen.com> wrote:
>>>
>>> - Ensure mesa code uses the _mesa_ffs(l) functions
>>> consistantly instead of jumping around between ffs
>>> and _mesa_ffs
>>> - This makes ffs/ffsl behave more like the popcount code
>>> - Better detects and handles edge cases of missing ffs/ffsl
>>> - Use builtin ffs/ffsl more often as it may provide
>>> performance improvements
>>
>> We intentionally don't use those mesa wrappers in our code. If you have
>> a portability issue where they're not present on your platform, please
>> define them on your platform instead of making people use some other
>> function.
>
> In other words, I think the preference is to use the ffs/ffsl names
> everywhere, and never call "_mesa_ffs". On platforms that don't
> natively support ffs, Mesa would provide the implementation of ffs.


Alexander, I should have told you to do this from the start.

I'll post a patch which cleans up the ffs stuff and removes _mesa_ffs. 
  Please fix it as needed for your platform.  Thanks.

-Brian


More information about the mesa-dev mailing list