From 8b6cae047953411ebcc4befc5273ced2be8a19ec Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Wed, 10 Jun 2015 20:39:06 -0600 Subject: loader: FIXME - horrible WSI workaround --- loader/wsi_lunarg.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/loader/wsi_lunarg.c b/loader/wsi_lunarg.c index c226a022..14e3cb92 100644 --- a/loader/wsi_lunarg.c +++ b/loader/wsi_lunarg.c @@ -105,13 +105,19 @@ VkResult loader_GetDisplayInfoWSI( size_t* pDataSize, void* pData) { - uint32_t gpu_index; /* TODO: need another way to find the icd, display is not a gpu object */ - struct loader_icd *icd = loader_get_icd((const VkBaseLayerObject *) display, &gpu_index); +// uint32_t gpu_index; +// struct loader_icd *icd = loader_get_icd((VkPhysicalDevice) display, &gpu_index); //TODO fix dispaly -> PhysDev VkResult res = VK_ERROR_INITIALIZATION_FAILED; - if (icd->GetDisplayInfoWSI) - res = icd->GetDisplayInfoWSI(display, infoType, pDataSize, pData); + for (struct loader_instance *inst = loader.instances; inst; inst = inst->next) { + for (struct loader_icd *icd = inst->icds; icd; icd = icd->next) { + for (uint32_t i = 0; i < icd->gpu_count; i++) { + if (icd->GetDisplayInfoWSI) + res = icd->GetDisplayInfoWSI(display, infoType, pDataSize, pData); + } + } + } return res; } -- cgit v1.2.3