diff options
| author | Jon Ashburn <jon@lunarg.com> | 2014-12-18 17:00:52 -0700 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2014-12-19 17:59:39 -0700 |
| commit | 32143bc255ea296bd54f0380acb92c6a17ef7075 (patch) | |
| tree | c48774de97c3db5ad0a3385e370083708161c134 | |
| parent | 5d0c4b0c53bcbc5359f733e00fbef6140e005a14 (diff) | |
| download | usermoji-32143bc255ea296bd54f0380acb92c6a17ef7075.tar.xz | |
loader: Make sure msg callbacks get registered if added before initAndEnumGpu
Fix bug where xglDbgRegisterMsgCallback wasn't working if called prior to
xglInitAndEnumerateGpus.
| -rw-r--r-- | loader/loader.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/loader/loader.c b/loader/loader.c index 7229cf0a..87730bee 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -288,13 +288,6 @@ static struct loader_icd *loader_icd_add(const char *filename) if (!icd) return NULL; - if (loader_icd_set_global_options(icd) != XGL_SUCCESS || - loader_icd_register_msg_callbacks(icd) != XGL_SUCCESS) { - loader_log(XGL_DBG_MSG_WARNING, 0, - "%s ignored: failed to migrate settings", filename); - loader_icd_destroy(icd); - } - /* prepend to the list */ icd->next = loader.icds; loader.icds = icd; @@ -364,8 +357,6 @@ static void loader_icd_scan(void) } } - /* we have nothing to log anymore */ - loader_msg_callback_clear(); loader.scanned = true; } @@ -1175,6 +1166,12 @@ LOADER_EXPORT XGL_RESULT XGLAPI xglInitAndEnumerateGpus(const XGL_APPLICATION_IN *disp = icd->loader_dispatch + i; } + if (loader_icd_set_global_options(icd) != XGL_SUCCESS || + loader_icd_register_msg_callbacks(icd) != XGL_SUCCESS) { + loader_log(XGL_DBG_MSG_WARNING, 0, + "ICD ignored: failed to migrate settings"); + loader_icd_destroy(icd); + } count += n; if (count >= maxGpus) { @@ -1185,6 +1182,9 @@ LOADER_EXPORT XGL_RESULT XGLAPI xglInitAndEnumerateGpus(const XGL_APPLICATION_IN icd = icd->next; } + /* we have nothing to log anymore */ + loader_msg_callback_clear(); + /* get layer libraries */ if (!loader.layer_scanned) layer_lib_scan(NULL); |
