diff options
author | Nicolai Hähnle <[email protected]> | 2017-06-28 14:47:32 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-08-02 09:50:57 +0200 |
commit | bc7f41e11d325280db12e7b9444501357bc13922 (patch) | |
tree | 418517dd1010fd545e4059610b2a63541f823dd5 /src/gallium/drivers | |
parent | 781375ac6f4025d8af729fc3886ea9995f184667 (diff) |
gallium: add pipe_screen_config to screen_create functions
This allows a more generic mechanism for passing user configurations
into drivers by accessing the dri options directly.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r300/r300_public.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_public.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_public.h | 2 |
6 files changed, 14 insertions, 8 deletions
diff --git a/src/gallium/drivers/r300/r300_public.h b/src/gallium/drivers/r300/r300_public.h index d2300103aaa..bf54cc4dfc0 100644 --- a/src/gallium/drivers/r300/r300_public.h +++ b/src/gallium/drivers/r300/r300_public.h @@ -7,8 +7,10 @@ extern "C" { #endif struct radeon_winsys; +struct pipe_screen_config; -struct pipe_screen* r300_screen_create(struct radeon_winsys *rws, unsigned flags); +struct pipe_screen* r300_screen_create(struct radeon_winsys *rws, + const struct pipe_screen_config *config); #ifdef __cplusplus } // extern "C" diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index c78c484b82c..7d82608e70e 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -726,7 +726,8 @@ static boolean r300_fence_finish(struct pipe_screen *screen, return rws->fence_wait(rws, fence, timeout); } -struct pipe_screen* r300_screen_create(struct radeon_winsys *rws, unsigned flags) +struct pipe_screen* r300_screen_create(struct radeon_winsys *rws, + const struct pipe_screen_config *config) { struct r300_screen *r300screen = CALLOC_STRUCT(r300_screen); diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 0f30d0985c1..e7e29998513 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -634,7 +634,8 @@ static struct pipe_resource *r600_resource_create(struct pipe_screen *screen, return r600_resource_create_common(screen, templ); } -struct pipe_screen *r600_screen_create(struct radeon_winsys *ws, unsigned flags) +struct pipe_screen *r600_screen_create(struct radeon_winsys *ws, + const struct pipe_screen_config *config) { struct r600_screen *rscreen = CALLOC_STRUCT(r600_screen); @@ -649,7 +650,7 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws, unsigned flags) rscreen->b.b.get_shader_param = r600_get_shader_param; rscreen->b.b.resource_create = r600_resource_create; - if (!r600_common_screen_init(&rscreen->b, ws, flags)) { + if (!r600_common_screen_init(&rscreen->b, ws, config->flags)) { FREE(rscreen); return NULL; } diff --git a/src/gallium/drivers/r600/r600_public.h b/src/gallium/drivers/r600/r600_public.h index 2018440070d..937b8f7cc44 100644 --- a/src/gallium/drivers/r600/r600_public.h +++ b/src/gallium/drivers/r600/r600_public.h @@ -24,7 +24,9 @@ #define R600_PUBLIC_H struct radeon_winsys; +struct pipe_screen_config; -struct pipe_screen *r600_screen_create(struct radeon_winsys *ws, unsigned flags); +struct pipe_screen *r600_screen_create(struct radeon_winsys *ws, + const struct pipe_screen_config *config); #endif diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 67bc7bf4aec..d276b885c11 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -966,7 +966,7 @@ static void si_test_vmfault(struct si_screen *sscreen) } struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws, - unsigned flags) + const struct pipe_screen_config *config) { struct si_screen *sscreen = CALLOC_STRUCT(si_screen); unsigned num_threads, num_compiler_threads, num_compiler_threads_lowprio, i; @@ -985,7 +985,7 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws, si_init_screen_state_functions(sscreen); - if (!r600_common_screen_init(&sscreen->b, ws, flags) || + if (!r600_common_screen_init(&sscreen->b, ws, config->flags) || !si_init_gs_info(sscreen) || !si_init_shader_cache(sscreen)) { FREE(sscreen); diff --git a/src/gallium/drivers/radeonsi/si_public.h b/src/gallium/drivers/radeonsi/si_public.h index 13b1731bc3c..d5027175e23 100644 --- a/src/gallium/drivers/radeonsi/si_public.h +++ b/src/gallium/drivers/radeonsi/si_public.h @@ -26,6 +26,6 @@ struct radeon_winsys; struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws, - unsigned flags); + const struct pipe_screen_config *config); #endif |