[Mesa-dev] [PATCH] i965 : optimized bucket index calculation
Ian Romanick
idr at freedesktop.org
Tue Sep 12 17:15:32 UTC 2017
On 09/08/2017 08:38 AM, Jason Ekstrand wrote:
> In general, I'm very concerned about how this handles rounding
> behavior. Almost everywhere, you round down when what you want to do is
> round up. Also, as I said on IRC, I'd like to see some asserts in
> add_bucket so that we are sure this calculation is correct. In
> particular, I'd like to see
>
> assert(bucket_for_size(size) == &bufmgr->cache_bucket[i]);
> assert(bucket_for_size(size - 2048) == &bufmgr->cache_bucket[i]);
> assert(bucket_for_size(size + 1) != &bufmgr->cache_bucket[i]);
>
> We need to check on both sides of size to be 100% sure we're doing our
> rounding correctly.
>
> On Fri, Sep 8, 2017 at 1:11 AM, <aravindan.muthukumar at intel.com
> <mailto:aravindan.muthukumar at intel.com>> wrote:
>
> From: Aravindan Muthukumar <aravindan.muthukumar at intel.com
> <mailto:aravindan.muthukumar at intel.com>>
>
> Avoiding the loop which was running with O(n) complexity.
> Now the complexity has been reduced to O(1)
>
> Tested with piglit.
> Slight performance improvement (~1%) in 3d mark.
>
>
> Which 3dmark test? Also, what's the error in that 1%?
And, is that Atom or Core?
More information about the mesa-dev
mailing list