<p dir="ltr"><br>
On Jun 29, 2016 10:28 PM, "Pohjolainen, Topi" <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>> wrote:<br>
><br>
> On Wed, Jun 29, 2016 at 05:37:23PM -0700, Jason Ekstrand wrote:<br>
> > ---<br>
> >  src/mesa/drivers/dri/i965/brw_blorp.c            |  6 +-----<br>
> >  src/mesa/drivers/dri/i965/brw_context.c          |  2 ++<br>
> >  src/mesa/drivers/dri/i965/brw_context.h          |  4 ++++<br>
> >  src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 ++----------<br>
> >  4 files changed, 9 insertions(+), 15 deletions(-)<br>
><br>
> This looks pretty standalone with no dependencies to the earlier series. Could<br>
> we include this before you push them - you could drop the TODO-parts in the<br>
> original patches? Or am I missing something?</p>
<p dir="ltr">Sure, I can do that. Probably cleaner that way.</p>
<p dir="ltr">> ><br>
> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c<br>
> > index f4c80bc..8e36080 100644<br>
> > --- a/src/mesa/drivers/dri/i965/brw_blorp.c<br>
> > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c<br>
> > @@ -280,10 +280,6 @@ brw_blorp_emit_surface_state(struct brw_context *brw,<br>
> >                               uint32_t read_domains, uint32_t write_domain,<br>
> >                               bool is_render_target)<br>
> >  {<br>
> > -   /* TODO: This should go in the context */<br>
> > -   struct isl_device isl_dev;<br>
> > -   isl_device_init(&isl_dev, brw->intelScreen->devinfo, brw->has_swizzling);<br>
> > -<br>
> >     const struct surface_state_info ss_info = surface_state_infos[brw->gen];<br>
> ><br>
> >     struct isl_surf surf;<br>
> > @@ -375,7 +371,7 @@ brw_blorp_emit_surface_state(struct brw_context *brw,<br>
> ><br>
> >     const uint32_t mocs = is_render_target ? ss_info.rb_mocs : ss_info.tex_mocs;<br>
> ><br>
> > -   isl_surf_fill_state(&isl_dev, dw, .surf = &surf, .view = &view,<br>
> > +   isl_surf_fill_state(&brw->isl_dev, dw, .surf = &surf, .view = &view,<br>
> >                         .address = surface->mt->bo->offset64 + offset,<br>
> >                         .aux_surf = aux_surf, .aux_usage = aux_usage,<br>
> >                         .aux_address = aux_offset,<br>
> > diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c<br>
> > index c7a66cb..3b9ec47 100644<br>
> > --- a/src/mesa/drivers/dri/i965/brw_context.c<br>
> > +++ b/src/mesa/drivers/dri/i965/brw_context.c<br>
> > @@ -893,6 +893,8 @@ brwCreateContext(gl_api api,<br>
> >     brw->must_use_separate_stencil = devinfo->must_use_separate_stencil;<br>
> >     brw->has_swizzling = screen->hw_has_swizzling;<br>
> ><br>
> > +   isl_device_init(&brw->isl_dev, devinfo, screen->hw_has_swizzling);<br>
> > +<br>
> >     brw->vs.base.stage = MESA_SHADER_VERTEX;<br>
> >     brw->tcs.base.stage = MESA_SHADER_TESS_CTRL;<br>
> >     brw->tes.base.stage = MESA_SHADER_TESS_EVAL;<br>
> > diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h<br>
> > index 6b6cfdf..996888b 100644<br>
> > --- a/src/mesa/drivers/dri/i965/brw_context.h<br>
> > +++ b/src/mesa/drivers/dri/i965/brw_context.h<br>
> > @@ -40,6 +40,8 @@<br>
> >  #include "brw_compiler.h"<br>
> >  #include "intel_aub.h"<br>
> ><br>
> > +#include "isl/isl.h"<br>
> > +<br>
> >  #ifdef __cplusplus<br>
> >  extern "C" {<br>
> >       /* Evil hack for using libdrm in a c++ compiler. */<br>
> > @@ -889,6 +891,8 @@ struct brw_context<br>
> >      */<br>
> >     bool needs_unlit_centroid_workaround;<br>
> ><br>
> > +   struct isl_device isl_dev;<br>
> > +<br>
> >     GLuint NewGLState;<br>
> >     struct {<br>
> >        struct brw_state_flags pipelines[BRW_NUM_PIPELINES];<br>
> > diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c<br>
> > index 3bff86d..ae1b900 100644<br>
> > --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c<br>
> > +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c<br>
> > @@ -79,10 +79,6 @@ brw_emit_surface_state(struct brw_context *brw,<br>
> >                         uint32_t *surf_offset, int surf_index,<br>
> >                         unsigned read_domains, unsigned write_domains)<br>
> >  {<br>
> > -   /* TODO: This should go in the context */<br>
> > -   struct isl_device isl_dev;<br>
> > -   isl_device_init(&isl_dev, brw->intelScreen->devinfo, brw->has_swizzling);<br>
> > -<br>
> >     const struct surface_state_info ss_info = surface_state_infos[brw->gen];<br>
> ><br>
> >     struct isl_surf surf;<br>
> > @@ -111,7 +107,7 @@ brw_emit_surface_state(struct brw_context *brw,<br>
> >                                      ss_info.num_dwords * 4, ss_info.ss_align,<br>
> >                                      surf_index, surf_offset);<br>
> ><br>
> > -   isl_surf_fill_state(&isl_dev, dw, .surf = &surf, .view = view,<br>
> > +   isl_surf_fill_state(&brw->isl_dev, dw, .surf = &surf, .view = view,<br>
> >                         .address = mt->bo->offset64 + mt->offset,<br>
> >                         .aux_surf = aux_surf, .aux_usage = aux_usage,<br>
> >                         .aux_address = aux_offset,<br>
> > @@ -496,17 +492,13 @@ brw_emit_buffer_surface_state(struct brw_context *brw,<br>
> >                                unsigned pitch,<br>
> >                                bool rw)<br>
> >  {<br>
> > -   /* TODO: This should go in the context */<br>
> > -   struct isl_device isl_dev;<br>
> > -   isl_device_init(&isl_dev, brw->intelScreen->devinfo, brw->has_swizzling);<br>
> > -<br>
> >     const struct surface_state_info ss_info = surface_state_infos[brw->gen];<br>
> ><br>
> >     uint32_t *dw = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,<br>
> >                                    ss_info.num_dwords * 4, ss_info.ss_align,<br>
> >                                    out_offset);<br>
> ><br>
> > -   isl_buffer_fill_state(&isl_dev, dw,<br>
> > +   isl_buffer_fill_state(&brw->isl_dev, dw,<br>
> >                           .address = (bo ? bo->offset64 : 0) + buffer_offset,<br>
> >                           .size = buffer_size,<br>
> >                           .format = surface_format,<br>
> > --<br>
> > 2.5.0.400.gff86faf<br>
> ><br>
> > _______________________________________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>