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/winsys/amdgpu/drm | |
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/winsys/amdgpu/drm')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_public.h | 5 | ||||
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_public.h b/src/gallium/winsys/amdgpu/drm/amdgpu_public.h index 3cb5a1bf429..8702e4f6e8a 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_public.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_public.h @@ -31,12 +31,13 @@ struct radeon_winsys; struct pipe_screen; +struct pipe_screen_config; typedef struct pipe_screen *(*radeon_screen_create_t)(struct radeon_winsys *, - unsigned); + const struct pipe_screen_config *config); struct radeon_winsys * -amdgpu_winsys_create(int fd, unsigned flags, +amdgpu_winsys_create(int fd, const struct pipe_screen_config *config, radeon_screen_create_t screen_create); #endif diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 837c1e2aae0..26c7dacb9df 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -231,7 +231,7 @@ static const char* amdgpu_get_chip_name(struct radeon_winsys *ws) PUBLIC struct radeon_winsys * -amdgpu_winsys_create(int fd, unsigned flags, +amdgpu_winsys_create(int fd, const struct pipe_screen_config *config, radeon_screen_create_t screen_create) { struct amdgpu_winsys *ws; @@ -328,7 +328,7 @@ amdgpu_winsys_create(int fd, unsigned flags, * * Alternatively, we could create the screen based on "ws->gen" * and link all drivers into one binary blob. */ - ws->base.screen = screen_create(&ws->base, flags); + ws->base.screen = screen_create(&ws->base, config); if (!ws->base.screen) { amdgpu_winsys_destroy(&ws->base); mtx_unlock(&dev_tab_mutex); |