Mesa (main): 28 new commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 16 17:31:09 UTC 2021


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a11d2a31bf931deca05c79871aeaf1441fb777e
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Nov 15 16:41:52 2021 -0600

    vulkan: Add a dummy sync type
    
    This is useful in WSI scenarios where you want to trivially signal a
    fence or semaphore.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a910071bc95db97a2ffcc63f6c375a997a68a65
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Nov 12 09:51:59 2021 -0600

    vulkan,anv: Auto-detect syncobj features
    
    Instead of having a bunch of const vk_sync_type for each permutation of
    vk_drm_syncobj capabilities, have a vk_drm_syncobj_get_type helper which
    auto-detects features.  If a driver can't support a feature for some
    reason (i915 got timeline support very late, for instance), they can
    always mask off feature bits they don't want.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=36b4d12f02586aa6a227f47d4f5d9edce68da07e
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Nov 10 09:33:57 2021 -0600

    anv: Simplify submit_simple_batch()
    
    BO waits aren't going away any time soon so using a syncobj here doesn't
    really gain us anything.  It just makes it more complicated.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=623e9ecd6da365f0aae6b066c828cf28ad705642
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Nov 3 08:24:02 2021 -0500

    anv: Remove unnecessary syncobj wrappers
    
    These are entirely unused except for the syncobj in submit_simple_batch.
    We can use the libdrm wrappers for that as they're basically equivalent
    and the core Vulkan sync code already depends on them.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5ac1d16692ea95676f28f41dbc0e4e01d96959b
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Nov 2 10:20:00 2021 -0500

    vulkan: Add an emulated binary vk_sync type
    
    This wraps a timeline vk_sync type and turns it into a binary one.  This
    is useful for, for instance, driver layered on D3D12.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=36ea90a3619f86e9bf0b51e2b0c28b213e08083d
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 20 09:44:02 2021 -0500

    anv: Convert to the common sync and submit framework
    
    This is, unfortunately, a large flag-day mega-commit.  However, any
    other approach would likely be fragile and involve a lot more churn as
    we try to plumb the new vk_fence and vk_semaphore primitives into ANV's
    submit code before we delete it all.  Instead, we do it all in one go
    and accept the consequences.
    
    While this should be mostly functionally equivalent to the previous
    code, there is one potential perf-affecting change.  The command buffer
    chaining optimization no longer works across VkSubmitInfo structs.
    Within a single VkSubmitInfo, we will attempt to chain all the command
    buffers together but we no longer try to chain across a VkSubmitInfo
    boundary.  Hopefully, this isn't a significant perf problem.  If it ever
    is, we'll have to teach the core runtime code how to combine two or more
    VkSubmitInfos into a single vk_queue_submit.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=87cf858946788564966840a73cda0ed5383eb9ef
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 20 16:44:53 2021 -0500

    anv: Use helpers in util/os_time.h in the query code
    
    These are about to be the only use of anv_gettime_ns() so lets switch
    them over so the next patch can delete the helper outright.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=213edd1841af72a3a4ec230262840d15fa40d74e
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 20 13:38:19 2021 -0500

    anv: Remove the last remnants of in/out fences
    
    This should have been dropped as part of d44ea09e61f4 ("anv: Drop unused
    sync_file and BO semaphore code") but we missed a few bits.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cbb13fae33a8b8e72db4200dfeec1b72528763db
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Oct 19 23:55:27 2021 -0500

    anv: Add a BO sync type
    
    This is copy+paste from the BO implementation of anv_fence
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc62695c3a853dd0edae1a73117cc169f15f342b
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 20 09:33:11 2021 -0500

    anv: Delete ANV_SEMAPHORE_TYPE_DUMMY
    
    It's never set as a semaphore type.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3fda7ae78f388198256bfdf8eb4fe6d81f4afa9
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Oct 21 11:50:10 2021 -0500

    vulkan/wsi/display: Wrap wsi_display_fence in a vk_sync
    
    This gets rid of the bespoke vfunc interface in the WSI code.
    Eventually, I'd love to get rid of wsi_display_fence entirely but
    this at least makes it a lot more palatable.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b1addc425ab705251bfac39aa7d5c516726d0a38
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Oct 21 11:32:52 2021 -0500

    wsi/display: Rework wsi_fence a bit
    
    Get rid of most of the guts of the base class and just leave it as a
    vtable.  We can also drop some of wsi_display_fence.  One functional
    change here is that we're now using VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE
    which is more correct anyway because, thanks to the funky reference
    counting we do with destroyed and event_received, its lifetime is tied
    to the physical device, at best.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2bd3434fa237ae8220ba83a9fa6c15f78cb6d6fb
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Oct 21 10:52:29 2021 -0500

    vulkan/wsi: Drop wsi_common_get_current_time()
    
    Use os_time_get_nano() instead.  At this point, it's just a wrapper
    around os_time_get_nano() anyway.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b19c9d19be2734741538eb57f9079e779a4112d
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Oct 28 11:40:02 2021 -0500

    vulkan/device: Log the timeline mode when lost
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9bffd81f1cb7c4a653d18b4b43296f89caed4db7
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Oct 19 14:27:25 2021 -0500

    vulkan: Add common implementations of vkQueueSubmit and vkQueueWaitIdle
    
    This adds a new vk_queue_submit object which contains a list of command
    buffers as well as wait and signal operations along with a driver hook
    which takes a vk_queue and a vk_queue_submit and does the actual submit.
    The common code then handles spawning a submit thread if needed, waiting
    for timeline points to materialize, dealing with timeline semaphore
    emulation via vk_timeline, etc.  All the driver sees are vk_queue.submit
    calls with fully materialized vk_sync objects which it can wait on
    unconditionally.
    
    This implementation takes a page from RADV's book and only ever spawns
    the submit thread if it sees a timeline wait on a time point that has
    not yet materialized.  If this never happens, it calls vk_queue.submit
    directly from vkQueueSubmit() and the thread is never spawned.
    
    One other nicety of the new framework is that there is no longer a
    distinction, from the driver's PoV, between fences and semaphores.  The
    fence, if any, is included as just one more signal operation on the
    final vk_queue_submit in the batch.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=673b5e97ec13c8889ef7613ac042a0741de03e95
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Oct 19 11:12:14 2021 -0500

    vulkan: Add a common implementation of VkSemaphore
    
    This is built on the new vk_sync primitives.  In the vk_physical_device,
    the driver provides a null-terminated array of vk_sync_type pointers in
    priority order.  The semaphore implementation then selects the first
    type that meets the necessary criterion.  In particular, semaphores may
    or may not be timelines depending on the VkSemaphoreType.  It also
    auto-selects the semaphore type based on the external handle types
    provided and can down-grade as needed to support a particular external
    handle.
    
    The implementation itself is mostly copy+pasted from ANV.  The primary
    difference is the fact that anv_semaphore_impl has been replaced with
    vk_sync.  The permanent vk_sync is still embedded (like ANV) but the
    temporary one is a pointer.  This makes stealing the temporary state as
    part of VkQueueSubmit a bit easier.
    
    All of the interesting stuff around waits, signals, etc. is implemented
    by the vk_sync interface.  All this code does is wrap it all in the
    annoyingly detailed VkFence rules so we can provide the correct Vulkan
    entrypoint behavior.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=60e7359db0fdc7b1fca77200115c580de6a819fa
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 18 22:36:44 2021 -0500

    vulkan: Add a common implementation of VkFence
    
    This is built on the new vk_sync primitives.  In the vk_physical_device,
    the driver provides a null-terminated array of vk_sync_type pointers in
    priority order.  The fence implementation then selects the first type
    that meets the necessary criterion.  In particular, fences can't be
    timelines and need to support reset and CPU wait.  It also auto-selects
    the fence type based on the external handle types provided and can
    down-grade as needed to support a particular external handle.
    
    The implementation itself is mostly copy+pasted from ANV.  The primary
    difference is the fact that anv_fence_impl has been replaced with
    vk_sync.  The permanent vk_sync is still embedded (like ANV) but the
    temporary one is a pointer.  This makes stealing the temporary state as
    part of VkQueueSubmit a bit easier.
    
    All of the interesting stuff around waits, resets, etc. is implemented
    by the vk_sync interface.  All this code does is wrap it all in the
    annoyingly detailed VkFence rules so we can provide the correct Vulkan
    entrypoint behavior.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=301e20f7a3d9d987b20df83d27153ebec707a322
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 18 18:12:59 2021 -0500

    vulkan: Add an emulated timeline sync type
    
    This is mostly copy+paste (and a bit of re-typing) from ANV.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f3843b11c9127a16b7381c9d6d0091ca59a1d029
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 27 16:32:24 2021 -0500

    c11/threads: Re-align return values for timed waits
    
    They're supposed to return thrd_timedout (which we mistakenly named
    thrd_timeout), not thrd_busy.
    
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13ab3757bbe0e7af7a7bc29d2a00b7f1f2400aa9
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 18 16:50:53 2021 -0500

    vulkan: Add a common vk_drm_syncobj struct
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fdb636e3a6cf2c33c0b2b8b1ab344563b7326587
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 18 16:24:03 2021 -0500

    vulkan/vk_device: Add a drm_fd field
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=95dee5150a7916d640b916f29858eabdaf7c79c8
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Nov 2 11:27:08 2021 -0500

    vulkan/util: Include stdlib.h
    
    It's needed for malloc() which is used by STACK_ARRAY
    
    Fixes: f695171e383e ("vulkan: add common entrypoints for sparse image requirements/properties")
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8134feb9a2d7b132430d15fea16880a59c81d0a9
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Oct 28 14:39:09 2021 -0500

    vulkan/meson: Re-arrange libvulkan_util deps a bit
    
    Rename files_vulkan_runtime to vulkan_runtime_files and add a new
    vulkan_runtime_deps array for dependencies.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3cf5fced4c09a696a699bed3d11c2f18d2c76f8f
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Oct 18 16:24:49 2021 -0500

    vulkan: Add a vk_sync base class
    
    This doesn't map directly to any particular Vulkan object but is,
    instead, a base class for the internal implementations of both VkFence
    and VkSemaphore.  Its utility will become evident in later patches.
    
    The design of vk_sync will look familiar to anyone with significant
    experience in DRM.  The base object itself is just a pointer to a vfunc
    table with function pointers providing the implementation of the various
    operations.  Depending on how the vk_sync will be used some of of those
    vfuncs are optional.  If it's only going to be used for VkSemaphore, for
    instance, there's no need for reset().
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=236ca763760861cff653696d6ed142429a604be6
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Nov 8 12:53:10 2021 -0600

    anv: Wire up the new status check
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9662e0154275408dea25f049cc55c79b0061b3b
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Nov 8 12:42:40 2021 -0600

    vulkan/device: Add a check_status hook
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=955f329fbe1b3401e5e10ff16f7592bcb9db12ae
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Oct 19 18:44:01 2021 -0500

    anv: Use the new common device lost tracking
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd89ef96d75ab7aa6b6f5020e3206e9c204af00f
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Oct 19 18:32:28 2021 -0500

    vulkan: Pull the device lost framework from ANV
    
    It's a bit on the over-complicated side but the objective is to make the
    debug log messages show up in the same thread as the first
    VK_ERROR_DEVICE_LOST so we don't massively confuse the app.  It's
    unknown if this is actually ever a problem but, with submit happening
    off on its own thread, logging errors from threads the client doesn't
    know about doesn't seem like a massively great plan.
    
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
    Acked-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>



More information about the mesa-commit mailing list