}
}
- struct anv_physical_device *pdevice = &instance->physicalDevice;
- for (unsigned i = 0; i < ARRAY_SIZE(pdevice->dispatch.entrypoints); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(instance->physical_device_dispatch.entrypoints); i++) {
/* Vulkan requires that entrypoints for extensions which have not been
* enabled must not be advertised.
*/
if (!anv_physical_device_entrypoint_is_enabled(i, instance->app_info.api_version,
&instance->enabled_extensions)) {
- pdevice->dispatch.entrypoints[i] = NULL;
+ instance->physical_device_dispatch.entrypoints[i] = NULL;
} else {
- pdevice->dispatch.entrypoints[i] =
+ instance->physical_device_dispatch.entrypoints[i] =
anv_physical_device_dispatch_table.entrypoints[i];
}
}
idx = anv_get_physical_device_entrypoint_index(pName);
if (idx >= 0)
- return instance->physicalDevice.dispatch.entrypoints[idx];
+ return instance->physical_device_dispatch.entrypoints[idx];
idx = anv_get_device_entrypoint_index(pName);
if (idx >= 0)
if (idx < 0)
return NULL;
- return instance->physicalDevice.dispatch.entrypoints[idx];
+ return instance->physical_device_dispatch.entrypoints[idx];
}
% endfor
};
-% for layer in LAYERS:
- % for e in physical_device_entrypoints:
- % if e.alias:
- <% continue %>
- % endif
- % if e.guard is not None:
+% for e in physical_device_entrypoints:
+ % if e.alias and e.alias.enabled:
+ <% continue %>
+ % endif
+ % if e.guard is not None:
#ifdef ${e.guard}
- % endif
- % if layer == 'anv':
- ${e.return_type} __attribute__ ((weak))
- ${e.prefixed_name('anv')}(${e.decl_params()})
- {
- % if e.params[0].type == 'VkPhysicalDevice':
- ANV_FROM_HANDLE(anv_physical_device, anv_physical_device, ${e.params[0].name});
- return anv_physical_device->dispatch.${e.name}(${e.call_params()});
- % else:
- assert(!"Unhandled device child trampoline case: ${e.params[0].type}");
- % endif
- }
- % else:
- ${e.return_type} ${e.prefixed_name(layer)}(${e.decl_params()}) __attribute__ ((weak));
- % endif
- % if e.guard is not None:
+ % endif
+ ${e.return_type} ${e.prefixed_name('anv')}(${e.decl_params()}) __attribute__ ((weak));
+ % if e.guard is not None:
#endif // ${e.guard}
- % endif
- % endfor
+ % endif
+% endfor
- const struct anv_physical_device_dispatch_table ${layer}_physical_device_dispatch_table = {
- % for e in physical_device_entrypoints:
- % if e.guard is not None:
+const struct anv_physical_device_dispatch_table anv_physical_device_dispatch_table = {
+% for e in physical_device_entrypoints:
+ % if e.guard is not None:
#ifdef ${e.guard}
- % endif
- .${e.name} = ${e.prefixed_name(layer)},
- % if e.guard is not None:
+ % endif
+ .${e.name} = ${e.prefixed_name('anv')},
+ % if e.guard is not None:
#endif // ${e.guard}
- % endif
- % endfor
- };
+ % endif
% endfor
+};
% for layer in LAYERS:
bool always_flush_cache;
struct anv_device_extension_table supported_extensions;
- struct anv_physical_device_dispatch_table dispatch;
uint32_t eu_total;
uint32_t subslice_total;
struct anv_instance_extension_table enabled_extensions;
struct anv_instance_dispatch_table dispatch;
+ struct anv_physical_device_dispatch_table physical_device_dispatch;
struct anv_device_dispatch_table device_dispatch;
int physicalDeviceCount;