1. 25 Oct, 2018 1 commit
  2. 13 Jul, 2018 1 commit
  3. 14 Mar, 2018 1 commit
  4. 30 Oct, 2017 1 commit
  5. 25 Jul, 2017 1 commit
  6. 14 Jun, 2017 1 commit
  7. 22 Aug, 2016 1 commit
  8. 03 Feb, 2016 1 commit
  9. 02 Feb, 2016 1 commit
  10. 08 Feb, 2015 1 commit
    • Jason Ekstrand's avatar
      util/hash_table: Do a full search when adding new items · c9287e79
      Jason Ekstrand authored
      Previously, the hash_table_insert function would bail early if it found a
      deleted slot that it could re-use.  However, this is a problem if the key
      being inserted is already in the hash table but further down the list.  If
      this happens, the element ends up getting inserted in the hash table twice.
      This commit makes it so that we walk over all of the possible entries for
      the given key and then, if we don't find the key, place it in the available
      free entry we found.
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      c9287e79
  11. 21 Jan, 2015 1 commit
  12. 15 Jan, 2015 2 commits
  13. 15 Dec, 2014 2 commits
    • Eric Anholt's avatar
      hash_table: Fix compiler warnings from the renaming. · 6c3115af
      Eric Anholt authored
      Not sure how we both missed this.  None of the callers were using the
      return value, though.
      6c3115af
    • Jason Ekstrand's avatar
      util/hash_table: Rework the API to know about hashing · 94303a07
      Jason Ekstrand authored
      Previously, the hash_table API required the user to do all of the hashing
      of keys as it passed them in.  Since the hashing function is intrinsically
      tied to the comparison function, it makes sense for the hash table to know
      about it.  Also, it makes for a somewhat clumsy API as the user is
      constantly calling hashing functions many of which have long names.  This
      is especially bad when the standard call looks something like
      
      _mesa_hash_table_insert(ht, _mesa_pointer_hash(key), key, data);
      
      In the above case, there is no reason why the hash table shouldn't do the
      hashing for you.  We leave the option for you to do your own hashing if
      it's more efficient, but it's no longer needed.  Also, if you do do your
      own hashing, the hash table will assert that your hash matches what it
      expects out of the hashing function.  This should make it harder to mess up
      your hashing.
      
      v2: change to call the old entrypoint "pre_hashed" rather than
          "with_hash", like cworth's equivalent change upstream (change by
          anholt, acked-in-general by Jason).
      Signed-off-by: Jason Ekstrand's avatarJason Ekstrand <jason.ekstrand@intel.com>
      Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      94303a07
  14. 26 Nov, 2014 1 commit
  15. 04 Aug, 2014 3 commits
  16. 07 Mar, 2014 1 commit
  17. 12 Jul, 2013 1 commit
  18. 08 Feb, 2013 1 commit
    • Paul Berry's avatar
      Consolidate some redundant definitions of ARRAY_SIZE() macro. · a4b9678a
      Paul Berry authored
      Previous to this patch, there were 13 identical definitions of this
      macro in Mesa source.  That's ridiculous.  This patch consolidates 6
      of them to a single definition in src/mesa/main/macros.h.
      
      Unfortunately, I wasn't able to eliminate the remaining definitions,
      since they occur in places that don't include src/mesa/main/macros.h:
      
      - include/pci_ids/pci_id_driver_map.h
      - src/egl/drivers/dri2/egl_dri2.h
      - src/egl/main/egldefines.h
      - src/gbm/main/backend.c
      - src/gbm/main/gbm.c
      - src/glx/glxclient.h
      - src/mapi/mapi/stub.c
      
      I'm open to suggestions as to how to deal with the remaining redundancy.
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      a4b9678a
  19. 13 Nov, 2012 1 commit
  20. 12 Nov, 2012 1 commit