On Sunday, October 22, 2017 1:01:38 PM PDT Jordan Justen wrote: > Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> > Reviewed-by: Timothy Arceri <tarc...@itsqueeze.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 c8de0746387..949ec4a2a3d 100644 > --- a/src/mesa/drivers/dri/i965/brw_context.c > +++ b/src/mesa/drivers/dri/i965/brw_context.c > @@ -1033,6 +1033,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 26e71e62b54..834b9ae3d5a 100644 > --- a/src/mesa/drivers/dri/i965/brw_context.h > +++ b/src/mesa/drivers/dri/i965/brw_context.h > @@ -1211,6 +1211,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; > }; > >
Why are we storing this in brw_context? Maybe I'm missing something, but it looks like we store it in ctx->Const and never use the brw_context copy again. Seems like we could put it there directly. Can we also move this to brw_process_driconf_options() instead of the end of brwCreateContext? I'm always a bit confused about the driver/screen split here, but I think this looks right. With those changes, Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev