Mesa (master): 30 new commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 31 13:57:08 UTC 2019


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ca0ad1252bbdc8e9fba5d3d89f8bc854ce355eb
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 30 12:31:12 2019 -0500

    anv: Zero released anv_bo structs
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3c0b1b21880987d90bd5738736f2bd920f76b18
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Oct 29 14:26:15 2019 -0500

    anv: Use a bitset for tracking residency
    
    Now that we can conveniently map between GEM handles and struct anv_bo
    pointers, we can use a simple bitset for residency tracking instead of
    the complex hash set.  This shaves about 3% off of a CPU-limited example
    running with the Dawn WebGPU implementation.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ef198c59a0cf003b4545e345d34b93d9e4c538b
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 30 14:37:45 2019 -0500

    anv: Set the batch allocator for compute pipelines
    
    Otherwise relocations just up and crash.
    
    Fixes: a3153162a9b "anv: Delay allocation of relocation lists"
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f665d9c1c3e4a8ec16a350033d7223ce714e74a
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Oct 29 15:18:16 2019 -0500

    anv: Add a device parameter to anv_execbuf_add_bo
    
    We're about to start needing to lookup BO pointers by GEM handle so we
    need access to the device.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=63d7a38630ca17ac8c15c231f1afd75259f3417a
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 28 18:03:32 2019 -0500

    anv: Drop anv_bo_init and anv_bo_init_new
    
    BOs are now only ever allocated through the BO cache so there's no need
    to have these exposed.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=853d3b59fdafc10ebe462c1f15362451855c2a71
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 28 17:28:09 2019 -0500

    anv: Allocate misc BOs from the cache
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0ec55d5a30ea26066e03bafe43dfac9f6a37a76
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 28 16:42:02 2019 -0500

    anv: Allocate scratch BOs from the cache
    
    While we're here, we get rid of the locking and use a lock-free
    algorithm.  The chances of spilling contention are low and this is
    actually a bit simpler in some ways.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee77938733cd06f5fbc86d42c0b4ad0a64ca2579
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 28 15:42:20 2019 -0500

    anv: Allocate batch and fence buffers from the cache
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4f01eca3b3cd1701f21cacbb8d29fe688ba42bb
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 28 14:49:38 2019 -0500

    util: Add a free list structure for use with util_sparse_array
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a6d2593b8b63d2429e79eed900848c5c9a522c9
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 17:15:31 2019 -0500

    anv: Allocate descriptor buffers from the BO cache
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0ee23660fa2b38315ebc72aac5455cd064000fa
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 17:12:06 2019 -0500

    anv: Set more flags on descriptor pool buffers
    
    the ASYNC flag, in particular, has the potential to help performance
    because it means less sync tracking in the kernel.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3eb4b3ba53b23a4966b7dc79025a350245704fd
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 17:07:36 2019 -0500

    anv: Allocate query pool BOs from the cache
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0d2787f7c96a243f374477ea618e893839958119
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 17:07:02 2019 -0500

    anv: Use the query_slot helper in vkResetQueryPoolEXT
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3119b96bdf57c850eddebc765c56c3282749b311
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 16:29:29 2019 -0500

    anv: Allocate block pool BOs from the cache
    
    This commit switches block pools over to being allocated from the BO
    cache rather than being allocated manually by the block pool.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc972d72c7ad3fb8f518b8cf8163e253735b51bb
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 30 11:44:12 2019 -0500

    anv/tests: Initialize the BO cache and device mutex
    
    We're about to start depending on the BO cache in the state and block
    pools so we need them properly initialized for the tests to work.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9076e9f3751341063679eb227116060070549a37
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 30 11:43:53 2019 -0500

    anv/tests: Zero-initialize instances
    
    Some of the tests were actually relying on some of those uninitialized
    bits to be non-zero.  In particular, a couple want use_softpin = true.
    
    Cc: mesa-stable at lists.freedesktop.org
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c664dff7593959d43f89d3fadcc148303134675
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 18:18:52 2019 -0500

    anv: Choose BO flags internally in anv_block_pool
    
    All block pools are allocated with the same flags.  There's no good
    reason why it needs to be configurable.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a44f5ee0d8b16ad61a5c6f87bcfb2b89444c02f2
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 17:45:28 2019 -0500

    anv: Rework the internal BO allocation API
    
    This makes a number of changes to the current API:
    
     1. Everything is renamed to anv_device_* instead of anv_bo_cache_*
        because the BO cache is soon going to be the sole BO allocation path
        and not some special case to make import/export work.
    
     2. Drop the cache parameter.  It's totally redundant with the device
        and just annoying to keep typing.
    
     3. Rework flags so that they go the convenient direction for usage in
        ANV rather than whichever awkward way the i915 specified it to
        maintain backwards compatibility.  This also gives us the
        opportunity to set some defaults.
    
     4. Add flags for mapping and coherency.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1be2e4c0ef25a667a2afc0ce6bad1c3c57761fa0
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 16:42:47 2019 -0500

    anv: Use anv_block_pool_foreach_bo in get_bo_from_pool
    
    While we're at it, use gen_48b_address().
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3178e583c86a8324b629981e9d90f684f5a6cbc0
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 16:10:11 2019 -0500

    anv: Rework anv_block_pool_expand_range
    
    The growing algorithms for the softpin case and the userptr version are
    almost entirely different.  Having this weird join doesn't make the code
    more comprehensible.  This rework does a few things:
    
     1. Move the comment about 48-bit addresses to anv_device_init where we
        actually unset the EXEC_OBJECT_SUPPORTS_48B_ADDRESS flag.
    
     2. Separate the paths in anv_block_pool_expand_range so it's easier to
        see what happens in the two different cases.
    
     3. Use the anv_block_poo::bos array for storing all allocated BOs in
        both paths rather than using the cleanup list in both paths.  This
        lets us make the cleanups array only used for mmaps of the memfd for
        the userptr case.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb257e1852473e3bc49bb9e0fe014741894f7bd0
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 15:42:22 2019 -0500

    anv: Fix a potential BO handle leak
    
    Fixes: 731c4adcf9b "anv/allocator: Add support for non-userptr"
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f4fa8176952bef3973e65aa3f37bd077fc10895
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 14:52:37 2019 -0500

    anv: Handle state pool relocations using "wrapper" BOs
    
    Instead of depending on a mutable BO in the state pool for handling
    growing state pools, add a concept of "wrapper" BOs which just wrap an
    actual BO.  This way, the wrapper can exist once for all of time and we
    can put it in relocation lists even if the actual BO it references gets
    swapped out.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b781c85c79944ccc0a6b0e49daae574672c6dd26
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 28 20:12:24 2019 -0500

    anv: Replace ANV_BO_EXTERNAL with anv_bo::is_external
    
    We're not THAT strapped for space that we can't burn one extra bit for
    a boolean.  If we're really worried about it, we can always shrink the
    flags field to 16 bits because the kernel only uses 7 currently.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5534358ef6189fe1169ad181ac4578d41bec6835
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 14:51:19 2019 -0500

    anv: Inline anv_block_pool_get_bo
    
    It has exactly one caller and we're about to change some of the dynamics
    which would make this confusing as a separate function.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c0a4722f292dd437e8a6fa21ef9befb6281bec00
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 16:33:23 2019 -0500

    anv: Declare the bo in the anv_block_pool_foreach_bo loop
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=325345b2bdec8364f570eeacb2d7528a13c6cdde
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 14:33:48 2019 -0500

    anv: Stop storing the GEM handle in anv_reloc_list_add
    
    We have to go through and rewrite them all anyway so it doesn't do us
    any good to put them in the list in anv_reloc_list_add.  Also, for state
    pools the handles are likely wrong by the time vkQueueSubmit is called.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4be72934ee36b3954ae76a0ae42f5daed9f6900
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 14:28:02 2019 -0500

    anv: Fix a relocation race condition
    
    Previously, we would read the offset from the BO in anv_reloc_list_add
    to generate the presumed offset and then again in the caller to compute
    the 64-bit address to write into the buffer.  However, if the offset
    somehow changed between these two points, the presumed offset would no
    longer match the written offset.  This is unlikely to actually ever be a
    problem in practice because the presumed offset gets recorded first and
    so if the written address is wrong then the presumed offset is almost
    certainly wrong and the relocation will trigger.  However, it's much
    safer to simply have anv_reloc_list_add return the 64-bit address.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bbf389013ff851b3d60fee92fccf7c6cb94e4e29
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 12:45:41 2019 -0500

    anv: Use a util_sparse_array for the GEM handle -> BO map
    
    This lets us do less allocation because the anv_bo's are now embedded in
    the sparse array and it also allows lock-free translation from GEM
    handle to BO which will be useful in future commits.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=821ce7be36ee521c618d66d559425d6226f46fcf
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 25 13:01:55 2019 -0500

    anv: Move refcount to anv_bo
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=09ec6917c10d46257c7edcae7b7af868d87158bd
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Oct 5 14:07:50 2019 -0500

    util: Add a util_sparse_array data structure
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>




More information about the mesa-commit mailing list