[Mesa-dev] [PATCH 2/2] st/dri: reduce dri_fill_st_options() params
Timothy Arceri
tarceri at itsqueeze.com
Mon Mar 6 04:03:17 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/state_trackers/dri/dri_screen.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index c2da7e3..da0e414 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -76,23 +76,25 @@ const __DRIconfigOptionsExtension gallium_config_options = {
DRI_CONF_SECTION_MISCELLANEOUS
DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER("false")
DRI_CONF_GLSL_ZERO_INIT("false")
DRI_CONF_SECTION_END
DRI_CONF_END
};
#define false 0
static void
-dri_fill_st_options(struct st_config_options *options,
- const struct driOptionCache * optionCache)
+dri_fill_st_options(struct dri_screen *screen)
{
+ struct st_config_options *options = &screen->options;
+ const struct driOptionCache *optionCache = &screen->optionCache;
+
options->disable_blend_func_extended =
driQueryOptionb(optionCache, "disable_blend_func_extended");
options->disable_glsl_line_continuations =
driQueryOptionb(optionCache, "disable_glsl_line_continuations");
options->disable_shader_bit_encoding =
driQueryOptionb(optionCache, "disable_shader_bit_encoding");
options->force_glsl_extensions_warn =
driQueryOptionb(optionCache, "force_glsl_extensions_warn");
options->force_glsl_version =
driQueryOptioni(optionCache, "force_glsl_version");
@@ -448,21 +450,21 @@ dri_init_screen_helper(struct dri_screen *screen,
else
screen->target = PIPE_TEXTURE_RECT;
driParseOptionInfo(&screen->optionCacheDefaults, gallium_config_options.xml);
driParseConfigFiles(&screen->optionCache,
&screen->optionCacheDefaults,
screen->sPriv->myNum,
driver_name);
- dri_fill_st_options(&screen->options, &screen->optionCache);
+ dri_fill_st_options(screen);
/* Handle force_s3tc_enable. */
if (!util_format_s3tc_enabled && screen->options.force_s3tc_enable) {
/* Ensure libtxc_dxtn has been loaded if available.
* Forcing S3TC on before calling this would prevent loading
* the library.
* This is just a precaution, the driver should have called it
* already.
*/
util_format_s3tc_init();
--
2.9.3
More information about the mesa-dev
mailing list