[Mesa-dev] [PATCH 26/26] glsl: Add Bloom filter to get_static_name

Ilia Mirkin imirkin at alum.mit.edu
Mon Jul 21 14:39:20 PDT 2014


On Mon, Jul 21, 2014 at 5:36 PM, Ian Romanick <idr at freedesktop.org> wrote:
> On 07/21/2014 01:56 PM, Dylan Baker wrote:
>> 3) this is a silly function, all you need is:
>> filter = range(0, filter_bits / 32)
>
> But that will be different... that's the same as
>
>     filter = [0, 1, 2, 3, ...]
>
> but I want
>
>     filter = [0, 0, 0, 0, ...]
>
> So...
>
>     filter = [0 for i in xrange(0, filter_bits / 32)]
>
> should do the trick?

That would work. Another fun trick:

[0] * (filter_bits / 32)


More information about the mesa-dev mailing list