[Mesa-dev] [PATCH 23/27] i965: Initialize sha1 hash of dri config options

Jordan Justen jordan.l.justen at intel.com
Sat Aug 19 07:44:39 UTC 2017


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_context.c | 4 ++++
 src/mesa/drivers/dri/i965/brw_context.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index d97a24fbf8..3904bc708b 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1010,6 +1010,10 @@ brwCreateContext(gl_api api,
    vbo_use_buffer_objects(ctx);
    vbo_always_unmap_buffers(ctx);
 
+   driComputeOptionsSha1(&brw->screen->optionCache,
+                         brw->dri_config_options_sha1);
+   brw->ctx.Const.dri_config_options_sha1 = brw->dri_config_options_sha1;
+
    return true;
 }
 
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index d41e6aa7bd..fa4b65875b 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1236,6 +1236,7 @@ struct brw_context
    bool draw_aux_buffer_disabled[MAX_DRAW_BUFFERS];
 
    __DRIcontext *driContext;
+   unsigned char dri_config_options_sha1[20];
    struct intel_screen *screen;
 };
 
-- 
2.14.0



More information about the mesa-dev mailing list