The usage of the layer property list inside of
loader_check_layer_list_for_phys_dev_ext_address was modified when the
list changed from an array of struct loader_layer_properties, to an array
of pointers to struct loader_layer_properties. Except, the usages of
layer_prop_list were not updated in kind, leading to out of bounds indexes
when searching for unknown physical device functions in layers. This causes
crashes in the validation layer tests, which make use of this functionality.
// Find the first layer in the call chain which supports vk_layerGetPhysicalDeviceProcAddr
// and call that, returning whether it found a valid pointer for this function name.
// We return if the topmost layer supports GPDPA since the layer should call down the chain for us.
- if (layer_prop_list[layer].interface_version > 1) {
- const struct loader_layer_functions *const functions = &(layer_prop_list[layer].functions);
+ if (layer_prop_list->interface_version > 1) {
+ const struct loader_layer_functions *const functions = &(layer_prop_list->functions);
if (NULL != functions->get_physical_device_proc_addr) {
return NULL != functions->get_physical_device_proc_addr((VkInstance)inst->instance, funcName);
}