[Mesa-dev] [PATCH 10/16] gallium: add driconf options to pipe_screen_config
Nicolai Hähnle
nhaehnle at gmail.com
Fri Jun 30 12:45:51 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/auxiliary/pipe-loader/pipe_loader.c | 3 +++
src/gallium/include/pipe/p_screen.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
index 95e6b42..f55312f 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
@@ -104,20 +104,23 @@ pipe_loader_load_options(struct pipe_loader_device *dev)
driParseOptionInfo(&dev->option_info, xml_options);
driParseConfigFiles(&dev->option_cache, &dev->option_info, 0,
dev->driver_name);
}
struct pipe_screen *
pipe_loader_create_screen(struct pipe_loader_device *dev,
struct pipe_screen_config *config)
{
+ pipe_loader_load_options(dev);
+ config->options = &dev->option_cache;
+
return dev->ops->create_screen(dev, config);
}
struct util_dl_library *
pipe_loader_find_module(struct pipe_loader_device *dev,
const char *library_paths)
{
struct util_dl_library *lib;
const char *next;
char path[PATH_MAX];
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index a804aa9..bf26a52 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -52,20 +52,21 @@ extern "C" {
/** Opaque types */
struct winsys_handle;
struct pipe_fence_handle;
struct pipe_resource;
struct pipe_surface;
struct pipe_transfer;
struct pipe_box;
struct pipe_memory_info;
struct disk_cache;
+struct driOptionCache;
/**
* Gallium screen/adapter context. Basically everything
* hardware-specific that doesn't actually require a rendering
* context.
*/
struct pipe_screen {
void (*destroy)( struct pipe_screen * );
@@ -358,18 +359,19 @@ struct pipe_screen {
uint64_t *modifiers,
unsigned int *external_only, int *count);
};
/**
* Global configuration options for screen creation.
*/
struct pipe_screen_config {
unsigned flags;
+ const struct driOptionCache *options;
};
#ifdef __cplusplus
}
#endif
#endif /* P_SCREEN_H */
--
2.9.3
More information about the mesa-dev
mailing list