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

Emil Velikov emil.l.velikov at gmail.com
Mon Mar 13 11:17:46 UTC 2017


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/

-Emil


More information about the mesa-dev mailing list