<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 14, 2016 at 3:41 PM, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@intel.com" target="_blank">chad.versace@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu 14 Jul 2016, Chad Versace wrote:<br>
> On Thu 14 Jul 2016, Chad Versace wrote:<br>
> > On Wed 13 Jul 2016, Jason Ekstrand wrote:<br>
> > > Reviewed-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
> > > ---<br>
> > >  src/mesa/drivers/dri/i965/brw_state.h            |  8 +++<br>
> > >  src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 79 ++++++++++++++++++++++++<br>
> > >  2 files changed, 87 insertions(+)<br>
><br>
><br>
><br>
> > > +void<br>
> > > +brw_emit_surface_state(struct brw_context *brw,<br>
> > > +                       struct intel_mipmap_tree *mt,<br>
> > > +                       const struct isl_view *view,<br>
> > > +                       uint32_t mocs, bool for_gather,<br>
> > > +                       uint32_t *surf_offset, int surf_index,<br>
> > > +                       unsigned read_domains, unsigned write_domains)<br>
> > > +{<br>
> > > +   const struct surface_state_info ss_info = surface_state_infos[brw->gen];<br>
> > > +<br>
> > > +   struct isl_surf surf;<br>
> > > +   intel_miptree_get_isl_surf(brw, mt, &surf);<br>
> > > +<br>
> > > +   union isl_color_value clear_color = { .u32 = { 0, 0, 0, 0 } };<br>
> > > +<br>
> > > +   struct isl_surf *aux_surf = NULL, aux_surf_s;<br>
> > > +   uint64_t aux_offset = 0;<br>
> > > +   enum isl_aux_usage aux_usage = ISL_AUX_USAGE_NONE;<br>
> > > +   if (mt->mcs_mt &&<br>
> > > +       ((view->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) ||<br>
> > > +        mt->fast_clear_state != INTEL_FAST_CLEAR_STATE_RESOLVED)) {<br>
> > > +      intel_miptree_get_aux_isl_surf(brw, mt, &aux_surf_s, &aux_usage);<br>
> > > +      aux_surf = &aux_surf_s;<br>
> > > +      assert(mt->mcs_mt->offset == 0);<br>
> > > +      aux_offset = mt->mcs_mt->bo->offset64;<br>
> > > +<br>
> > > +      /* We only really need a clear color if we also have an auxiliary<br>
> > > +       * surfacae.  Without one, it does nothing.<br>
> > > +       */<br>
> > > +      clear_color = intel_miptree_get_isl_clear_color(brw, mt);<br>
> > > +   }<br>
> ><br>
> > What about the auxiliary hiz surface for depth textures? The function only handles mcs/ccs.<br>
><br>
> Wait... I predict your answer will be "Keep reading. It's in another<br>
> patch."<br>
<br>
</div></div>I answered it myself. gen8_update_texture_surface() emits the<br>
SURFACE_STATE aux fields *only* for intel_mipmap_tree::mcs_mt. It<br>
ignores the auxiliary hiz surface, to my surprise.<br>
<br>
Well, that investigation corrected my longstanding (and unfounded)<br>
belief that i965 was sampling from depth surfaces without resolving.<br>
That really needs to get fixed, for performance's sake.<br>
<br>
Do you mind inserting a FINISHME comment here at the appropriate places<br>
in the patch series, as a reminder to finish hiz sampling? It's no<br>
problem if you don't want to.<br>
</blockquote></div><br></div><div class="gmail_extra">That *is* in another patch :)<br></div></div>