diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-02-17 14:21:21 -0700 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-02-17 16:45:57 -0700 |
| commit | 954d79e85996e641aa842d89c16abc63dd0cd273 (patch) | |
| tree | 4efdee65355d6628d4d5fb7eaecdc553147db5e5 /loader/loader.c | |
| parent | 28849dcc74c4726bd335040087ff6d425945fa1e (diff) | |
| download | usermoji-954d79e85996e641aa842d89c16abc63dd0cd273.tar.xz | |
loader: Enable env extensions as well as app.
Diffstat (limited to 'loader/loader.c')
| -rw-r--r-- | loader/loader.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/loader/loader.c b/loader/loader.c index 34df4a5e..9a5312f8 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -700,11 +700,11 @@ static uint32_t loader_get_layer_env(struct loader_icd *icd, uint32_t gpu_index, static uint32_t loader_get_layer_libs(struct loader_icd *icd, uint32_t gpu_index, const XGL_DEVICE_CREATE_INFO* pCreateInfo, struct layer_name_pair **ppLayerNames) { static struct layer_name_pair layerNames[MAX_LAYER_LIBRARIES]; + int env_layer_count = 0; *ppLayerNames = &layerNames[0]; - if (!pCreateInfo) { - return loader_get_layer_env(icd, gpu_index, layerNames); - } + /* Load any layers specified in the environment first */ + env_layer_count = loader_get_layer_env(icd, gpu_index, layerNames); const XGL_LAYER_CREATE_INFO *pCi = (const XGL_LAYER_CREATE_INFO *) pCreateInfo->pNext; @@ -713,7 +713,7 @@ static uint32_t loader_get_layer_libs(struct loader_icd *icd, uint32_t gpu_index if (pCi->sType == XGL_STRUCTURE_TYPE_LAYER_CREATE_INFO) { const char *name; uint32_t len; - for (uint32_t i = 0; i < pCi->layerCount; i++) { + for (uint32_t i = env_layer_count; i < (env_layer_count + pCi->layerCount); i++) { const char * lib_name = NULL; name = *(pCi->ppActiveLayerNames + i); if (!find_layer_name(icd, gpu_index, name, &lib_name)) |
