mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
vk/runtime: keep track of supported instance extensions
Signed-off-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21261>
This commit is contained in:
parent
ca98e4446b
commit
a654a303f8
3 changed files with 10 additions and 2 deletions
|
|
@ -1253,9 +1253,8 @@ radv_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
|
|||
struct vk_instance_dispatch_table dispatch_table;
|
||||
vk_instance_dispatch_table_from_entrypoints(&dispatch_table, &radv_instance_entrypoints, true);
|
||||
vk_instance_dispatch_table_from_entrypoints(&dispatch_table, &wsi_instance_entrypoints, false);
|
||||
struct vk_instance_extension_table extensions_supported = radv_instance_extensions_supported;
|
||||
|
||||
result = vk_instance_init(&instance->vk, &extensions_supported, &dispatch_table,
|
||||
result = vk_instance_init(&instance->vk, &radv_instance_extensions_supported, &dispatch_table,
|
||||
pCreateInfo, pAllocator);
|
||||
if (result != VK_SUCCESS) {
|
||||
vk_free(pAllocator, instance);
|
||||
|
|
|
|||
|
|
@ -135,6 +135,8 @@ vk_instance_init(struct vk_instance *instance,
|
|||
!VERSION_IS_1_0(instance->app_info.api_version))
|
||||
return VK_ERROR_INCOMPATIBLE_DRIVER;
|
||||
|
||||
instance->supported_extensions = supported_extensions;
|
||||
|
||||
for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
|
||||
int idx;
|
||||
for (idx = 0; idx < VK_INSTANCE_EXTENSION_COUNT; idx++) {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,13 @@ struct vk_instance {
|
|||
/** VkInstanceCreateInfo::pApplicationInfo */
|
||||
struct vk_app_info app_info;
|
||||
|
||||
/** Table of all supported instance extensions
|
||||
*
|
||||
* This is the static const struct passed by the driver as the
|
||||
* `supported_extensions` parameter to `vk_instance_init()`.
|
||||
*/
|
||||
const struct vk_instance_extension_table *supported_extensions;
|
||||
|
||||
/** Table of all enabled instance extensions
|
||||
*
|
||||
* This is generated automatically as part of `vk_instance_init()` from
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue