projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
anv/pipeline: Add sample locations for gen7-7.5
[mesa.git]
/
src
/
intel
/
vulkan
/
anv_wsi.c
diff --git
a/src/intel/vulkan/anv_wsi.c
b/src/intel/vulkan/anv_wsi.c
index c2938f3836fd79da765cc7f5f5d0eb8ad1cf122d..006944a7e25063d10d1a4c3dbb1f3ddc4450957a 100644
(file)
--- a/
src/intel/vulkan/anv_wsi.c
+++ b/
src/intel/vulkan/anv_wsi.c
@@
-24,18
+24,24
@@
#include "anv_wsi.h"
VkResult
#include "anv_wsi.h"
VkResult
-anv_init_wsi(struct anv_
instance *instan
ce)
+anv_init_wsi(struct anv_
physical_device *physical_devi
ce)
{
VkResult result;
{
VkResult result;
- result = anv_x11_init_wsi(instance);
+ memset(physical_device->wsi, 0, sizeof(physical_device->wsi));
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ result = anv_x11_init_wsi(physical_device);
if (result != VK_SUCCESS)
return result;
if (result != VK_SUCCESS)
return result;
+#endif
-#ifdef
HAVE_WAYLAND_PLATFORM
- result = anv_wl_init_wsi(
instan
ce);
+#ifdef
VK_USE_PLATFORM_WAYLAND_KHR
+ result = anv_wl_init_wsi(
physical_devi
ce);
if (result != VK_SUCCESS) {
if (result != VK_SUCCESS) {
- anv_x11_finish_wsi(instance);
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ anv_x11_finish_wsi(physical_device);
+#endif
return result;
}
#endif
return result;
}
#endif
@@
-44,12
+50,14
@@
anv_init_wsi(struct anv_instance *instance)
}
void
}
void
-anv_finish_wsi(struct anv_
instance *instan
ce)
+anv_finish_wsi(struct anv_
physical_device *physical_devi
ce)
{
{
-#ifdef HAVE_WAYLAND_PLATFORM
- anv_wl_finish_wsi(instance);
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ anv_wl_finish_wsi(physical_device);
+#endif
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ anv_x11_finish_wsi(physical_device);
#endif
#endif
- anv_x11_finish_wsi(instance);
}
void anv_DestroySurfaceKHR(
}
void anv_DestroySurfaceKHR(
@@
-71,7
+79,7
@@
VkResult anv_GetPhysicalDeviceSurfaceSupportKHR(
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
- struct anv_wsi_interface *iface = device->
instance->
wsi[surface->platform];
+ struct anv_wsi_interface *iface = device->wsi[surface->platform];
return iface->get_support(surface, device, queueFamilyIndex, pSupported);
}
return iface->get_support(surface, device, queueFamilyIndex, pSupported);
}
@@
-83,7
+91,7
@@
VkResult anv_GetPhysicalDeviceSurfaceCapabilitiesKHR(
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
- struct anv_wsi_interface *iface = device->
instance->
wsi[surface->platform];
+ struct anv_wsi_interface *iface = device->wsi[surface->platform];
return iface->get_capabilities(surface, device, pSurfaceCapabilities);
}
return iface->get_capabilities(surface, device, pSurfaceCapabilities);
}
@@
-96,7
+104,7
@@
VkResult anv_GetPhysicalDeviceSurfaceFormatsKHR(
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
- struct anv_wsi_interface *iface = device->
instance->
wsi[surface->platform];
+ struct anv_wsi_interface *iface = device->wsi[surface->platform];
return iface->get_formats(surface, device, pSurfaceFormatCount,
pSurfaceFormats);
return iface->get_formats(surface, device, pSurfaceFormatCount,
pSurfaceFormats);
@@
-110,7
+118,7
@@
VkResult anv_GetPhysicalDeviceSurfacePresentModesKHR(
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
- struct anv_wsi_interface *iface = device->
instance->
wsi[surface->platform];
+ struct anv_wsi_interface *iface = device->wsi[surface->platform];
return iface->get_present_modes(surface, device, pPresentModeCount,
pPresentModes);
return iface->get_present_modes(surface, device, pPresentModeCount,
pPresentModes);
@@
-124,7
+132,8
@@
VkResult anv_CreateSwapchainKHR(
{
ANV_FROM_HANDLE(anv_device, device, _device);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, pCreateInfo->surface);
{
ANV_FROM_HANDLE(anv_device, device, _device);
ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, pCreateInfo->surface);
- struct anv_wsi_interface *iface = device->instance->wsi[surface->platform];
+ struct anv_wsi_interface *iface =
+ device->instance->physicalDevice.wsi[surface->platform];
struct anv_swapchain *swapchain;
VkResult result = iface->create_swapchain(surface, device, pCreateInfo,
struct anv_swapchain *swapchain;
VkResult result = iface->create_swapchain(surface, device, pCreateInfo,