aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.c
diff options
context:
space:
mode:
authorJon Ashburn <jon@lunarg.com>2016-05-17 08:43:38 -0600
committerJon Ashburn <jon@lunarg.com>2016-05-17 09:18:34 -0600
commit0939555719cf25b17ac128626ab348bedef36506 (patch)
tree4ccea3724959504e787e228f74d9ebec4d060017 /loader/loader.c
parentd3b932c28d1cefac406562adcf7ea5b2f24978f9 (diff)
downloadusermoji-0939555719cf25b17ac128626ab348bedef36506.tar.xz
loader: Treat GLOBAL layers same as INSTANCE layers
Also change validation layers type to be GLOBAL so they work with old loaders prior to device layer deprecation. Change-Id: I32788cb7788c8ad840ced15236c5ed792edfbbff
Diffstat (limited to 'loader/loader.c')
-rw-r--r--loader/loader.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/loader/loader.c b/loader/loader.c
index cff4353a..151c7d73 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1907,18 +1907,9 @@ loader_add_layer_properties(const struct loader_instance *inst,
continue;
}
- if (!strcmp(type, "INSTANCE")) {
- if (layer_instance_list == NULL) {
- layer_node = layer_node->next;
- continue;
- }
- props = loader_get_next_layer_property(inst, layer_instance_list);
- props->type = (is_implicit) ? VK_LAYER_TYPE_INSTANCE_IMPLICIT
- : VK_LAYER_TYPE_INSTANCE_EXPLICIT;
- }
- if (!strcmp(type, "GLOBAL")) {
- loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0,
- "Global layers are treated the same as instance layers");
+ // Allow either GLOBAL or INSTANCE type interchangeably to handle
+ // layers that must work with older loaders
+ if (!strcmp(type, "INSTANCE") || !strcmp(type, "GLOBAL")) {
if (layer_instance_list == NULL) {
layer_node = layer_node->next;
continue;