Mesa (staging/21.0): i965: Don't parse driconf again

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 28 18:46:55 UTC 2021


Module: Mesa
Branch: staging/21.0
Commit: d27c65945e9a1a864f107c36b7e03433282c9690
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d27c65945e9a1a864f107c36b7e03433282c9690

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Jan 27 12:01:26 2021 -0800

i965: Don't parse driconf again

It was already parsed in intelInitScree2, and the results are stored in
the screen.

Fixes: d67ef485804 ("i965/screen: Allow drirc to set 'allow_rgb10_configs' again.")
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387>
(cherry picked from commit 0f1a8f8a6d231c0e265eb22781a0002baa1823b0)

---

 .pick_status.json                            |  2 +-
 src/mesa/drivers/dri/i965/brw_context.c      | 14 ++++----------
 src/mesa/drivers/dri/i965/brw_context.h      |  2 --
 src/mesa/drivers/dri/i965/intel_extensions.c |  2 +-
 4 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 25154362595..621dbdc300e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -148,7 +148,7 @@
         "description": "i965: Don't parse driconf again",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "d67ef485804cab53499dd763db136070ef107a16"
     },
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index bdb754d41eb..a6408cb51f2 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -579,7 +579,7 @@ brw_initialize_context_constants(struct brw_context *brw)
    int max_samples;
    const int *msaa_modes = intel_supported_msaa_modes(brw->screen);
    const int clamp_max_samples =
-      driQueryOptioni(&brw->optionCache, "clamp_max_samples");
+      driQueryOptioni(&brw->screen->optionCache, "clamp_max_samples");
 
    if (clamp_max_samples < 0) {
       max_samples = msaa_modes[0];
@@ -858,11 +858,7 @@ brw_process_driconf_options(struct brw_context *brw)
 {
    const struct gen_device_info *devinfo = &brw->screen->devinfo;
    struct gl_context *ctx = &brw->ctx;
-
-   driOptionCache *options = &brw->optionCache;
-   driParseConfigFiles(options, &brw->screen->optionCache,
-                       brw->driContext->driScreenPriv->myNum,
-                       "i965", NULL, NULL, 0, NULL, 0);
+   const driOptionCache *const options = &brw->screen->optionCache;
 
    if (INTEL_DEBUG & DEBUG_NO_HIZ) {
        brw->has_hiz = false;
@@ -889,9 +885,9 @@ brw_process_driconf_options(struct brw_context *brw)
       brw->disable_throttling = true;
    }
 
-   brw->precompile = driQueryOptionb(&brw->optionCache, "shader_precompile");
+   brw->precompile = driQueryOptionb(&brw->screen->optionCache, "shader_precompile");
 
-   if (driQueryOptionb(&brw->optionCache, "precise_trig"))
+   if (driQueryOptionb(&brw->screen->optionCache, "precise_trig"))
       brw->screen->compiler->precise_trig = true;
 
    ctx->Const.ForceGLSLExtensionsWarn =
@@ -1244,8 +1240,6 @@ intelDestroyContext(__DRIcontext * driContextPriv)
    brw->throttle_batch[1] = NULL;
    brw->throttle_batch[0] = NULL;
 
-   driDestroyOptionCache(&brw->optionCache);
-
    /* free the Mesa context */
    _mesa_free_context_data(&brw->ctx, true);
 
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index aaf1a7e0d0b..fac7802cbbc 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -813,8 +813,6 @@ struct brw_context
    bool disable_throttling;
    bool precompile;
    bool dual_color_blend_by_location;
-
-   driOptionCache optionCache;
    /** @} */
 
    GLuint primitive; /**< Hardware primitive, such as _3DPRIM_TRILIST. */
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index f78cd82fbd9..dd7f5a8241c 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -180,7 +180,7 @@ intelInitExtensions(struct gl_context *ctx)
 
    if (devinfo->gen >= 6) {
       ctx->Extensions.ARB_blend_func_extended =
-         !driQueryOptionb(&brw->optionCache, "disable_blend_func_extended");
+         !driQueryOptionb(&brw->screen->optionCache, "disable_blend_func_extended");
       ctx->Extensions.ARB_conditional_render_inverted = true;
       ctx->Extensions.ARB_cull_distance = true;
       ctx->Extensions.ARB_draw_buffers_blend = true;



More information about the mesa-commit mailing list