This includes 0 options.
The cache parsing is located at a position where we can easily add
config filtering by VkApplicationInfo.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
libvulkan_radeon = shared_library(
'vulkan_radeon',
- [libradv_files, radv_entrypoints, radv_extensions_c, amd_vk_format_table_c, sha1_h],
+ [libradv_files, radv_entrypoints, radv_extensions_c, amd_vk_format_table_c, sha1_h, xmlpool_options_h],
include_directories : [
- inc_common, inc_amd, inc_amd_common, inc_compiler, inc_vulkan_util,
+ inc_common, inc_amd, inc_amd_common, inc_compiler, inc_util, inc_vulkan_util,
inc_vulkan_wsi,
],
link_with : [
libamd_common, libamdgpu_addrlib, libvulkan_util, libvulkan_wsi,
- libmesa_util,
+ libmesa_util, libxmlconfig
],
dependencies : [
dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl, dep_m,
#include "util/debug.h"
#include "util/mesa-sha1.h"
#include "compiler/glsl_types.h"
+#include "util/xmlpool.h"
static int
radv_device_get_cache_uuid(enum radeon_family family, void *uuid)
return -1;
}
+static const char radv_dri_options_xml[] =
+DRI_CONF_BEGIN
+DRI_CONF_END;
+
+static void radv_init_dri_options(struct radv_instance *instance)
+{
+ driParseOptionInfo(&instance->available_dri_options, radv_dri_options_xml);
+ driParseConfigFiles(&instance->dri_options,
+ &instance->available_dri_options,
+ 0, "radv", NULL);
+}
VkResult radv_CreateInstance(
const VkInstanceCreateInfo* pCreateInfo,
VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false));
+ radv_init_dri_options(instance);
radv_handle_per_app_options(instance, pCreateInfo->pApplicationInfo);
*pInstance = radv_instance_to_handle(instance);
glsl_type_singleton_decref();
_mesa_locale_fini();
+ driDestroyOptionCache(&instance->dri_options);
+ driDestroyOptionInfo(&instance->available_dri_options);
+
vk_debug_report_instance_destroy(&instance->debug_report_callbacks);
vk_free(&instance->alloc, instance);
#include "compiler/shader_enums.h"
#include "util/macros.h"
#include "util/list.h"
+#include "util/xmlconfig.h"
#include "main/macros.h"
#include "vk_alloc.h"
#include "vk_debug_report.h"
struct vk_debug_report_instance debug_report_callbacks;
struct radv_instance_extension_table enabled_extensions;
+
+ struct driOptionCache dri_options;
+ struct driOptionCache available_dri_options;
};
VkResult radv_init_wsi(struct radv_physical_device *physical_device);