From 5577474c45265639f35b91d64b36fe5e2b2a59c7 Mon Sep 17 00:00:00 2001 From: Jon Ashburn Date: Mon, 1 Dec 2014 14:22:40 -0700 Subject: layers: Add Multi layer with example of multiple layers per file. --- loader/loader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'loader/loader.c') diff --git a/loader/loader.c b/loader/loader.c index f4f6d1a2..1fc7e3b3 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -821,7 +821,10 @@ extern XGL_UINT loader_activate_layers(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CR nextGpuObj->nextObject = gpuObj; gpuObj = nextGpuObj; - nextGPA = dlsym(icd->layer_libs[gpu_index][i].lib_handle, "xglGetProcAddr"); + char funcStr[256]; + snprintf(funcStr, 256, "%sGetProcAddr",icd->layer_libs[gpu_index][i].name); + if ((nextGPA = dlsym(icd->layer_libs[gpu_index][i].lib_handle, funcStr)) == NULL) + nextGPA = dlsym(icd->layer_libs[gpu_index][i].lib_handle, "xglGetProcAddr"); if (!nextGPA) { loader_log(XGL_DBG_MSG_ERROR, 0, "Failed to find xglGetProcAddr in layer %s", icd->layer_libs[gpu_index][i].name); continue; -- cgit v1.2.3