[Mesa-dev] [PATCH 1/7] util/mesa-sha1: add a context clone function

Grazvydas Ignotas notasas at gmail.com
Mon Mar 13 12:00:55 UTC 2017


On Mon, Mar 13, 2017 at 1:17 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 12 March 2017 at 18:32, Grazvydas Ignotas <notasas at gmail.com> wrote:
>> This is useful when we need to compute many hashes which all have some
>> common data hashed in. It works by first hashing the common data and
>> keeping the context, then for each hashing operation clone the common
>> context and continue hashing from there.
>>
>> Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
>> ---
>>  src/util/mesa-sha1.c | 13 +++++++++++++
>>  src/util/mesa-sha1.h |  3 +++
>>  2 files changed, 16 insertions(+)
>>
>
> How about instead of adding more code we simplify things ?
> In other words, with the following (forgotten) series, you'll be able
> to achieve your goal with less loc.
>
> https://patchwork.freedesktop.org/series/18510/

I like that, but since it's not merged, I can't use it.

GraÅžvydas


More information about the mesa-dev mailing list