diff options
author | Nicolai Hähnle <[email protected]> | 2017-08-03 15:02:09 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-08-04 10:46:24 +0200 |
commit | ae7283dcbc00c6df07118c47f393ed5f52046050 (patch) | |
tree | ab844ffe2f94732b9bc74a1e3dfe1f13e9aaa391 /src/gallium/auxiliary/pipe-loader | |
parent | 9fb8476e67a4470bc327303cadcf5320b34c6ebc (diff) |
pipe-loader: remove config from pipe_loader_create_screen
The config passed into the screen should be independent from the state
tracker, because at least in the case of radeonsi, the screen structure
can be shared between different state trackers.
Incidentally, this also fixes crashes that were recently introduced.
Fixes: a35a9e7c ("gallium: add driconf options to pipe_screen_config")
Tested-by: Dieter Nützel <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader')
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader.c | 9 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader.h | 5 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c index 6d9acebdb68..926db49fd24 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c @@ -123,13 +123,14 @@ pipe_loader_get_driinfo_xml(const char *driver_name) } 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 * diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h index b6e81cf3915..b50114310b4 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h @@ -86,12 +86,9 @@ pipe_loader_probe(struct pipe_loader_device **devs, int ndev); * Create a pipe_screen for the specified device. * * \param dev Device the screen will be created for. - * \param config Configuration options. The lifetime of this structure and its - * elements may be limited to the duration of this call. */ 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); /** * Query the configuration parameters for the specified device. |