#include "util/xmlconfig.h"
#include "util/xmlpool.h"
+#include <string.h>
+
#ifdef _MSC_VER
#include <stdlib.h>
#define PATH_MAX _MAX_PATH
};
const char gallium_driinfo_xml[] =
+ DRI_CONF_BEGIN
#include "driinfo_gallium.h"
+ DRI_CONF_END
;
int
driParseOptionInfo(&dev->option_info, xml_options);
driParseConfigFiles(&dev->option_cache, &dev->option_info, 0,
- dev->driver_name);
+ dev->driver_name, NULL);
+}
+
+char *
+pipe_loader_get_driinfo_xml(const char *driver_name)
+{
+#ifdef HAVE_LIBDRM
+ char *xml = pipe_loader_drm_get_driinfo_xml(driver_name);
+#else
+ char *xml = NULL;
+#endif
+
+ if (!xml)
+ xml = strdup(gallium_driinfo_xml);
+
+ return xml;
}
struct pipe_screen *
-pipe_loader_create_screen(struct pipe_loader_device *dev,
- struct pipe_screen_config *config)
+pipe_loader_create_screen(struct pipe_loader_device *dev)
{
+ struct pipe_screen_config config;
+
pipe_loader_load_options(dev);
- config->options = &dev->option_cache;
+ config.options = &dev->option_cache;
- return dev->ops->create_screen(dev, config);
+ return dev->ops->create_screen(dev, &config);
}
struct util_dl_library *