On Fri, Jul 13, 2018 at 01:01:27PM +0300, Pohjolainen, Topi wrote: > On Wed, Jul 11, 2018 at 09:27:23PM -0700, Nanley Chery wrote: > > The current behavior masked two bugs where the flag was not set to true > > after modifying the stencil texture. One case was a regression > > introduced with commit bdbb527a65fc729e7a9319ae67de60d03d06c3fd and > > another was a bug in the depthstencil mapping code. These have since > > been fixed. > > > > To prevent such bugs from being masked in the future, initialize > > r8stencil_needs_update to false. > > > > v2: Keep the delayed allocation. > > > > Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> (v1) > > This version also. Thanks Nanley! >
Great. Thank you! -Nanley > > --- > > src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > > b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > > index 187f310d7d6..31f3182d5a5 100644 > > --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > > +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > > @@ -672,8 +672,6 @@ make_separate_stencil_surface(struct brw_context *brw, > > if (!mt->stencil_mt) > > return false; > > > > - mt->stencil_mt->r8stencil_needs_update = true; > > - > > return true; > > } > > > > @@ -2937,7 +2935,7 @@ intel_update_r8stencil(struct brw_context *brw, > > assert(devinfo->gen >= 7); > > struct intel_mipmap_tree *src = > > mt->format == MESA_FORMAT_S_UINT8 ? mt : mt->stencil_mt; > > - if (!src || devinfo->gen >= 8 || !src->r8stencil_needs_update) > > + if (!src || devinfo->gen >= 8) > > return; > > > > assert(src->surf.size > 0); > > @@ -2961,6 +2959,9 @@ intel_update_r8stencil(struct brw_context *brw, > > assert(mt->r8stencil_mt); > > } > > > > + if (src->r8stencil_needs_update == false) > > + return; > > + > > struct intel_mipmap_tree *dst = mt->r8stencil_mt; > > > > for (int level = src->first_level; level <= src->last_level; level++) { > > -- > > 2.18.0 > > > > _______________________________________________ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev