summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-11-23 12:59:55 +1000
committerDave Airlie <[email protected]>2017-02-27 05:42:16 +1000
commitf695735ed61ea2f11f0fdf032a8ad2c99b6b064c (patch)
treef15f9f19ed80a64e59e2ad754f610e8e6b343aec /src/intel
parent336b05c49a6c6ce915bbd6629da17321ecb72bee (diff)
vulkan/wsi/radv: add initial prime support (v1.1)
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]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_wsi.c5
-rw-r--r--src/intel/vulkan/anv_wsi_x11.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index a69a741723b..4236ee14909 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -94,7 +94,7 @@ VkResult anv_GetPhysicalDeviceSurfaceSupportKHR(
return iface->get_support(surface, &device->wsi_device,
&device->instance->alloc,
- queueFamilyIndex, device->local_fd, pSupported);
+ queueFamilyIndex, device->local_fd, false, pSupported);
}
VkResult anv_GetPhysicalDeviceSurfaceCapabilitiesKHR(
@@ -142,6 +142,8 @@ static VkResult
x11_anv_wsi_image_create(VkDevice device_h,
const VkSwapchainCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks* pAllocator,
+ bool different_gpu,
+ bool linear,
VkImage *image_p,
VkDeviceMemory *memory_p,
uint32_t *size,
@@ -272,6 +274,7 @@ VkResult anv_CreateSwapchainKHR(
alloc = &device->alloc;
VkResult result = iface->create_swapchain(surface, _device,
&device->instance->physicalDevice.wsi_device,
+ device->instance->physicalDevice.local_fd,
pCreateInfo,
alloc, &anv_wsi_image_fns,
&swapchain);
diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index 30425096a99..2feb5f13376 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -42,7 +42,7 @@ VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR(
&device->wsi_device,
&device->instance->alloc,
queueFamilyIndex,
- device->local_fd,
+ device->local_fd, false,
connection, visual_id);
}
@@ -58,7 +58,7 @@ VkBool32 anv_GetPhysicalDeviceXlibPresentationSupportKHR(
&device->wsi_device,
&device->instance->alloc,
queueFamilyIndex,
- device->local_fd,
+ device->local_fd, false,
XGetXCBConnection(dpy), visualID);
}