mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
gallium/dri2: Make dri_init_options just init DRI options.
pipe_loader_create_screen() sets up the driconf anyway, so we can just call this after that. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135>
This commit is contained in:
parent
23a9339985
commit
fdf9ebf317
5 changed files with 18 additions and 21 deletions
|
|
@ -105,7 +105,14 @@ merge_driconf(const driOptionDescription *driver_driconf, unsigned driver_count,
|
|||
return merged;
|
||||
}
|
||||
|
||||
void
|
||||
/**
|
||||
* Ensure that dev->option_cache is initialized appropriately for the driver.
|
||||
*
|
||||
* This function can be called multiple times.
|
||||
*
|
||||
* \param dev Device for which options should be loaded.
|
||||
*/
|
||||
static void
|
||||
pipe_loader_load_options(struct pipe_loader_device *dev)
|
||||
{
|
||||
if (dev->option_info.info)
|
||||
|
|
|
|||
|
|
@ -100,14 +100,14 @@ struct pipe_screen *
|
|||
pipe_loader_create_screen(struct pipe_loader_device *dev);
|
||||
|
||||
/**
|
||||
* Ensure that dev->option_cache is initialized appropriately for the driver.
|
||||
* Ensures that the driconf option cache has been parsed for the driver.
|
||||
*
|
||||
* This function can be called multiple times.
|
||||
*
|
||||
* \param dev Device for which options should be loaded.
|
||||
* Drivers may parse during screen creation, but for those that don't (probably
|
||||
* due to not having any driver-specific driconf options), this can be used to
|
||||
* finish the parsing so that general driconf options can be queried.
|
||||
*/
|
||||
void
|
||||
pipe_loader_load_options(struct pipe_loader_device *dev);
|
||||
pipe_loader_config_options(struct pipe_loader_device *dev);
|
||||
|
||||
/**
|
||||
* Get the driinfo XML string used by the given driver.
|
||||
|
|
|
|||
|
|
@ -2330,9 +2330,8 @@ dri2_init_screen(__DRIscreen * sPriv)
|
|||
sPriv->driverPrivate = (void *)screen;
|
||||
|
||||
if (pipe_loader_drm_probe_fd(&screen->dev, screen->fd)) {
|
||||
dri_init_options(screen);
|
||||
|
||||
pscreen = pipe_loader_create_screen(screen->dev);
|
||||
dri_init_options(screen);
|
||||
}
|
||||
|
||||
if (!pscreen)
|
||||
|
|
@ -2387,8 +2386,8 @@ dri_kms_init_screen(__DRIscreen * sPriv)
|
|||
sPriv->driverPrivate = (void *)screen;
|
||||
|
||||
if (pipe_loader_sw_probe_kms(&screen->dev, screen->fd)) {
|
||||
dri_init_options(screen);
|
||||
pscreen = pipe_loader_create_screen(screen->dev);
|
||||
dri_init_options(screen);
|
||||
}
|
||||
|
||||
if (!pscreen)
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ const __DRIconfigOptionsExtension gallium_config_options = {
|
|||
|
||||
#define false 0
|
||||
|
||||
static void
|
||||
dri_fill_st_options(struct dri_screen *screen)
|
||||
void
|
||||
dri_init_options(struct dri_screen *screen)
|
||||
{
|
||||
struct st_config_options *options = &screen->options;
|
||||
const struct driOptionCache *optionCache = &screen->dev->option_cache;
|
||||
|
|
@ -583,14 +583,6 @@ dri_set_background_context(struct st_context_iface *st,
|
|||
hud_add_queue_for_monitoring(ctx->hud, queue_info);
|
||||
}
|
||||
|
||||
void
|
||||
dri_init_options(struct dri_screen *screen)
|
||||
{
|
||||
pipe_loader_load_options(screen->dev);
|
||||
|
||||
dri_fill_st_options(screen);
|
||||
}
|
||||
|
||||
const __DRIconfig **
|
||||
dri_init_screen_helper(struct dri_screen *screen,
|
||||
struct pipe_screen *pscreen)
|
||||
|
|
|
|||
|
|
@ -522,9 +522,8 @@ drisw_init_screen(__DRIscreen * sPriv)
|
|||
}
|
||||
|
||||
if (pipe_loader_sw_probe_dri(&screen->dev, lf)) {
|
||||
dri_init_options(screen);
|
||||
|
||||
pscreen = pipe_loader_create_screen(screen->dev);
|
||||
dri_init_options(screen);
|
||||
}
|
||||
|
||||
if (!pscreen)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue