aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtney@LunarG.com>2015-06-10 20:39:06 -0600
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-06-17 19:47:02 -0600
commit8b6cae047953411ebcc4befc5273ced2be8a19ec (patch)
tree35569e8684b576ca18c072c65a050d63f8c36a33
parent4fa89b139df05816d6f710a2da8c14e98e1b393b (diff)
downloadusermoji-8b6cae047953411ebcc4befc5273ced2be8a19ec.tar.xz
loader: FIXME - horrible WSI workaround
-rw-r--r--loader/wsi_lunarg.c14
1 files 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;
}