gallium/cso_hash: remove another layer of pointer indirection
authorMarek Olšák <marek.olsak@amd.com>
Wed, 22 Jan 2020 03:53:13 +0000 (22:53 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 14 Feb 2020 23:16:28 +0000 (18:16 -0500)
commite395ce03e92b707bef7080eae3c2daa7d9760e70
treea06950e73a756abc5d8e89c6a554d96e38d9243a
parente0bb7b87e26d6618d75d37a4fe2c4a271d075dbb
gallium/cso_hash: remove another layer of pointer indirection

Convert this:

    struct cso_hash {
       union {
          struct cso_hash_data *d;
          struct cso_node      *e;
       } data;
    };

to this:

    struct cso_hash {
       struct cso_hash_data data;
       struct cso_node      *end;
    };

1) data is not a pointer anymore.
2) "end" points to "data" and acts as the end of the linked list.
3) This code is still crazy.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
src/gallium/auxiliary/cso_cache/cso_hash.c
src/gallium/auxiliary/cso_cache/cso_hash.h
src/gallium/auxiliary/util/u_hash_table.c
src/gallium/auxiliary/util/u_surfaces.c