aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_wsi.c
Commit message (Collapse)AuthorAgeFilesLines
* radv: use the common base object type for VkDeviceSamuel Pitoiset2020-05-131-2/+2
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4886>
* radv: Add WSI buffers to BO list only if they can be used.Bas Nieuwenhuizen2020-04-271-6/+25
| | | | | | | | | | | Also reverse the BO list removal loop. This way typical WSI usage should find the entry in O(active swapchains) iterations, which should not be a performance issues. Tested with Doom(2106) which found the entry in 1 iteration every time. Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4306>
* radv/sqtt: handle thread trace capture in sqtt_QueuePresentKHR()Samuel Pitoiset2020-03-161-44/+5
| | | | | | | | | To avoid wasting CPU cycles when thread trace is not enabled. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4180> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4180>
* radv: update entrypoints generation from ANVSamuel Pitoiset2020-03-021-1/+1
| | | | | | | | | | | | It's a massive rework loosely based on ANV. This introduces separate dispatch tables for the instance, physical device and device objects. This will help for implementing internal driver layers for SQTT. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3930> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3930>
* radv: allow to capture SQTT traces with RADV_THREAD_TRACE=<start_frame>Samuel Pitoiset2020-02-281-5/+44
| | | | | | | | | | | | | | | | | | | | | | | This is pretty basic (and a bit crappy at the moment). I think we might want some sort of overlay in the future and also be able to trigger captures with F12 or whatever. To record a capture, set RADV_THREAD_TRACE to something greater than zero (eg. RADV_THREAD_TRACE=100 will capture frame #100). If the driver didn't crash (or the GPU didn't hang), the capture file should be stored in /tmp. To open that capture, use Radeon GPU Profiler and enjoy your profiling times with RADV! \o/ Note that thread trace support is quite experimental, only GFX9 is supported at the moment, and a bunch of useful stuff are still missing (shader ISA, pipelines info, etc). More is comming soon. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3900> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3900>
* radv: Start signalling semaphores in WSI acquire.Bas Nieuwenhuizen2019-10-301-7/+27
| | | | | | | | | | Winsys semaphores without signal operation get silently ignored. Not so for syncobjs, so actually signal them. Fixes: 84d9551b232 "radv: Always enable syncobj when supported for all fences/semaphores." Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2030 Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Clean up signalled and submitted fields from winsys fences.Bas Nieuwenhuizen2019-05-131-2/+2
| | | | | | | | | Other types like syncobj do not need it, so lets make things a bit more uniform. Also reduce confusion what the signalled/submitted referred to (especially with imported fences) Reviewed-by: Dave Airlie <[email protected]>
* vulkan/wsi: Add X11 adaptive sync support based on dri options.Bas Nieuwenhuizen2019-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The dri options are optional. When the dri options are not provided the WSI will not use adaptive sync. FWIW I think for xf86-video-amdgpu this still requires an X11 config option, so only people who opt in can get possible regressions from this. So then the remaining question is: why do this in the WSI? It has been suggested in another MR that the application sets this. However, I disagree with that as I don't think we'll ever get a reasonable set of applications setting it. The next questions is whether this can be a layer. It definitely can be as implemented now. However, I think this generally fits well with the function of the WSI. Furthemore, for e.g. the DISPLAY WSI this is much harder to do in a layer. Of course, most of the WSI could almost be a layer, but I think this still fits best in the WSI. Acked-by: Jason Ekstrand <[email protected]>
* vulkan/wsi: Use VK_EXT_pci_bus_info for DRM fd matchingJason Ekstrand2018-10-181-3/+0
| | | | | | | | This lets us avoid passing the DRM fd around all over the place and gets us closer to layer utopia. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/wsi: Implement GetPhysicalDevicePresentRectanglesKHRJason Ekstrand2018-10-181-0/+14
| | | | | | | | | | | | | | | | | | This got missed during 1.1 enabling because it was defined as an interaction between device groups and WSI and it wasn't obvious it was in the delta. The idea behind it is that it's supposed to provide a hint to the application in a multi-GPU setup to indicate which regions of the screen are being scanned out by which GPU so a multi-device split-screen rendering application can render each part of the screen on the GPU that will be presenting it and avoid extra bus traffic between GPUs. On a single-GPU setup or one which doesn't support this present mode, we need to do something. We choose to return the window size (or a max-size rect) if the compositor, X server, or crtc is associated with the given physical device and zero rectangles otherwise. Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/wsi: Store the instance allocator in wsi_deviceJason Ekstrand2018-10-181-1/+0
| | | | | | | | | | | | We already have wsi_device and we know the instance allocator at wsi_device_init time so there's no need to pass it into the physical device queries. This also fixes a memory allocation domain bug that can occur if CreateSwapchain gets called prior to any queries (not likely) in which case the cached connection gets allocated off the device instead of the instance. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv,radv: Implement vkAcquireNextImage2Jason Ekstrand2018-09-211-10/+25
| | | | | | | | This was added as part of 1.1 but it's very hard to track exactly what extension added it. In any case, we should implement it. Cc: [email protected] Reviewed-by: Dave Airlie <[email protected]>
* radv: Add VK_EXT_display_surface_counter to radv driverKeith Packard2018-06-201-0/+12
| | | | | | | | This extension is required to support EXT_display_control as it offers a way to query whether the vblank counter is supported. Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan: Add KHR_display extension using DRM [v10]Keith Packard2018-06-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the KHR_display extension support to the vulkan WSI layer. Driver support will be added separately. v2: * fix double ;; in wsi_common_display.c * Move mode list from wsi_display to wsi_display_connector * Fix scope for wsi_display_mode andwsi_display_connector allocs * Switch all allocations to vk_zalloc instead of vk_alloc. * Fix DRM failure in wsi_display_get_physical_device_display_properties When DRM fails, or when we don't have a master fd (presumably due to application errors), just return 0 properties from this function, which is at least a valid response. * Use vk_outarray for all property queries This is a bit less error-prone than open-coding the same stuff. * Remove VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR from surface caps Until we have multi-plane support, we shouldn't pretend to have any multi-plane semantics, even if undefined. Suggested-by: Jason Ekstrand <[email protected]> * Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom <[email protected]> v3: Add separate 'display_fd' and 'render_fd' arguments to wsi_device_init API. This allows drivers to use different FDs for the different aspects of the device. Use largest mode as display size when no preferred mode. If the display doesn't provide a preferred mode, we'll assume that the largest supported mode is the "physical size" of the device and report that. v4: Make wsi_image_state enumeration values uppercase. Follow more common mesa conventions. Remove 'render_fd' from wsi_device_init API. The wsi_common_display code doesn't use this fd at all, so stop passing it in. This avoids any potential confusion over which fd to use when creating display-relative object handles. Remove call to wsi_create_prime_image which would never have been reached as the necessary condition (use_prime_blit) is never set. whitespace cleanups in wsi_common_display.c Suggested-by: Jason Ekstrand <[email protected]> Add depth/bpp info to available surface formats. Instead of hard-coding depth 24 bpp 32 in the drmModeAddFB call, use the requested format to find suitable values. Destroy kernel buffers and FBs when swapchain is destroyed. We were leaking both of these kernel objects across swapchain destruction. Note that wsi_display_wait_for_event waits for anything to happen. wsi_display_wait_for_event is simply a yield so that the caller can then check to see if the desired state change has occurred. Record swapchain failures in chain for later return. If some asynchronous swapchain activity fails, we need to tell the application eventually. Record the failure in the swapchain and report it at the next acquire_next_image or queue_present call. Fix error returns from wsi_display_setup_connector. If a malloc failed, then the result should be VK_ERROR_OUT_OF_HOST_MEMORY. Otherwise, the associated ioctl failed and we're either VT switched away, or our lease has been revoked, in which case we should return VK_ERROR_OUT_OF_DATE_KHR. Make sure both sides of if/else brace use matches Note that we assume drmModeSetCrtc is synchronous. Add a comment explaining why we can idle any previous displayed image as soon as the mode set returns. Note that EACCES from drmModePageFlip means VT inactive. When vt switched away drmModePageFlip returns EACCES. Poll once a second waiting until we get some other return value back. Clean up after alloc failure in wsi_display_surface_create_swapchain. Destroy any created images, free the swapchain. Remove physical_device from wsi_display_init_wsi. We never need this value, so remove it from the API and from the internal wsi_display structure. Use drmModeAddFB2 in wsi_display_image_init. This takes a drm format instead of depth/bpp, which provides more control over the format of the data. v5: Set the 'currentStackIndex' member of the VkDisplayPlanePropertiesKHR record to zero, instead of indexing across all displays. This value is the stack depth of the plane within an individual display, and as the current code supports only a single plane per display, should be set to zero for all elements Discovered-by: David Mao <[email protected]> v6: Remove 'platform_display' bits from the build and use the existing 'platform_drm' instead. v7: Ensure VK_ICD_WSI_PLATFORM_MAX is large enough by setting to VK_ICD_WSI_PLATFORM_DISPLAY + 1 v8: Simplify wsi_device_init failure from wsi_display_init_wsi by using the same pattern as the other wsi layers. Adopt Jason Ekstrand's white space and variable declaration suggestions. Declare variables at first use, eliminate extra whitespace between types and names, add list iterator helpers, switch to lower-case list_ macros. Respond to Jason's April 8 review: * Create a function to convert relative to absolute timeouts to catch overflow issues in one place * use VK_NULL_HANDLE to clear prop->currentDisplay * Get rid of available_present_modes array. * return OUT_OF_DATE_KHR when display_queue_next called after display has been released. * Make errors from mode setting fatal in display_queue_next * Remove duplicate pthread_mutex_init call * Add wsi_init_pthread_cond_monotonic helper function to isolate pthread error handling from wsi_display_init_wsi Suggested-by: Jason Ekstrand <[email protected]> v9: Fix vscan handling by using MAX2(vscan, 1) everywhere. Vscan can be zero anywhere, which is treated the same as 1. Suggested-by: Jason Ekstrand <[email protected]> v10: Respond to Vulkan CTS failures. 1. Initialize planeReorderPossible in display_properties code 2. Only report connected displays in get_display_plane_supported_displays 3. Return VK_ERROR_OUT_OF_HOST_MEMORY when pthread cond initialization fails. Signed-off-by: Jason Ekstrand <[email protected]> 4. Add vkCreateDisplayModeKHR. This doesn't actually create new modes, it only looks to see if the requested parameters matches an existing mode and returns that. Suggested-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Keith Packard <[email protected]>
* radv: Add trivial device group implementation.Bas Nieuwenhuizen2018-03-071-0/+23
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: Return NULL for entrypoints when not supported.Bas Nieuwenhuizen2018-02-231-1/+1
| | | | | | | | | | | | | | | | This implements strict checking for the entrypoint ProcAddr functions. - InstanceProcAddr with instance = NULL, only returns the 3 allowed entrypoints. - DeviceProcAddr does not return any instance entrypoints. - InstanceProcAddr does not return non-supported or disabled instance entrypoints. - DeviceProcAddr does not return non-supported or disabled device entrypoints. - InstanceProcAddr still returns non-supported device entrypoints. Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement fences based on syncobjs.Bas Nieuwenhuizen2017-12-181-0/+5
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement VK_KHR_get_surface_capabilities2Jason Ekstrand2017-12-041-0/+26
| | | | | | | | The WSI core code does all the hard work. Just add the wrappers and turn it on. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Initialize individual WSI interfaces in wsi_device_initJason Ekstrand2017-12-041-30/+6
| | | | | | | | Now that we have anv_device_init/finish functions, there's no reason to have the individual driver do any more work than that. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Drop some unneeded cruft from the APIJason Ekstrand2017-12-041-17/+1
| | | | | | | | This drops the unneeded callbacks struct as well as the queue_get_family callback we were using before we'd pulled QueuePresent inside. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add wrappers for all of the surface queriesJason Ekstrand2017-12-041-20/+21
| | | | | | | This lets us move wsi_interface to wsi_common_private.h Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Drop the can_handle_different_gpu parameter from get_supportJason Ekstrand2017-12-041-1/+1
| | | | | | | Both anv and radv can handle prime now. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add a helper for AcquireNextImageJason Ekstrand2017-12-041-5/+10
| | | | | | | | | Unfortunately, due to the fact that AcquireNextImage does not take a queue, the ANV trick for triggering the fence won't work in general. We leave dealing with the fence up to the caller for now. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: move swapchain create/destroy to common codeDave Airlie2017-12-041-34/+8
| | | | | | | | | | v2 (Jason Ekstrand): - Rebase - Alter the names of the helpers to better match the vulkan entrypoints - Use the helpers in anv Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Move get_images into common codeJason Ekstrand2017-12-041-4/+3
| | | | | | | | | This moves bits out of all four corners (anv, radv, x11, wayland) and into the wsi common code. We also switch to using an outarray to ensure we get our return code right. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radv/wsi: Move the guts of QueuePresent to wsi commonDave Airlie2017-12-041-87/+5
| | | | | | | | | | | | v2 (Jason Ekstrand): - Better comit message - Rebase - Re-indent to follow wsi_common style - Drop the unneeded _swapchain from the newly added helper - Make the clone more true to the original (as per the rebase) Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Do image creation in common codeJason Ekstrand2017-12-041-123/+1
| | | | | | | | | | | This uses the mock extension created in a previous commit to tell the driver that the image it's just been asked to create is, in fact, a window system image with whatever assumptions that implies. There was a lot of redundant code between the two drivers to do basically exactly the same thing. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Implement prime in a completely generic wayJason Ekstrand2017-12-041-117/+20
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add a wsi_device_init functionJason Ekstrand2017-12-041-1/+9
| | | | | | | | This gives the opportunity to collect some function pointers if we'd like which will be very useful in future. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add a wsi_image structureDaniel Stone2017-12-041-17/+14
| | | | | | | | | | | | | This is used to hold information about the allocated image, rather than an ever-growing function argument list. v2 (Jason Ekstrand): - Rename wsi_image_base to wsi_image Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: use function ptr definitions from the spec.Dave Airlie2017-12-041-1/+2
| | | | | | | This just seems cleaner, and we may expand this in future. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv: use vk_error() everywhere an error is returnedSamuel Pitoiset2017-11-131-1/+1
| | | | | | | For consistency and it might help for debugging purposes. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Don't expose heaps with 0 memory.Bas Nieuwenhuizen2017-11-021-1/+15
| | | | | | | | | | | | It confuses CTS. This pregenerates the heap info into the physical device, so we can use it for translating contiguous indices into our "standard" ones. This also makes the WSI a bit smarter in case the first preferred heap does not exist. Reviewed-by: Dave Airlie <[email protected]> CC: <[email protected]>
* radv: disable implicit sync for radv allocated bos v3Andres Rodriguez2017-10-211-1/+2
| | | | | | | | | | | | | | | | | Implicit sync kicks in when a buffer is used by two different amdgpu contexts simultaneously. Jobs that use explicit synchronization mechanisms end up needlessly waiting to be scheduled for long periods of time in order to achieve serialized execution. This patch disables implicit synchronization for all radv allocations except for wsi bos. The only systems that require implicit synchronization are DRI2/3 and PRIME. v2: mark wsi bos as RADV_MEM_IMPLICIT_SYNC v3: Add drm version check (Bas) Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: replace conditional compilation with MAYBE_UNUSEDEric Engestrom2017-09-191-3/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: compile out unused codeEric Engestrom2017-09-131-0/+2
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* radv/wsi: Compute correct row_pitch for GFX9.Dave Airlie2017-08-271-2/+6
| | | | | | | (commit split out by Bas Nieuwenhuizen) Fixes: 65477bae9cf "radv: enable GFX9 on radv" Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: initial support for shared semaphores (v2)Dave Airlie2017-07-211-6/+24
| | | | | | | | | | | | | | | | | | | This adds support for sharing semaphores using kernel syncobjects. Syncobj backed semaphores are used for any semaphore which is created with external flags, and when a semaphore is imported, otherwise we use the current non-kernel semaphores. Temporary imports from syncobj fd are also available, these just override the current user until the next wait, when the temp syncobj is dropped. v2: allocate more chunks upfront, fix off by one after previous refactor of syncobj setup, remove unnecessary null check. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Use the KHR dedicated alloc for the WSI.Bas Nieuwenhuizen2017-07-151-2/+2
| | | | | | | | NV isn't valid for external images anymore. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Fixes: 6ddc64b93ea "radv: Add support for VK_KHR_dedicated_allocation." Reviewed-by: Andres Rodriguez <[email protected]>
* util/vulkan: Move Vulkan utilities to src/vulkan/utilAlex Smith2017-06-061-1/+1
| | | | | | | | | | | | | We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. v2: Android build system changes (from Tapani Pälli) Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* radv: use ac_surface data structuresNicolai Hähnle2017-06-051-1/+1
| | | | | | | | | This is mostly mechanical changes of renaming types and introducing "legacy" everywhere. It doesn't use the ac_surface computation functions yet. Reviewed-by: Dave Airlie <[email protected]>
* radv: remove radeon_surf_level::pitch_bytesNicolai Hähnle2017-06-051-1/+1
| | | | | | | Like radeonsi. This saves memory, and the information can easily be recomputed on the fly where necessary. Reviewed-by: Dave Airlie <[email protected]>
* radv: Also signal fence if vkAcquireNextImageKHR returns VK_SUBOPTIMAL_KHR.Bas Nieuwenhuizen2017-05-291-1/+1
| | | | | | | It is a successful return. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/wsi: report presentation error per image requestDave Airlie2017-05-031-6/+13
| | | | | | | | | | | | This ports 0fcb92c17dee681bd39c08ddf0abc358a27337c7 anv: wsi: report presentation error per image request This fixes: dEQP-VK.wsi.xlib.incremental_present.scale_none.* Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Enable VK_KHR_incremental_present.Bas Nieuwenhuizen2017-04-031-1/+10
| | | | | | | Just enabling the driver-independent implementation that Jason did. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan/wsi: Plumb present regions through the common codeJason Ekstrand2017-04-031-1/+2
| | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: use VK_NULL_HANDLE for handlesGrazvydas Ignotas2017-03-061-1/+1
| | | | | | | Avoids warnings on 32bit. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add support for NV_dedicated_allocationDave Airlie2017-02-271-18/+16
| | | | | | | | | This adds initial support for NV_dedicated_allocation, then uses it for the wsi image/memory allocation paths internally in the driver. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan/wsi/radv: add initial prime support (v1.1)Dave Airlie2017-02-271-11/+125
| | | | | | | | | | | | | | | | | | | This is a complete rewrite of my previous rfc patches. This adds the ability to present to a different GPU that rendering using a driver side operation that can copy from the tiled to linear shared image. This does prime support completely in the swapchain present code, and each queue has a precreated command buffer for each image and for the each queue family. This means presenting should work on graphics and compute queues and transfer in the future. v1.1: initialise needs_linear_copy in swapchain. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Mike Lothian <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Special case the initial preamble.Bas Nieuwenhuizen2017-02-211-1/+1
| | | | | | | For flushing we don't want to flush every third IB. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>